1 Overview of LaTeX
The LaTeX command typesets a file of text using the TeX program
and the LaTeX “macro package” for TeX. To be more specific,
it processes an input file containing the text of a document with
interspersed commands that describe how the text should be formatted.
It produces at least three files as output:
- A main output file, which is one of:
- If invoked as latex, a “Device Independent” (.dvi)
file. This contains commands that can be translated into commands for
a variety of output devices. You can view such .dvi output of
LaTeX by using a program such as xdvi (display directly)
or dvips (convert to PostScript).
- If invoked as pdflatex, a “Portable Document Format”
(.pdf) file. Typically, this is a self-contained file, with
all fonts and images embedded. This can be very useful, but it does
make the output much larger than the .dvi produced from the
same document.
There are other less-common variants of LaTeX (and TeX) as well,
which can produce HTML, XML, and other things.
- A “transcript” or .log file that contains summary information and
diagnostic messages for any errors discovered in the input file.
- An “auxiliary” or .aux file. This is used by LaTeX itself, for
things such as sectioning.
A LaTeX command begins with the command name, which consists of a
\
followed by either (a) a string of letters or (b) a
single non-letter. Arguments contained in square brackets, []
,
are optional while arguments contained in braces, {}
, are
required.
LaTeX is case sensitive. Enter all commands in lower case unless
explicitly directed to do otherwise.