[texhax] help

Heiko Oberdiek heiko.oberdiek at googlemail.com
Mon Dec 17 13:40:18 CET 2018


Hello,

On 2018-12-15 15:15, James Diamond wrote:
> On Sat, Dec 15, 2018 at 01:46 (+0100), Reinhard Kotucha wrote:
> 
>> The search order is obviously wrong but can't be changed without
>> breaking existing documents.  It's wrong to look for .png files before
>> looking for .pdf files.
> 
>> The solution is not to rely on this order at all.
> 
>>    \includegraphics{myfile.pdf}
> 
>> instead of
> 
>>    \includegraphics{myfile}
> 
> The problem with that is if you have to use dvi files for some reason
> (and have .eps versions of your files) then you have to either edit
> your .tex file or \ifpdf ... \else \if around your \includegraphics,
> both of which are a nuisance.

The automatic search order can be made reliable by the help of package
`grfext`. Example (for pdfTeX):

\usepackage{grfext}
\PrependGraphicsExtensions*{.pdf}
...
\includegraphics{myimage}

Then first `.pdf` is tried (if the current graphics driver supports it)
before the other extensions.

Yours sincerely
   Heiko


More information about the texhax mailing list