Is it possible to compile a *TeX document with a single command?

No. Because of the nonlinear flow of cross referencing, you always need multiple passes, and TeX is not designed to perform them in one go. Even LuaTeX can only (at time of writing) perform a single pass of typesetting.

ConTeXt uses LuaTeX as a scripting language to compile its documents as necessary until everything converges, but it still consists of multiple typesetting passes.

For LaTeX things are rather more archaic; recently, Philipp Lehman has written a package called logreq to help indicate when more compilations and other programs need to be run.


Sure ... it is even surprisingly easy:

$ pdflatex --fmt=pdftex --shell-escape '\write18{pdflatex hello}\write18{bibtex hello}\write18{pdflatex hello}\bye'

But kidding aside, the answer is no, realistically. As Will, Patrick and TH wrote already, the macro format needs to support it, and there are (in practise) no macro packages that do that.


Have you looked at latexmk?

http://www.phys.psu.edu/~collins/software/latexmk-jcc/