Use eps files with pdflatex

From http://www.trevorrow.com/oztex/ozfaq.html#pdfeps:

Not directly, but you can tell pdflatex to convert eps files to pdf files on the fly. Edit your LaTeX file and add these lines before \begin{document}:
\ifx\pdfoutput\undefined
% we are running LaTeX, not pdflatex
\usepackage{graphicx}
\else
% we are running pdflatex, so convert .eps files to .pdf
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
\fi
If you have an existing document with commands like \includegraphics{foo.eps} then LaTeX will include foo.eps but pdflatex will automatically convert it to foo.pdf and include that.
Note that it is better to leave off the extension; ie. use \includegraphics{foo}. Then pdflatex will include foo.pdf if it exists, but if not it will look for foo.eps and call epstopdf to create foo.pdf.

Read more here.

Leave a Reply