I'm using Mathematicato produce some of my graphics (when i'm not able to just TikZ them easily). All these images are availabvle as .eps and .pnghaving the same file name - let's use img.eps / img.png in the following.
I would like to set a preference for graphicx to use only one type, i.e. using
\includegraphics[width=.6\textwitdh]{img}
I would like to specify, which img to use with one switch, (package) option or variable.
I tried
\DeclareGraphicsExtension{.eps}
to restrict the allowed image extension to .eps, but still the .png file is included. It seems, .pngis preferred over .eps.
Though this is of course restricted to XeTeX it might be interesting for others, if you use .png together with some lossy format like .jpg to have a file extension preference.
Is there a package option for that or an easy command (global document option) for that?
To provide an MWE is - I think - difficult, because it would be necessary to provide at least 3 files.
\RemoveGraphicsExtensionfromgrfextdoes the job. By removing the unwanted extension. Though, if one of all your images is available only in one format - a preference would be necessary (removing the extension disables to use that specific image). – Ronny Jan 01 '13 at 20:52\DeclareGraphicsExtensions{.eps}(notesat end of command name) would make LaTeX only handle.epsexplicitly, in particular it should only ever add a .eps extension. (other file types may be handled if their extension is explicit) – David Carlisle Jan 01 '13 at 21:47