Spencer Klein | 28 Jan 01:35 2010

Using .ps/.eps figures with TexWorks

Hi,

Please forgive what is probably a stupid question.  I am a long-term 
.tex user, trying to convert to TexWorks.  I have TexWorks 0.1, running 
on a Windows XP.  I am trying to .tex a file containing .eps figures, 
and keep getting the error message:

Latex Error: Unknown graphics extension .eps.

This happens even with a file that ran perfectly on Miktex, and also on 
the Cornell arXiv server:
http://arxiv.org/abs/0901.1161

The header reads:

\documentclass[twocolumn,showpacs,preprintnumbers,amsmath,amssymb]{revtex4}

\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math

and the typical figure is included with

\begin{figure}[tb]
\includegraphics[width=6.3cm]{probrho_water.eps}
  \caption{\label{rhoprobability} $\rho$ probability as a function of 
depth in a slab
for a $10^{23}$ eV photon incident on a water target.  The two broad 
peaks around 20 and 40 cm
correspond to $\Delta k L = 2n\pi$ at the $\rho$ pole mass.}
(Continue reading)

Stefan Löffler | 28 Jan 07:34 2010
Picon

Re: Using .ps/.eps figures with TexWorks

Hi,

On 2010-01-28 01:35, Spencer Klein wrote:
> Please forgive what is probably a stupid question.  I am a long-term
> .tex user, trying to convert to TexWorks.  I have TexWorks 0.1,
> running on a Windows XP.

Just FYI: the latest stable version of Tw is 0.2.3, and the latest
experimental builds are 0.3.x. You may want to consider upgrading Tw
(though this is unrelated to your problem, AFAIK).

> I am trying to .tex a file containing .eps figures, and keep getting
> the error message:
>
> Latex Error: Unknown graphics extension .eps.
>
> This happens even with a file that ran perfectly on Miktex, and also
> on the Cornell arXiv server:
> http://arxiv.org/abs/0901.1161

A few things spring to my mind here:
1) If it runs on MiKTeX, it should run in Tw since Tw just runs MiKTeX
commands under the hood.
2) pdflatex doesn't support .eps (directly), AFAIK. Since Tw is
pdf-oriented, only pdf typesetting tools are defined by default. See
http://code.google.com/p/texworks/wiki/AdvancedTypesettingTools for
information on how to set up other workflows.
3) IIRC, the epstopdf package can be used to include .eps figures in
documents processed with pdflatex (it converts the .eps files to .pdf
files on the fly). Most recent versions of MiKTeX may use this
(Continue reading)

Bruno Voisin | 28 Jan 08:55 2010

Re: Using .ps/.eps figures with TexWorks

Le 28 janv. 2010 à 07:34, Stefan Löffler a écrit :

> 2) pdflatex doesn't support .eps (directly), AFAIK. Since Tw is
> pdf-oriented, only pdf typesetting tools are defined by default. See
> http://code.google.com/p/texworks/wiki/AdvancedTypesettingTools for
> information on how to set up other workflows.

Hi Stefan,

Thanks for setting up that page, that's very useful.

Just one remark: on the Mac (and I think that applies to Linux too), creating a new script is not the logical
way to go for TeX Live. Instead, there's the simpdftex script (formerly called altpdftex) which is
already provided to do just that: emulate pdftex through dvips and ps2pdf (or any distiller of your
choice), or even dvipdfm(x). The only think you have to do is create the appropriate engines.

For example, my tools.ini has (just to show the variety of possibilities):

[001]
name=dviTeX
program=simpdftex
arguments=etex, --extratexopts, $synctexoption, $fullname
showPdf=true

[002]
name=dviLaTeX
program=simpdftex
arguments=latex, --extratexopts, $synctexoption, $fullname
showPdf=true

(Continue reading)

Stefan Löffler | 31 Jan 12:39 2010
Picon

Re: Using .ps/.eps figures with TexWorks

Hi,

On 2010-01-28 08:55, Bruno Voisin wrote:
> Le 28 janv. 2010 à 07:34, Stefan Löffler a écrit :
>
>   
>> 2) pdflatex doesn't support .eps (directly), AFAIK. Since Tw is
>> pdf-oriented, only pdf typesetting tools are defined by default. See
>> http://code.google.com/p/texworks/wiki/AdvancedTypesettingTools for
>> information on how to set up other workflows.
>>     
> Hi Stefan,
>
> Thanks for setting up that page, that's very useful.
>
> Just one remark: on the Mac (and I think that applies to Linux too), creating a new script is not the logical
way to go for TeX Live. Instead, there's the simpdftex script (formerly called altpdftex) which is
already provided to do just that: emulate pdftex through dvips and ps2pdf (or any distiller of your
choice), or even dvipdfm(x). The only think you have to do is create the appropriate engines.
>   

Thanks for pointing this out (again; I realized that you have mentioned
this a few times already, but I always forgot about it - sorry). I added
it to the page.

-Stefan

Berend Hasselman | 28 Jan 07:43 2010
Picon
Picon

Re: Using .ps/.eps figures with TexWorks


On 28-01-2010, at 01:35, Spencer Klein wrote:

> Hi,
> 
> Please forgive what is probably a stupid question.  I am a long-term .tex user, trying to convert to
TexWorks.  I have TexWorks 0.1, running on a Windows XP.  I am trying to .tex a file containing .eps figures,
and keep getting the error message:
> 
> Latex Error: Unknown graphics extension .eps.
> 
> This happens even with a file that ran perfectly on Miktex, and also on the Cornell arXiv server:
> http://arxiv.org/abs/0901.1161
> 
> The header reads:
> 
> \documentclass[twocolumn,showpacs,preprintnumbers,amsmath,amssymb]{revtex4}
> 
> \usepackage{graphicx}% Include figure files
> \usepackage{dcolumn}% Align table columns on decimal point
> \usepackage{bm}% bold math
> 

Put a line containing

\usepackage{epstopdf}

after the \usepackage{graphicx}

Berend
(Continue reading)

Vladimir Lomov | 28 Jan 07:53 2010
Picon

Re: Using .ps/.eps figures with TexWorks

** Spencer Klein [2010-01-27 16:35:53 -0800]:

> Hi,

> Please forgive what is probably a stupid question.  I am a long-term 
> .tex user, trying to convert to TexWorks.  I have TexWorks 0.1, running 
> on a Windows XP.  I am trying to .tex a file containing .eps figures, 
> and keep getting the error message:

> Latex Error: Unknown graphics extension .eps.
TeXworks uses pdflatex so any images (preferably) should be in PDF
format. See epstopdf package or epstopdf tool (both exist on CTAN).

> This happens even with a file that ran perfectly on Miktex, and also on 
> the Cornell arXiv server:
> http://arxiv.org/abs/0901.1161

IMHO, on arxiv.org they use the same tool epstopdf (actually arxiv.org
uses special script which perform any essential convertions).

> The header reads:

> \documentclass[twocolumn,showpacs,preprintnumbers,amsmath,amssymb]{revtex4}

> \usepackage{graphicx}% Include figure files
> \usepackage{dcolumn}% Align table columns on decimal point
> \usepackage{bm}% bold math

> and the typical figure is included with

(Continue reading)


Gmane