[tex-live] pretest: epstopdf overwrites existing files

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Jul 8 11:10:59 CEST 2009


On Wed, Jul 08, 2009 at 10:20:36AM +0200, Uwe Siart wrote:

> Things appear totally screwed up after the update today.

We are still in the process of discussing, thus the repository
doesn't reflect the latest results yet.

Latest epstopdf.sty 2009/07/07 v1.10:
  http://www.informatik.uni-freiburg.de/~oberdiek/tmp/epstopdf.pdf

Currently I prefer the following default setting:
  append
  update
  suffix=.\SourceExt-converted-to
  % or suffix=-\SourceExt-converted-to
  % IMHO a dot makes the name better readable.
  prefersuffix=true

You can experiment by calling \epstopdfsetup with your preferred
option settings:

\usepackage{graphicx}
\epstopdfsetup{<key value option list>}

> I have a file 'foo.tex'
> 
> ,----[ foo.tex ]
> | \documentclass{article}
> | \usepackage{graphicx}
> | \begin{document}
> | \includegraphics{tumlogo_oz_umr_cmyk}
> | \end{document}
> `----
> 
> that requests a logo graphics 'tumlogo_oz_umr_cmyk' without extension.
> Both tumlogo_oz_umr_cmyk.eps and tumlogo_oz_umr_cmyk.pdf reside in my
> local tree and are well found by kpsewhich:
> 
> ,----
> | e:\org\viruscheck>kpsewhich tumlogo_oz_umr_cmyk.eps
> | kpsewhich tumlogo_oz_umr_cmyk.eps
> | c:/Programme/texmf-local/tex/latex/koma-script/tumlogo_oz_umr_cmyk.eps
> | 
> | e:\org\viruscheck>kpsewhich tumlogo_oz_umr_cmyk.pdf
> | kpsewhich tumlogo_oz_umr_cmyk.pdf
> | c:/Programme/texmf-local/tex/latex/koma-script/tumlogo_oz_umr_cmyk.pdf
> `----
> 
> But when I call pdflatex I get the following weird error:
> 
> ,----
> | e:\org\viruscheck>pdflatex foo
> | pdflatex foo
> | This is pdfTeX, Version 3.1415926-1.40.10 (Web2C 2009)
> |  restricted \write18 enabled.
> | (./foo.tex
> | [...]
> | )EPSTOPDF 2.9.10gw, 2008/08/26 - Copyright 1998-2001 by Sebastian Rahtz et al., 2002-2009 by Gerben Wierda et al. Free software under a BSD-style license.
> | !!! Error: "tumlogo_oz_umr_cmyk.eps" does not exist!

Thanks for your test case.

Options for epstopdf.sty are (see your graphics.cfg):
| \epstopdfsetup{verbose,update,prepend,suffix=-epstopdf}%
And your version of epstopdf.sty is 1.9 (without support for
option `prefersuffix', 1.9 has always "prefersuffix=true").

That means epstopdf.sty calls the program epstopdf in order to
convert the .eps file that is found first.
  However at TeX/LaTeX level, the directory of the .eps
file is hidden (c:/Programme/texmf-local/tex/latex/koma-script/),
the package epstopdf.sty only sees "tumlogo_oz_umr_cmyk.eps" without
path and passes that to the program epstopdf. The program isn't TeX,
thus it does not call kpsewhich.

> | ! Package pdftex.def Error: File `tumlogo_oz_umr_cmyk-epstopdf.pdf' not found.

Another problem, not yet triggered in your case: the
directory of the source file might not be writable. Here helps
option `outdir' that should point to a writable directory.

Perhaps this can be solved by writing a wrapper conversion script:
* it looks for the files (also using kpsewhich),
* it looks for conversion programs,
* and the conversion process is configurable.

This might allow adding another rules, e.g. GIF files that
are converted to PNG files -- TL doesn't include ImageMagick or
netpbm :-(

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>

PS: Another untested case are spaces in file names, that
are handled by package grffile. But I have doubts that they
survive the conversion process.


More information about the tex-live mailing list