Included LaTeX figures do not show in dvi but do in pdf
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}
Stavros Korokithakis
Updated on June 30, 2022Comments
-
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 almost 15 yearsWhy 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 almost 15 yearsI 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 almost 15 yearsI don't think that the eps files will shown up in PDF.
-
-
David Z almost 15 yearsI've never used a DVI viewer that does support graphics in the DVI file.
-
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 almost 15 yearsThis comment is right. YAP requires GhostScript to be installed on your machine to view EPS files.
-
Stavros Korokithakis almost 15 yearsThank 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 almost 15 yearsOnly use JPG for photographs. For EPS graphics, convert them to PDF for including in pdfLaTeX.