15

Everything works perfectly except until the error below. I'm slightly new at LaTeX and perhaps I'm missing a package, but I already have the graphicx package. Any help will be greatly appreciated!

! LaTeX Error: Unknown graphics extension: .eps.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.24 \includegraphics[width=2.6in]{02_1.eps}

? 
diabonas
  • 25,784
econ
  • 151

3 Answers3

12

With a sufficiently new installation, pdfLaTeX will auto-convert .eps files to .pdf format for inclusion. However, this relies on you not giving the file extension as part of the name

\includegraphics[width=2.6in]{02_1} % No '.eps'

(From comments, I see you have MiKTeX 2.9, and this MiKTeX should do the auto-conversion.)

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
11

If you want to use pdflatex, you can't directly compile with eps files. So you can convert them beforehand or convert them "on-the-fly" with the package epstopdf.

Or you could just use latex, which outputs DVI, not PDF, but you can use eps files directly.

Juri Robl
  • 4,763
  • I see that it's creating DVI file. I'm using MikTex 2.9 if this makes a difference. At the end I would like it to be in PDFs and so far whenever I make worksheets they've always been outputted as both DVI and PDF. But now that I'm using eps it's not working like when I was using jpg. – econ Aug 29 '12 at 21:21
  • I have the esptopdf package installed already but it's still not working. – econ Aug 29 '12 at 21:27
  • 1
    @econ \write18 must be enabled. Please read section 1.2 Requirements of the package documentation. – Gonzalo Medina Aug 29 '12 at 22:54
  • 2
    @GonzaloMedina With a sufficiently new installation, epstopdf is called automatically by graphics using 'restricted shell escape', so \write18 does not need to be enabled. – Joseph Wright Aug 30 '12 at 10:15
  • @econ: if you want to produce pdf output, (imo) you're best converting the .eps figures to .pdf; that way, one source of doubt is eliminated. if (as you say) you're producing dvi and pdf from a standard run, we need more details, like a sample that processes to produce the error, and also some details of how you run (pdf)latex -- is it from one of the ide thingies, by any chance? -- if so, which one? – wasteofspace Aug 30 '12 at 10:36
  • Might a minimum working example be of use here? That is, if you are using the epstopdf package and it's still not working. – User 17670 Aug 30 '12 at 10:43
3

epstopdf package will probably solve this problem:

\usepackage{epstopdf}