[texhax] Using *.eps files with Latex

Axel E. Retif axel.retif at mac.com
Wed Jul 8 08:02:04 CEST 2009


On  7 Jul, 2009, at 12:57, Christopher Kuhlman wrote:

> Hello:
>
> I am using Windows, with MiKTex 2.6 and TeXnic Center 7.1 beta.   
> Been using it for years, no problem.
>
> Always used *.png figure files with Latex.  Now I need to use  
> encapsulated postscript.
>
> I use the exact same figure formats (e.g., \usepackage{graphicx},  
> \usepackage{subfigure}) as with *.png files.
>
> However, I get fatal error on these figures, as follows:
> !  LaTex Error:  Unknonw graphics extension:  .eps.
> See the LaTeX manual or LaTeX Companion for explanation.
>
> Can someone please explain a solution?

On  7 Jul, 2009, at 23:41, Robert Wilson wrote:

> This is one of my least favorite things about LaTeX. If you're using  
> pdftex to compile, you can use (virtually) any image type (png, jpg,  
> etc.) in your documents, but NOT eps. [...]

But you can use epstopdf to convert EPS files to PDF on the fly.

> To answer your question, refer to sections 4.1 and 4.7.3 of the Not  
> So Short Introduction to LaTeX. You want \usepackage[dvips] 
> {graphicx} and must compile using latex, rather than pdftex.

And if you want to output PDF, use

\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
\epstopdfsetup{update,prepend}

See

http://ctan.tug.org/tex-archive/macros/latex/contrib/oberdiek/epstopdf.pdf

Best,

Axel




More information about the texhax mailing list