Wednesday, April 16, 2008

Compiling LaTeX on Windows: An alternative method

The usual method to compile latex is by using "latex" command, and if the latex file contains bibliography, it will be a very tedious and repetitive job.

To produce a dvi file:
latex yourfile.tex
bibtex yourfile.tex
latex yourfile.tex
latex yourfile.tex

To produce a pdf file:
pdflatex yourfile.tex
bibtex yourfile.tex
pdflatex yourfile.tex
pdflatex yourfile.tex

However, for the windows user, with Miktex, there is an alternative that could simplify all those tasks - the texify.

To produce a dvi file"
texify yourfile.tex

To produce a dvi file and clean all the auxilary files:
texify -c yourfile.tex

To produce a pdf file (to clean all the auxilary files, just add -c as above):
texify -p yourfile.tex

To produce a dvi file and run the default viewer (add -p for pdf)
texify yourfile.tex --run-viewer