tags:

views:

2378

answers:

2

I am trying to get LaTeX to include figures, but the eps files will not show up in the DVI. I tried various packages to no avail. The figures will show up fine if I compile to PDF, but not in the DVI file...

I am using MikTex and LEd under Windows.

+3  A: 

This is probably due to the limitations of your DVI viewer. The DVI file itself does not contain the EPS files: merely a link to those files. When the DVI is converted to postscript (and from there to PDF, or directly to PDF), the EPS files are incorporated. Some dvi viewers support included the EPS files, others don't.

Personally, I have always tended to simply look at the PDF end result, so I can't remember which viewers do support display of EPS images.

Edit:

With a quick google search, I found this link, implying the YAP viewer (the standard one in miktex) supports EPS as long as it knows where ghostscript is on your PC, so if you're using YAP, it may be as simple as pointing it at the ghostscript DLL.

Al
I've never used a DVI viewer that does support graphics in the DVI file.
David Zaslavsky
@David: Miktex's viewer, YAP does support it. I think that this is the one I used before I just adopted the dvips->ps2pdf approach.
Al
This comment is right. YAP requires GhostScript to be installed on your machine to view EPS files.
rix0rrr
Thank you for the research. YAP does indeed show the EPS files, so it's clearly a problem with LEd's DVI viewer. Thank you very much for your help.
Stavros Korokithakis
+2  A: 

You should have both images for PDF and DVI when compiling.

For example, prepare the picture in two format: pic.jpg (for PDF) and pic.eps (for DVI).

When calling the picture, omit the extension.

\includegraphics{pic}
Selinap
Only use JPG for photographs. For EPS graphics, convert them to PDF for including in pdfLaTeX.
Will Robertson