28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

404 Appendix C. Error Messages<br />

problem. Following are one or more lines of input text. The last symbol<br />

of the first of these lines is the one that has caused T E X <strong>to</strong> s<strong>to</strong>p <strong>and</strong> print<br />

the error message. The last line contains the text or comm<strong>and</strong>s that are<br />

the next <strong>to</strong> be processed. T E X waits for a response from the user. If<br />

that response is the typing of an H for help, a more detailed description,<br />

with possible tips, is printed <strong>to</strong> the moni<strong>to</strong>r, <strong>and</strong> T E X waits for a further<br />

response.<br />

C.1.2 L AT E X error messages<br />

As an example of a text with a L AT E X error, we take<br />

\documentclass{article}<br />

\begin{document}<br />

\begin{qoute}\slshape<br />

Text indented at both ends<br />

\end{quote}<br />

\end{document}<br />

Here the call \begin{quote} was incorrectly typed as qoute. The L AT E X<br />

processing writes the error message:<br />

! <strong>LaTeX</strong> Error: Environment qoute undefined.<br />

See the <strong>LaTeX</strong> manual or <strong>LaTeX</strong> Companion for explanation.<br />

Type H for immediate help.<br />

...<br />

l.3 \begin{qoute}<br />

\slshape<br />

?<br />

The first line of this message states that L AT E X itself discovered this error,<br />

with a brief error indica<strong>to</strong>r, in this case Environment qoute undefined.<br />

All L AT E X error messages begin with a line like this, followed by a reference<br />

<strong>to</strong> the L AT E X manuals for detailed explanation (which is also <strong>to</strong> be found<br />

in Section C.3 of this book). The third line of text is a reminder that the<br />

response H 〈return〉 will also type additional clarification.<br />

The line of three dots ... indicates that there are more lines of internal<br />

! coding that have been suppressed. Sometimes it is desirable <strong>to</strong> look deeper<br />

behind the error message, especially for practiced T E Xperts who know how <strong>to</strong><br />

interpret them. In this case, L AT E X can be made <strong>to</strong> output the missing lines of<br />

coding by setting<br />

\setcounter{errorcontextlines}{num}<br />

where num is the number of levels a macro will be decoded on an error. By<br />

default, num = −1. The knowledgeable user can set it <strong>to</strong> 99 <strong>to</strong> get more lines<br />

than he or she will ever likely <strong>to</strong> want.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!