# [OS X TeX] graphicx, pdflatex and pdf file names

Chris Goedde cgg.lists at gmail.com
Wed Aug 1 16:32:05 EDT 2007

```On Aug 1, 2007, at 3:16 PM, William Adams wrote:

> On Aug 1, 2007, at 3:32 PM, Chris Goedde wrote:
>
>> Is there a workaround or solution to this short of renaming my pdf
>> files? Is this a known bug? If not (or even if so), who's the
>> right person to report it to?
>
> Look up \DeclareGraphicsRule which is how one teaches the graphicx
> package about extensions --- it tries hard to be smart / safe /
> sensible, which causes the behaviour you describe.
>
> I think the command you want is \DeclareGraphicsRule{*}{pdf}, which
> then has any unknown extension treated as a .pdf.

Okay that works, thanks. The full syntax is

\DeclareGraphicsRule{*}{pdf}{*}{}

in the preamble, and the line

\includegraphics[width=3in]{Figs/Simulations/Aggregate/Correlation-
WP-12.80.pdf}

in the file.

There's still a bug though, pdflatex/graphicx (not sure which)
shouldn't be parsing the file as having extension .80.pdf, I don't
think, but as having extension .pdf. (The above workaround just tells
graphicx to pretend that a file with 'extension' .80.pdf the same as
a file with extension .pdf.) Maybe others disagree that this is a
bug, though.

--
Chris Goedde