! LaTeX error: <error message here> See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ...The error message is printed on the next line, which starts with a number and then the text of the line that caused the error. The part of the number after the decimal point is the line number where the error occurred. If you cannot figure out what the problem is by looking at the error message, you can go to the offending line in the original document and look at it. The problem may lie a few lines above the one which LATEX complained about. The error message should make more sense after you have looked at the offending text.
Some of the more common error messages are:
! \begin{...} ended by \end{...}.
This is usually caused by forgetting to end an environment which
was started by a \begin
command.
! Can be used only in preamble.
Certain commands can only be entered before the
\begin{document}
statement. This part of the file
is called the ``preamble.'' Move the offending statement
to the preamble and try again.
! Environment ... undefined.
An environment defined in a \begin
or \end
statement is not recognized. This is usually caused by a spelling
error.
! Missing \begin{document}.
All files must have a \begin{document}
before any
text which is intended to be printed.