3

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.

madth3
  • 7,275
  • 12
  • 50
  • 74
Stavros Korokithakis
  • 4,680
  • 10
  • 35
  • 42
  • Why is this a problem? Usually, the final document will be in pdf or ps format anyway, so do you need the figures to be there in the typically intermediary DVI files? – jalf Jul 14 '09 at 14:37
  • I just like to see how they look in the intermediate document in order to make changes to the layout or refer to them, it's not a showstopper but I was wondering if it could be fixed... – Stavros Korokithakis Jul 15 '09 at 11:31
  • I don't think that the eps files will shown up in PDF. – riza Jul 19 '09 at 17:19

2 Answers2

5

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}
riza
  • 16,274
  • 7
  • 29
  • 29
4

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.

DrAl
  • 70,428
  • 10
  • 106
  • 108
  • I've never used a DVI viewer that does support graphics in the DVI file. – David Z Jul 14 '09 at 15:17
  • @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. – DrAl Jul 14 '09 at 18:32
  • This comment is right. YAP requires GhostScript to be installed on your machine to view EPS files. – rix0rrr Jul 15 '09 at 11:25
  • 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 Jul 15 '09 at 11:31