summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-errstruct.html
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-errstruct.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-errstruct.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-errstruct.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-errstruct.html
new file mode 100644
index 00000000000..5f29857452f
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-errstruct.html
@@ -0,0 +1,75 @@
+<head>
+<title>UK TeX FAQ -- question label errstruct</title>
+</head><body>
+<h3>The structure of TeX error messages</h3>
+<p/>TeX&rsquo;s error messages are reminiscent of the time when TeX itself
+was conceived (the 1970s): they&rsquo;re not terribly user-friendly, though
+they do contain all the information that TeX can offer, usually in
+a pretty concise way.
+<p/>TeX&rsquo;s error reports all have the same structure:
+<ul>
+<li> An error message
+<li> Some &lsquo;context&rsquo;
+<li> An error prompt
+</ul>
+The error message will relate to the <em>TeX</em> condition that is
+causing a problem. Sadly, in the case of complex macro packages such
+as LaTeX, the underlying TeX problem may be superficially
+difficult to relate to the actual problem in the &ldquo;higher-level&rdquo;
+macros. Many LaTeX-detected problems manifest themselves as
+&lsquo;generic&rsquo; errors, with error text provided by LaTeX itself (or by a
+LaTeX class or package).
+<p/>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
+<a href="FAQ-erroradvice.html">approaching errors</a>, 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 <em>actually</em> 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 &ldquo;point of call&rdquo;
+is after all the arguments have been scanned.) For example:
+<pre>
+\blah and so on
+</pre>
+produces the error report
+<pre>
+! Undefined control sequence.
+l.4 \blah
+ and so on
+</pre>
+while:
+<pre>
+\newcommand{\blah}[1]{\bleah #1}
+\blah{to you}, folks
+</pre>
+produces the error report
+<pre>
+! Undefined control sequence.
+\blah #1-&gt;\bleah
+ #1
+l.5 \blah{to you}
+ , folks
+</pre>
+If the argument itself is in error, we will see things such as
+<pre>
+\newcommand{\blah}[1]{#1 to you}
+\blah{\bleah}, folks
+</pre>
+producing
+<pre>
+! Undefined control sequence.
+&lt;argument&gt; \bleah
+
+l.5 \blah{\bleah}
+ , folks
+</pre>
+<p/>The prompt accepts single-character commands: the list of what&rsquo;s
+available may be had by typing <code>?</code>. One immediately valuable
+command is <code>h</code>, which gives you an expansion of TeXs original
+pr&eacute;cis message, sometimes accompanied by a hint on what to do to
+work round the problem in the short term. If you simply type &lsquo;return&rsquo;
+(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).
+<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=errstruct">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=errstruct</a>
+</body>