TeX's error messages are reminiscent of the time when TeX itself was conceived (the 1970s): they're not terribly user-friendly, though they do contain all the information that TeX can offer, usually in a pretty concise way.
TeX's error reports all have the same structure:
The context of the error is a stylised representation of what TeX was doing at the point that it detected the error. As noted in approaching errors, a macro package can tell TeX how much context to display, and the user may need to undo what the package has done. Each line of context is split at the point of the error; if the error actually occurred in a macro called from the present line, the break is at the point of the call. (If the called object is defined with arguments, the "point of call" is after all the arguments have been scanned.) For example:
\blah and so onproduces the error report
! Undefined control sequence. l.4 \blah and so onwhile:
\newcommand{\blah}[1]{\bleah #1} \blah{to you}, folksproduces the error report
! Undefined control sequence. \blah #1->\bleah #1 l.5 \blah{to you} , folksIf the argument itself is in error, we will see things such as
\newcommand{\blah}[1]{#1 to you} \blah{\bleah}, folksproducing
! Undefined control sequence. <argument> \bleah l.5 \blah{\bleah} , folks
The prompt accepts single-character commands: the list of what's
available may be had by typing ?
. One immediately valuable
command is h
, which gives you an expansion of TeXs original
précis message, sometimes accompanied by a hint on what to do to
work round the problem in the short term. If you simply type 'return'
(or whatever else your system uses to signal the end of a line) at the
prompt, TeX will attempt to carry on (often with rather little
success).
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=errstruct