next up previous contents
Next: TeX errors Up: Error Messages Previous: Error Messages

LaTeX errors

There are two kinds of errors: LaTeX errors and TeX errors. TeX is the language in which LaTeX is written, and some of the basic errors come from there. All errors have an error message which starts with an exclamation point. A LaTeX error can be distinguished from a TeX error by the following:

LaTeX error.  See LaTeX manual for explanation.
              Type  H <return>  for immediate help.
The error message is printed on the next line, followed by the cryptic message
\@latexerr ...for immediate help.}\errmessage {#1}
This line should be ignored. The next line 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.

! Undefined control sequence.
l.7 \auhtor{The Student Information Processing Board}

The command \auhtor on line seven is misspelled and so LaTeX does not recognize it. If LaTeX does not recognize a command you used, but you think it exists, check the documentation again to make sure you are using the command correctly.

!  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.


next up previous contents
Next: TeX errors Up: Error Messages Previous: Error Messages

sepherke
Sat Mar 21 21:20:00 EST 1998