Included LaTeX figures do not show in dvi but do in pdf

10,896

Solution 1

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.

Solution 2

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}
Share:
10,896
Stavros Korokithakis
Author by

Stavros Korokithakis

Updated on June 30, 2022

Comments

  • Stavros Korokithakis
    Stavros Korokithakis almost 2 years

    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.

    • josesuero
      josesuero almost 15 years
      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?
    • Stavros Korokithakis
      Stavros Korokithakis almost 15 years
      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...
    • riza
      riza almost 15 years
      I don't think that the eps files will shown up in PDF.
  • David Z
    David Z almost 15 years
    I've never used a DVI viewer that does support graphics in the DVI file.
  • DrAl
    DrAl almost 15 years
    @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.
  • schoppenhauer
    schoppenhauer almost 15 years
    This comment is right. YAP requires GhostScript to be installed on your machine to view EPS files.
  • Stavros Korokithakis
    Stavros Korokithakis almost 15 years
    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.
  • James
    James almost 15 years
    Only use JPG for photographs. For EPS graphics, convert them to PDF for including in pdfLaTeX.