Synopsis (from a terminal command line):
pdflatex options argument
Run LaTeX on argument. In place of
pdflatex you can
For example, this will run LaTeX on the file thesis.tex, creating the output thesis.pdf.
Note that .tex is the default file name extension.
pdfTeX is an extension of the original TeX program, as are
XeTeX and LuaTeX (see TeX engines). The first two are
completely backward compatible and the latter, almost so. Perhaps the
most fundamental new feature for all three is that the original TeX
output its own DVI format, while the newer ones can output directly to
PDF. This allows them to take advantage of the extra features in PDF
such as hyperlinks, support for modern image formats such as JPG and
PNG, and ubiquitous viewing programs. In short, if you run
lualatex then you
will by default get PDF and have access to all its modern features.
If you run
dvilualatex, then you will get
DVI. The description here assumes pdfLaTeX.
See Command line options, for a selection of the most useful command line options. As to argument, the usual case is that it does not begin with a backslash, so the system takes it to be the name of a file and it compiles that file. If argument begins with a backslash then the system will interpret it as a line of LaTeX input, which can be used for special effects (see Command line input).
If you gave no arguments or options then
pdflatex prompts for
input from the terminal. You can escape from this by entering
If LaTeX finds an error in your document then by default it stops and asks you about it. See Recovering from errors, for an outline of what to do.
|• Command line options||Commonly used command line options.|
|• Command line input||Specify LaTeX code on the command line.|
|• Recovering from errors||When something goes wrong.|