[Tex/LaTex] How to produce only dvi file with latex on Mac

bibtexmactexpdftex

Recently, I switched to MacTex, I somehow get used to run the following sequence on a Windows command terminal:

  1. latex *.tex ->generate only dvi file
  2. bibtex *.aux
  3. latex *.tex
  4. dvipdfm *.dvi ->generate the final pdf file

However, now when I launch a terminal on Mac(Yosemite), running latex *.tex
would directly generate the final pdf without the intermediate steps, seems to me "latex" is hardlinked to a combination of commands? Is there a way to follow the same steps as I used to ?

Best Answer

The latexprogram is actually pdflatex running in dvi mode. According to latex --help, the output format can be set with

-output-format=FORMAT   use FORMAT for job output; FORMAT is `dvi' or `pdf'

So you can try to force the dvi output by compiling with:

latex file.tex -output-format=dvi

What you have though actually does the same, if latex is giving you a pdf file, and if that's what you want, you can just run latex,bibtex,latex,latex and it will give you the right pdf file, so unless you specifically want the dvi file there's no any reason to produce it.

Related Question