[OS X TeX] Search order graphics extension
Herbert Schulz
herbs at wideopenwest.com
Thu Feb 10 20:53:29 EST 2011
On Feb 10, 2011, at 7:42 PM, Christian Pleul wrote:
>
> Am 11.02.2011 um 02:39 schrieb Herbert Schulz:
>
>>
>> On Feb 10, 2011, at 7:28 PM, Christian Pleul wrote:
>>
>>>
>>> Am 09.02.2011 um 22:36 schrieb Herbert Schulz:
>>>
>>>>
>>>> On Feb 9, 2011, at 10:42 AM, Christian Pleul wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I use TeX Live and pdflatex. When a png file is available with the same name it firstly includes that before an eps file is inserted.
>>>>>
>>>>> Is there a way to change that behavior with pdflatex, so that firstly check for an eps file (if available convert it to pdf), then check for png, jpg what ever the default behavior is?
>>>>>
>>>>>
>>>>> Best
>>>>> --
>>>>> Christian
>>>>
>>>> Howdy,
>>>>
>>>> Most likely because the default behavior is to append the extra graphics extension to the list. You can add the file extension to the file name in the \includegraphics command.
>>>>
>>>> You might get it to work automatically if you create an epstopdf.cfg file which contains the line
>>>>
>>>> \epstopdfsetup{verbose,update,prepend}
>>>>
>>>> and place it into ~/Library/texmf/tex/latex/config/ (you may have to create at least part of this train of folders) and see if that works.
>>>
>>> Thank you! I am now using
>>>
>>> \usepackage{epstopdf}
>>> \epstopdfsetup{prepend,update,suffix=-epstopdf}
>>>
>>> and it works out fine!
>>>
>>>
>>> Best,
>>> --
>>> Christian
>>
>> Howdy,
>>
>> I actually have an epstopdf.cfg file (in ~/Library/texmf/tex/latex/config/) that has
>>
>> % to get old behavior foo.eps->foo.pdf as well as update,prepend
>> \epstopdfsetup{verbose,update,prepend,prefersuffix=false,suffix=}
>> % tif->png
>> \epstopdfDeclareGraphicsRule{.tif}{png}{.png}{convert #1 \OutputFile}
>> \PrependGraphicsExtensions{.tif}
>> % tiff->png
>> \epstopdfDeclareGraphicsRule{.tiff}{png}{.png}{convert #1 \OutputFile}
>> \PrependGraphicsExtensions{.tiff}
>>
>> which will give automatic conversion of tif(f)f->png ans well as get the old behavior of foo.eps->foo.pdf, etc., which I like. Note: the tif(f)->png will only run with shell-escape enabled.
>
> Thank you for the excellent hint, Herb!
>
Howdy,
The information is also in EpsAndPdflatex2010.pdf.zip available at <http://public.me.com/herbs2>.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the MacOSX-TeX
mailing list