Including .eps files in pdfLaTeX

Discussion in 'HTML, Graphics & Programming' started by frying_pan_cat, 13 Apr 2010.

1. frying_pan_cat

Location: Devon

Does anyone know how to include .eps files in a pdfLaTeX document so that I can compile the file straight to PDF rather than having to run LaTeX at the command line and compile it to a DVI file?

I did find something telling me to include the lines
Code:
```\ifpdf
\DeclareGraphicsRule{*}{mps}{*}{}
\fi```
which got me around the problem of it not recognising .eps as a graphics extension, but now it says
Code:
```! Undefined control sequence.
<argument> U:\ECMM
713\Hurricanes \Forward Hurricane1.eps
l.3 ...:\ECMM713\Hurricanes\Forward Hurricane1.eps```
I have tried converting the .eps files to pdf too but I couldn't get that to work either.

So can anyone tell me if it's possible to use pdfLaTeX with .eps input files, and if not what is the easiest way to get a PDF dosument out?

Thanks

EDIT: I've just noticed that the second error does not have the correct location of the file in as it has changed. Changing it to the correct location gives the error
Code:
```! Incomplete \iffalse; all text was ignored after line 3.
<inserted text>
\fi
l.234 ...aphics[width=125mm]{ForwardHurricane.eps}```

Last edited: 13 Apr 2010
2. azteched

Posts: 423

I don't think you can use eps files with pdflatex.
I would convert eps stuff to pdf (there's a whole set of converter tools, eps2pdf, ps2pdf, etc; pdfcrop might also be useful..).

3. Inquisitor

Location: Birmingham

Can't you just compile to a DVI file as normal and then generate a PDF with dvipdf?

Code:
```latex somefile.tex
dvipdf somefile.dvi
```
This should circumvent the problems with EPS graphics.

Last edited: 14 Apr 2010
4. frying_pan_cat

Location: Devon

I tried that but it doesn't like the command dvipdf. I did manage to get it working with
Code:
```dvipdfm file.dvi
```
but for some reason I get an error
Code:
```** WARNING ** -1 memory objects still allocated
```
It seems to have typeset OK though so I guess it's nothing to worry about