[pdftex] Choosing between graphic include files
James A. Bednar
jbednar at inf.ed.ac.uk
Thu Dec 22 12:20:45 CET 2005
| Date: Wed, 21 Dec 2005 13:38:24 -0500
| From: Joel Salomon <joelcsalomon at gmail.com>
| Subject: [pdftex] Choosing between graphic include files
| To: ???hax <texhax at tug.org>, pdf??? <pdftex at tug.org>, PSTricks
| <pstricks at tug.org>
| Message-ID:
| <7871fcf50512211038m352050c8kad1ad0e9c57b511b at mail.gmail.com>
| Content-Type: text/plain; charset=UTF-8
|
| 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?
| On 12/21/05, Herbert Voss <LaTeX at zedat.fu-berlin.de> wrote:
| > \includegraphics{file name} _without_ an extension will
| > always choose the right one.
|
| So there's no need for ifpdf and \DeclareGraphicsExtensions that
| someone sent me?
I'm not sure if this has been fixed, but \includegraphics without an
extension most certainly does *not* always choose the right file.
That approach only works if the filename does not contain any periods,
because it treats anything after the period as part of an extension,
instead of just using the .pdf or .eps part. I've got hundreds
(thousands) of legacy image files using periods for many different
purposes, so I had to write my own macros that wrap around
\includegraphics to fill in the appropriate extension.
Jim
More information about the pdftex
mailing list