# [OS X TeX] Is there a better alternative to \DeclareGraphicsExtensions ?

Ramón Figueroa-Centeno ramonf at hawaii.edu
Tue Mar 24 21:59:19 EDT 2009

Aloha,

Here is an answer to my own question:

\documentclass{article}
\usepackage{graphicx}
\usepackage{epspdfconversion} % or \usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{convert #1 dirname #1/basename #1 .tif`.png}
\AppendGraphicsExtensions{.tif}
% See .log file for a list of known graphics
% extensions
\begin{document}
\includegraphics{Hello} % Do not use a suffix. That way Hello.tif will be converted to Hello.png
\end{document}

The \AppendGraphicsExtensions command appends to the list of known graphic extensions (to prepend use \PrependGraphicsExtensions).

That way TIFFs get converted only once to PNGs (the other solution presented in the list, using tif2png.sty, is better in the sense that it detects when the TIFFs are updated and reconverts them).

Ramón

--
View this message in context: http://n2.nabble.com/Is-there-a-better-alternative-to-%5CDeclareGraphicsExtensions---tp2483186p2530262.html
Sent from the MacOSX-TeX mailing list archive at Nabble.com.

More information about the MacOSX-TeX mailing list