[OS X TeX] Re: I can't get TeX + Ghostscript to work (Herbert Schulz)

Bruno Voisin bvoisin at mac.com
Sun Apr 6 03:23:16 EDT 2008


On 6 avr. 08, at 08:15, Dr. John R. Vokey wrote:

> Any, even minimal, LaTeX file appears to have the same problem if  
> (but not otherwise) I include the line:
>
> \usepackage[pdftex]{graphicx}
>
> which, of course, I use to read in all my graphics (as they are pdf)  
> when I don't use TeX+ Ghostscript.

Is there any reason why you're using the option [pdftex] even when  
running TeX + Ghostscript? I suspect it can't work.

In my experience with the graphics and graphicx packages:

- There's no point specifying an option any longer. TeXLive comes with  
graphics.cfg clever enough to detect which of dvips, pdfTeX or XeTeX  
is used and select the appropriate option automatically.

- There's no point specifying the extension of graphical files  
yourself. Each driver definition file declares a list of extensions to  
be used sequentially when searching for graphical files. Specifically,  
dvips.def includes

	\def\Gin at extensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z}

while pdftex.def includes in essence

	% For versions > 3 and <= 5
  	\def\Gin at extensions{%
		.png,.pdf,.jpg,.mps,.jpeg,.PNG,.PDF,.JPG,.JPEG}
	% For versions > 5 and < 9
	\def\Gin at extensions{%
		.png,.pdf,.jpg,.mps,.tif,.jpeg,%
		.PNG,.PDF,.JPG,.JPEG}
	% For versions > 9.3
	\def\Gin at extensions{%
		.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,%
		.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2}
	% Otherwise
	\def\Gin at extensions{%
		.png,.pdf,.mps,.PNG,.PDF}

and xetex.def includes

	\def\Gin at extensions{.pdf,.eps,.ps,%
		.png,.jpg,.bmp,.pict,.tif,.psd,.mac,.sga,.tga,.gif}

And you can always add a \DeclareGraphicsExtensions declaration  
yourself, as in

	\DeclareGraphicsExtensions{.tif,.pdf} % For XeTeX

By following these rules, you can for example have a series of  
graphical files available in both EPS and PDF formats and keep a  
unique LaTeX input file. When this input file is processed by TeX +  
Ghostscript, the EPS graphics will be used. When the input file is  
processed by pdfTeX, the PDF graphics will be used.

Bruno Voisin



More information about the MacOSX-TeX mailing list