[texhax] Choosing between graphic include files
Lars Madsen
daleif at imf.au.dk
Wed Dec 21 21:22:56 CET 2005
Joel Salomon :
> Hi all,
>
> I've been using a script to generate both eps and pdf versions of a
> PSTricks graphic. Does a macro exist to include one or the other,
> depending on whether I'm using LaTeX or pdfLaTeX?
>
> (Sorry about the cross-posting; I'm not sure who can best answer this.)
>
> --Joel
>
standard knowlage, the graphicx package can actually determine whether
dvi or pdf output is used, so
simply using
\includegraphics{file}
instead of
\includegraphics{file.eps}
will have the following effect
i dvi-mode (aka latex) the file (if found) file.eps will be included,
in pdf-mode, pdflatex will look for file.pdf, file.jpg, file.png or
file.mps, and include the one that it finds first (I'm not quite sure in
which order it searches)
--
/daleif
``You cannot help men permanently by doing for them
what they could and should do for themselves. ''
-- Abraham Lincoln
More information about the texhax
mailing list