On Jan 3, 11:16 am, Michael Friendly <
frien...@yorku.ca> wrote:
> [Environment: debian linux, texlive 2009-7]
>
> I have several legacy projects (books, papers, beamers) with many
> graphics files in .eps format (or converted to .eps via command line
> tools) that were compiled using the latex/dvipdf(m) route.
dvipdfm (though not necessarily dvipdf) works best with pdf
figures. In fact, it converts eps figures to pdf on the fly using
whatever method is laid out in its config file.
>
> This is now limiting in that .ps/.eps doesn't support transparent
> colors and it is now easier for me to generate new graphics in .pdf
> in many applications.
Thus even using your present latex+dvipdfm, converting the
eps to pdf would be (have been) helpful.
>
> So, I'd like to find an easy workflow to convert an old project from
> using .eps graphics to .pdf so it can compile using pdflatex.
> Other considerations are to preserve graphic resolution in the
> conversion and not generate excessively huge graphics file sizes.
>
> Two ways I can think of are
>
> - use command line tools or scripts, e.g., using ImageMagik/convert
I would convert all legacy eps figures to pdf with command
line tools. Generally one can convert all figures in a directory
in one go. Perhaps it is safest to keep the original eps around for
reference.
> - use \DeclareGraphicsRule in my .tex, but I can't figure out how to
> supply arguments {read-file} to get the bounding box info and {command}
> to do the conversion.
As mentioned, it is possible with the epstopdf package to do
on-the-fly conversion. If configured to keep the resultant pdf
and to not convert when the pdf already exists, you will have
eventually converted all the figures, and be using only the pdf
versions.
\DeclareGraphicsRule can pass instructions to dvips to
uncompress .eps.gz. (Even this seems unnecessary as
ghostscript seems able to read gzip compressed files on its
own.) I have had little success acomplishing any other
conversions by this means. I don't think pdflatex can apply
external tools it without the help of epstopdf.sty or its
equivalent.
Dan