summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-missbegdoc.html
blob: 75ea344241525515f459f65b34945c4e9e20bf70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<head>
<title>UK TeX FAQ -- question label missbegdoc</title>
</head><body>
<h3>Missing <code>\</code><code>begin</code><code>{document}</code></h3>
<p/>Give it a file of plain text, or a LaTeX file that really does have no
<code>\</code><code>begin{document}</code> command in it, and LaTeX will produce
this error, quite correctly.  LaTeX <em>needs</em>
<code>\</code><code>begin{document}</code> so as to know when to execute the commands
that finish off the document preamble.
<p/>Other than that, the error can occur as a result of an error of yours,
of a corrupt <code>.aux</code> file, or of a buggy class or package.
<p/>The errors you might commit are absent-mindedly typing a document
command (such as <code>\</code><code>section</code>) in the preamble of your document,
missing the comment marker from the beginning of a line, or giving too
many arguments to one of the setup commands related to the class or a
package that you have loaded.
<p/>A corrupt <code>.aux</code> file might be due to any number of things;
delete the file and to run LaTeX again, twice.  If the error
recurs, it&rsquo;s probably due to a buggy class or package.
<p/>If the error occurs while LaTeX is reading a class or package, then
there&rsquo;s probably a bug in the file.  The author of the class or
package stands the best chance of finding the bug, but with luck you
(or someone you ask on a mailing list or on <i>comp.text.tex</i>)
will be able to spot the problem and provide a work-around.  Always
report such bugs, even if you have found a work-around.
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=missbegdoc">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=missbegdoc</a>
</body>