TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I start latex via the commandline with latex filename. What do I have to do to get a pdf instead of a dvi?

share|improve this question
up vote 13 down vote accepted

pdflatex filename

share|improve this answer

If you have to pass a switch for some strange reason, latex -fmt pdflatex filename should do the same thing as pdflatex filename.

share|improve this answer

In addition, there's also latex -output-format pdf and latex &pdflatex file.tex, where the ampersand might need escaping according to your shell, or having %&pdflatex as the first line of your input file. OK, did we get them all?

share|improve this answer
+1 tradition: I haven't seen &format in a while. This has to occur after all switches. – Charles Stewart Nov 30 '10 at 18:14
How about latex '\pdfoutput=1 \input file'? – Lev Bishop Nov 30 '10 at 19:35
@Lev Bishop: good one. – Ulrich Schwarz Nov 30 '10 at 19:52

You can also run latex file.tex and then do a dvipdf file.dvi on the resulting dvi file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.