[OS X TeX] eps/pdf conversion

Herbert Schulz herbs at wideopenwest.com
Fri Feb 26 12:32:27 EST 2010


On Feb 26, 2010, at 10:50 AM, Themis Matsoukas wrote:

> It seems that there has been a recent change (which I just noticed) in the process of converting eps-to-pdf conversion using pdflatex+epstopdf along with \includegraphics{graphics_file} (<-- without the file extension). In the past, this would cause latex to use graphics_file.PDF, if such file existed, otherwise it would create it by reading graphics_file.EPS. Now, if I make a change in the EPS file, it is immediately reflected in the typeset output. Moroever, it seems that latex knows if an EPS was modified and only then it creates a new PDF. All of which seems too good to be true, so I thought I would check with the list.
> 
> I am on TL 2009 and TS 2.31. 
> 
> Themis Matsoukas
> matsoukas at engr.psu.edu
> 

Howdy,

The latest epstopdf package does the conversion fig.eps->fig-eps-converted-to.pdf, by default, rather than fig.eps->fig.pdf and will automatically update fig-eps-converted-to.pdf if the fig.eps file is newer. However... it, by default, also appends the eps extension to the list of allowed graphics extensions so, if a fig.pdf already exists and you leave off the eps extension in the \includegraphics it should pick that up no matter how the fig.eps has changed.

I prefer the previous behavior, the conversion is fig.eps->fig.pdf and the eps is prepended to the list of allowed graphics extensions. Again, if you update fig.eps it will automatically rebuild fig.pdf and wont it the fig.pdf is current. To get this behavior back I have an esptopdf-sys.cfg in my personal tree (at ~/Library/texmf/tex/latex/config/ (for organizational purposes)) which contains the lines

% to get old behavior foo.eps->foo.pdf as well as update,prepend
\epstopdfsetup{program at epstopdf=epstopdf,verbose,update,prepend,prefersuffix=false,suffix=}
% tif->png
\epstopdfDeclareGraphicsRule{.tif}{png}{.png}{convert #1 \OutputFile}
\PrependGraphicsExtensions{.tif}
% gif->png
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{convert #1 \OutputFile}
\PrependGraphicsExtensions{.gif}

I've included some lines so tif-png and gif-png (this one is quite ugly) conversion also happens auto-magically too.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the MacOSX-TeX mailing list