# LaTeX General Help

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 two files as output, a Device Independent (DVI) file that contains commands that can be translated into commands for a variety of output devices, and a transcript' or log file' that contains summary information and diagnostic messages for any errors discovered in the input file.

For a description of what goes on inside TeX, you should consult The TeXbook by Donald E. Knuth, ISBN 0-201-13448-9, published jointly by the American Mathematical Society and Addison-Wesley Publishing Company.

For a description of LaTeX, you should consult "A Document Preparation System: LaTeX" by Leslie Lamport, ISBN 0-201-15790-X, published jointly by the American Mathematical Society and Addison-Wesley Publishing Company.

## Structure of a LaTeX document

LaTeX files are plain text files produced by either a vanilla text editor or by a special TeX (or LaTeX) editor. Typesetting instructions are inserted into the text.

Every LaTeX file starts with a preamble which is followed by the body. The preamble is a collection of commands that specify the global processing parameters, such as paper format, heigth and width of the text, automatic page heads and footlines. As a minimum, the preamble must contain the \documentclass command to specify the document's overall processing type This is normally the first command in the preamble.

The preamble is followed by the body which starts by \begin{document} and ends with \end{document}. This is the end of the file as well.

The general syntax of a LaTeX file is as follows:

   \documentclass[options]{class}
Further optional global commands and options,
such as \usepackage{packagename}
\begin{document}
text mixed with typesetting commands
\end{document}


## Commands

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.

NOTE: LaTeX is case sensitive. Enter all commands in lower case unless explicitly directed to do otherwise.