# Is there any reason to compile to DVI rather than PDF these days?

I appreciate that in the past, latex was faster than pdflatex, but computer speeds being what they are nowadays, I can't see any difference in how quickly documents compile...

So, given that the end product I want is the PDF, are there good reasons not to always compile to pdf?

• Closely related question: tex.stackexchange.com/questions/349/… – provides many good reasons for using pdflatex instead of latex (and one good reason for using latex instead of pdflatex). Sep 6, 2010 at 21:25
• “given that the end product I want is the PDF…” — one reason for compiling to DVI is when the end product you want is not the PDF. (Example: SVG.) Mar 23, 2017 at 23:45

Unless you are a heavy PSTricks user, I think the answer is no, you can always go to pdf directly. Actually, in modern TeX distributions, latex is pdflatex in dvi mode; the underlying engine is the same.

• as a side note: and tikz/pgf which works well with pdflatex and is a kind of substitute for pstricks, thus there is probably no reason to use pstricks today Sep 6, 2010 at 20:52
• @Khaled: There are two overlapping, but basically different layout implementations in Pdftex. Pdftex came from the work Hàn Thế Thành did towards his Phd thesis on microptypography, and it isn't a conservative change to Tex's layout: microtypography only works with the PDF layout engine, not the DVI engine. Pdftex keeps track of state associated with Pdf generation, whilst the DVI engine just injects raw Postscript code into PS specials. They're quite different. Sep 7, 2010 at 8:20
• @Khaled: I'm less sure of what I've been saying... Some details though: the microtype package says that font expansion, not surprisingly, doesn't work with the DVI engine/pathway. There's stuff to do with page geometry that Pdftex has to keep track of to generate PDFs which, to be conservative over Tex, it should not bother with in DVI mode. Sep 7, 2010 at 12:41
• @Khaled: Be very careful with your conclusion that, since latex and pdflatex are symlinks to the same command, they must be the same. This is simply not true: a program can check how it was invoked (i.e. via which symlink/command name) and act accordingly. Many applications do that, and so does pdftex – clearly at least for the purpose of loading the LaTeX macro packages when invoked via [pdf]latex. (But you could still be right.) Sep 8, 2010 at 8:43
• xelatex compiles to PDF and can handle PSTricks (and eps,png,jpg,...). Jun 2, 2011 at 13:01

There is a reason: pdflatex's lack of support for eps figures. If you have a program that only outputs eps graphics and wants to include them in your document, the best alternative is to use latex + dvipdf; if you use pdflatex you have to convert them somehow, and the most practical way is to use epstopdf, whose output is underwhelming.

EDIT: My point is: the pdf outputted by epstopdf is buggy and ugly; so if you can't generate the picture in pdf, your best shot is using latex instead of pdflatex.

• It's way easier to create EPS from a program than to create PDF. Plus EPS file are editable with a texteditor if your picture is vector graphics and you know what you're doing.
– lhf
Sep 6, 2010 at 18:43
• epstopdf seems to make this answer irrelevant? Sep 6, 2010 at 20:16
• Not only that, but starting with TeXlive 2010, epstopdf will be called automatically when you run pdflatex, so for all intents and purposes, pdflatex will support .eps. (XeLaTeX already does.) Sep 6, 2010 at 20:28
• Taco is writing a PostScript interpreter in Lua (escrito.luatex.org), so I think it is going to eliminate the stated two reasons (PStricks and EPS) for luatex based formats). Sep 7, 2010 at 9:43
• it's not just that pdflatex doesn't have support for eps figures. once inside a pdf file, it may not be possible to determine what's a figure and what's text. so a check for, say, line thickness (very thin lines disappear in printing) is no longer possible. but that's easy with dvi+eps. Sep 7, 2010 at 16:29

Some of the journals I use require figures to be submitted separately in eps or tiff format, so that they can deal with not just the latex work, but also the archiving of the figures in higher resolution for the journal website. I don't know why they prefer eps and tiff to pdf, but they do, and they are "the boss".

• Some humanities journals don't even accept submissions in LaTeX, so consider yourself lucky that the journals you use are savvy enough to even think of specifying what image formats to use... Sep 8, 2010 at 12:34

There is another reason: PDF files produced with latex and dvipdfmx are much smaller than those produced with pdftex. The reason is that dvipdfmx embeds fonts as CFF (Compact Font Format). For short texts the difference is big. You can achive the same (and more, such as image compression) by using pdfsizeopt. I always use dvipdfmx instead of pdflatex. A short text that has 73 KB with pdflatex has only 9 KB with latex and dvipdfmx.

• For this reason, the ouptut of latex+dvipdfmx can also appear better on certain viewers. Nov 3, 2016 at 0:19

One reason I can think of: xdvi is supposed to support reverse search (a.k.a. inverse search). I.e. you click in xdvi on some text and directly jump to the corresponding location in the text-editor.

I never tried it, but it sounds neat.

It seems that some xdvi clones support that feature for dvi files, too.

I guess that current PDF viewer/pdflatex combinations does not support reverse search ...

• See the question tex.stackexchange.com/questions/2006/… . SumatraPDF is said to support it. Sep 7, 2010 at 20:03
• TeXWorks, Evince and Okular also support reverse search, if you are using a sufficiently recent engine with synctex support (all the popular three engine have synctex support for a while now). Sep 8, 2010 at 2:08
• @Khaled: Cool, do you have some nice link in your back pocket that show how to use synctex and reverse search? Sep 8, 2010 at 5:31
• @Johan: You need to activate synctex for your document by either passing --synctex=1 at command line or the primitive \synctex=1 in your document, how to reverse search now depends on your viewer/editor (in TeXWorks you press ctrl while clicking the target either in source or pdf). Sep 8, 2010 at 9:54
• I must try that :) Sep 8, 2010 at 15:17