The l2h help pages |
|
© Leon van Dommelen |
|
The latest version of this document is online at
eng.famu.fsu.edu or at
dommelen.net.
Errors while processing latex files
This web page tries to give some help with error messages that may pop
up while processing your latex file index.tex.
Now don't get scared. I cannot remember ever seeing most of these
errors and I have been using TeX and LaTeX for all my documents a
quarter century or so. (Then again, my memory definitely does not
extend over a quarter century. More like a quarter hour nowadays.)
And almost all the complicated errors are self-inflicted. Or
professor-inflicted. If you do not make your own problems, the
problems will probably be typos and forgotten {, }, or $ characters.
Or often you forget a \ before a special character that needs one.
(At least, I do this often.)
However, if your admirable professor tells you that he or she would
like the page numbers in Egyptian hieroglyphs in the middle of the
page, go for it! Ask your beloved professor to help you get this just
perfectly right. Don't leave the professor\rq{}s office until it is
done. (Visit early in the morning, of course.)
Other than that very important observation, this web page needs work.
However, some of it may already be useful. On first use, be sure to
read the first two entries of the contents below (excluding this
preface).
If you have any errors that would be good to include here, please
e-mail them to me. You will be helping other LaTeX users, even those
that do not use l2h. If you can paste them directly from the log
file, (so that the log file reader can recognize them), it would be
even better. And so it would if you can also give a solution to the
problem.
When your latex file, index.tex, is processed, errors may be found.
On a serious error, processing stops. An error message will be
printed, preceded by a !. The line number in your latex file at which
the error is discovered is printed before the message,
following an l.
To be sure, the error might not be in your own index.tex file. It may
be in a package you load. Then the filename of that package will have
been printed earlier following a "(", one that is not yet closed by a
")". Now packages by themselves do not have errors. I hope. But
when you load several different packages, and you will, they might
conflict. Then there is not much you can do except try to change the
order in which the packages are loaded. If that does not help, you
will need to live without one of the packages. Fortunately, such
problems are rare, and mostly restricted to recently developed
packages. So the discussion here assumes that the error is in your
index.tex file.
The first thing to do is to read the error message. Then read the
line number at which it was found. Look in your tex file at and
maybe before that line number and try to find an error. (See the
next entry for some general rules in doing so.)
After you have found the error, you can correct it in your tex file.
But do not save. Processing can get really weird if the file
changes while it is still being processed. Also, if you make changes,
note that this may change the line numbers. The processing will still
print the line numbers of the original file.
After hopefully identifying and correcting each error, hit Enter in
the processing window. Note that one error often causes more than one
error message. The additional error messages should disappear too the
next time you process the file.
If there are countless error messages, the best thing may be to enter
a "q" or "x" at the ? prompt. Then after having saved your
corrections so far, reprocess. Hopefully there will not be that many
problems anymore.
Also, processing can get very nasty if latex tries to open some file
and cannot find it. If you get stuck, try hitting "c" or "d" while
holding down Ctrl. Or try to specify a junk file name like
"/dev/null" or "nul".
See also
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=erroradvice
There are some general tricks to identify errors.
Use the "a" key to get a list of all errors. Maybe another error
message can clarify the problem.
Remember the special characters. To get an actual %, you need
\%. (That is a mistake even experienced latex users still make
regularly.) For an & you need \&, for a # you need \#, for a
\ you need \backslash, (\\ is new line), for a printed { you need \{,
and for } you need \}. However, [ and ] are normal, while \[ and \]
surround math.
Except in mathematics, the characters ^ and _ are illegal too, and <
and > will not do what you think they should. A * or [ immediately
behind \\ will cause problems. The trick is then to enclose that
following stuff between { and }.
Look carefully for typos. A 1 may resemble an l, a ) a }, etcetera.
Carefully identify for each { the corresponding } that closes it.
Check that \begin{something} is closed by \end{something}, not
\end{somethingelse}.
Try to find the error message on this web page and see whether that
gives a useful hint. (But there are almost infinitely many possible
problems for a single error message; this page cannot list them all.
Using you intuition is often the best guide to what is wrong.)
Try to temporarily remove the apparently problematic command or
environment. Does the problem disappear? If so, you know where the
problem is.
But it is not uncommon for even experienced latex users to get stumped
by an error. In that case, a divide and conquer approach may be your
best bet.
Try enclosing the general problem area between \begin{comment} and
\end{comment} lines. The enclosed area will no longer be processed.
So if your error is indeed in the selected area, the processing error
should disappear. (If it does not disappear, select a bigger area).
After you have identified the problem area, move roughly half of it
outside the comment block. (Of course, select complete units. Do not
break groupings, or you create additional errors.) If the error
reappears, it is in that half. If not, it is in the other half.
Either way, you have narrowed down the problem area by a factor 2.
Move everything out of the comment block. Then put about half of the
now identified smaller problem area back inside. If the error is in
that half, it will not show up. In the other half it will. That
allows you to narrow the problem area even more closely. And so on
until the problem area is so small that there is only one possible
cause to the error left.
Of course, then you will notice that the problem was trivial, and you
should have seen it in a second. No need for all this chopping into
pieces. When you know the answer, the problem is always simple.
List of error descriptions
No error message. Just shows a * and sits there
Latex did not see an \end{document} line. It is patiently waiting
for whatever other exciting stuff you have planned for it.
- Check that you have a correctly spelled \end{document}.
- Check that \end{document} is not hidden behind something like an
\endinput line.
- Check that you are indeed processing the index.tex file that you
think you are processing. (Create an error right at the start of the
file if you have to.)
- If stumped, try the general tricks.
No error message. But bad links in the pdf side bar.
Sometimes the pdf has bad links in the sidebar even though no
rerun is requested in the log file.
- Run latex once more. L2h will complain, but just hit "c" to
continue. Then run "p" as needed. That fixed it for me.
- Sometimes the link of an \addcontentline command goes to the end
of the previous chapter instead of the start of the new chapter (which
is an unnumbered \chapter*{...} chapter). In that case, make sure the
thing is formatted as follows:
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{Title of whatever}
\chapter*{TITLE OF WHATEVER}
The additional first two commands will hopefully fix things.
==> Fatal error occurred, the output PDF file is not
finished!
This just tells you the pdf was not made.
- Look for the earlier error message that gives the reason.
- If stumped, try the general tricks.
! ==> Fatal error occurred, no output PDF file
produced!
This just tells you the pdf was not made.
- Look for the earlier error message that gives the reason.
- If stumped, try the general tricks.
(end occurred inside a group at level nnn)
Something was not properly closed when the end of the file was reached.
- Look for a { bracket that has never been closed by a }.
- Look for other things that may not have been closed, like
environments, math, etc.
- If a pdf was created, or can be created, look at the end of the
document in the pdf for clues. If, say, an {\it was not closed,
things will be in italics.
- If stumped, try the general tricks.
(end occurred when if... on line nnn was incomplete)
Unless you write your own latex code, you did not close something
or put something in a place latex cannot accommodate it.
- Look for missing } brackets.
- Look for other things that may not have been closed, like
environments, math, etc.
- If stumped, try the general tricks.
(Fatal format file error; I'm stymied)
From the TeX FAQ:
The commonest cause of the message, is that a new binary has been
installed in the system: no two TeX binaries on the same machine can
understand each other’s formats. So the new version of TeX you have
just installed, won’t understand the format generated by the one you
installed last year.
Resolve the problem by regenerating the format; of course, this
depends on which system you are using.
From the web:
I first tried the fmtutil command as root [administrator] again and
it still didn't work. Then I ran the command as normal user and now
everything works.
Please type a command or say `\end'
TeX has nothing to do and asks you what it should do. You will get
this error, for example, if you run latex interactively on an empty
latex source file. Since in the l2h shell you do not run latex
interactively, you should not get this error there. (Just an
"emergency stop" one.)
- Say `\end'? (Actually, I got an "TeX capacity exceeded, sorry" error
on that. But it did end the program.)
! A <box> was supposed to be here
In LaTeX, boxes are created by \newsavebox, given content by
\savebox, and used by \usebox. Plain TeX uses \newbox, \setbox,
\copy, etcetera.
- Check that your \savebox or \usebox has a box in its first
argument.
- If stumped, try the general tricks.
! Ambiguous; you need another { and }
Compare the items on double subscripts and superscripts.
- Try adding a couple of brackets, I guess.
- If stumped, try the general tricks.
! Argument of ... has an extra }
- Did you use a fragile command, like \footnote or \parbox, in a
place it should not be? Like in a \caption? If you really need it
there, try putting \protect right in front of it.
- A misused \frac command, like \frac{1,2} can cause this.
- Apparently, some commands inside fragile commands can cause this.
Try temporarily removing the content and see whether the error
disappears.
- If stumped, try the general tricks.
! Arithmetic overflow
Something went wrong deep inside the processing program.
- Check for unusual constructs.
- If stumped, try the general tricks.
! Bad character code
The character code of a normal character was specified outside the
valid range from 0 to 127.
- Check for \lccode or \uccode commands.
- If stumped, try the general tricks.
! Bad delimiter code
A numeric delimiter code must be between 0 and 2^{24}-1, (\delcode)
or 2^{27}-1 including the class number (\delimiter).
- If stumped, try the general tricks.
! Bad math code (...).
A numeric math code was specified outside the valid range
from 0 to 32767.
- Check for \mathchardef commands.
- If stumped, try the general tricks.
! Bad mathchar
A math character with a code outside the valid range from 0 to
32767 was encountered.
- If stumped, try the general tricks.
! Bad node name: `...'.
An error in the pstricks package. A node name must only contain
letters and digits and start with a number.
- Change the name.
- If stumped, try the general tricks.
! Bad number ...
Latex expected a number, but did not get a valid one.
- Careful examination of the correct form of the command listed will
usually show up the problem.
- If stumped, try the general tricks.
! Bad register code
Gee.
- If stumped, try the general tricks.
! Bad space factor
Gee.
- Something wrong with a \hfil[l] or \vfil[l]?
- If stumped, try the general tricks.
! Counter too large
One counter that is fairly likely to run out is the footnote one.
There are only so many footnote marks, after all. (9 symbolic ones,
to be precise.)
- Too many footnotes?
- Too many \thanks commands?
- Converting a counter > 26 to a letter a-z can also cause this
error.
- If stumped, try the general tricks.
! Dimension too large
I think this means a length is specified that is larger than
possible.
- If stumped, try the general tricks.
! Discretionary list is too long
A \discretionary line break has 3 parameters: text before the line
break, text after the line break, and text if there is no line break
in the first place.
- Check that it hhas three {...} parameters of reasonable size.
- If stumped, try the general tricks.
! Display math should end with $$.
Actually, in latex you should use \[ and \] instead of $$ and $$.
Or better, use \begin{displaymath} and \end{displaymath}.
- Change to one of the correct forms. Then you know
what begins math and what ends it.
- Math may not contain blank lines. If you leave a single blank
line in an equation, it will generate the error message
! Missing $ inserted, followed by
! Display math should end with $$. followed
by ! LaTeX Error: Bad math environment
delimiter. Remove the blank line and all three error messages
should disappear.
- Now latex2html has a nasty habit of leaving blank lines when it
removes the labels from equations. These errors will then show up in
its math images processing. In particular, they will show up in
images.log. To fix this, put the \label{...} in equations at the end,
followed by a %. Furthermore, leave some mathematics on the same
line, before the \label{...}%.
- Use of $$ inside equation mode can cause this, I hear.
- If stumped, try the general tricks.
! Double subscript
If you think about it, {a_b}_c is not the same as a_{b_c}.
In the first case, c is a subscript to the complete expression a_b.
In the second case, it is a subscript to the subscript b only. So in
the second case, c should be a lot smaller than b. In the first case,
it must be at least as big as b. TeX needs to know which case it
is.
- Add the brackets already.
- If stumped, try the general tricks.
! Double superscript
If you think about it, {a^b}^c is not the same as a^{b^c}.
In the first case, c is a superscript to the complete expression a^b.
In the second case, it is a superscript to the superscript b only. So
in the second case, c should be a lot smaller than b. In the first
case, it must be at least as big as b. TeX needs to know which case
it is.
- Add the brackets already.
- Note that in math, ' is a superscript too. (It is really the same
as ^\prime.)
- If stumped, try the general tricks.
! Duplicate pattern
I assume this refers to hyphenation patterns. In that case, you
should never see it unless you are an expert.
- If stumped, try the general tricks.
! Emergency stop
Tex got in trouble. The actual error may be much earlier.
- You will see this error when LaTeX cannot find a file in an
\input or \include type statement.
- You will see this error when LaTeX cannot find the \end{document}
line. Check its presence and spelling.
- If stumped, try the general tricks.
! Extra \right
A \right, which must precede some bracket or a point,
must match an earlier \left.
- I tend to get my \left and \right mixed up.
- Missing/misspelled \end{array}?
- If stumped, try the general tricks.
! Extra alignment tab has been changed to \cr
You put in too many & characters in a single row in your table
or array or matrix. Each & should separate two columns. (Note that
what TeX calls \cr is what LaTeX calls \\. TeX has started a new row
to fix things up.)
- Is the & count right?
- Did you mean \& somewhere?
- Did you forget or mistype \\ at the end of the previous row?
- Did you use an invalid range in a \cline?
- Too large a count in a \multicolumn?
- Is there something wrong in the column specifications?
Check p and @ commands for correctness.
- If stumped, try the general tricks.
! Extra \....
There is something not matching something else, like maybe a \fi,
\or, or \else not matching an earlier \if. Unless you write your own
TeX code, that would probably mean that something has been put in the
wrong place.
- Check for unusual constructs.
- If stumped, try the general tricks.
! Extra }, or forgotten $
There is some problem with figuring out what begins or ends
what.
- Unlike what it says, check not only that there is a { for each },
and a $ for each $, but also a \[ for each \] and a \( for each \).
And that they are properly nested: {\small $a}=b$ is wrong. You must
close the math before closing the { with }.
- If stumped, try the general tricks.
! File ended while scanning use of \end.
You did not close something properly. May be just a forgotten }.
LaTeX has now reached end of file without finding the closing
bracket.
- Check the indicated problem area for { that may have forgotten }.
- If stumped, try the general tricks.
! File ended within ...
You did not close something properly. May be just a forgotten
} or \end{...}.
- If stumped, try the general tricks.
! Font ... not loadable: Bad metric (TFM) file.
A needed font seems to be corrupt.
- Error in the font specification?
- Try to reinstall the font?
- Try to use a different font?
! Font ... at ... not loadable: Metric (TFM) file not
found.
A needed font is not found.
- Error in the font specification?
- Try to install the font?
- Try to use a different font?
- You get this error if you try to use plain latex to process a
template set up for xelatex. Check the value of \pdfengine or
\webengine.
! Font ... not loadable: Metric (TFM) file not found.
A needed font is not found.
- Error in the font specification?
- Try to install the font?
- Try to use a different font?
- Are you using plain latex where xelatex is needed? Check the
value of \pdfengine or \webengine.
! Font ... not loadable: Metric (TFM) file or installed
font not found.
A needed font is not found.
- Error in the font specification?
- Try to install the font?
- Try to use a different font?
- Are you using plain latex where xelatex is needed? Check the
value of \pdfengine or \webengine.
! Font ... not loaded; Not enough room left
I do not think that should happen with an up-to-date version of
LaTeX.
- Do you really need all these fonts?
- There are ways to process a document in parts. That is described
in Lamport's LaTeX User's guide & Reference Manual.
! fontspec error: "font-not-found"
The fontspec package cannot find the specified font.
- Did you mistype the font name?
- Does the font exist? Use the "Character Map" program to check.
If it does not, maybe you can install it.
! Forbidden control sequence found
- Try removing it?
- If stumped, try the general tricks.
! Huge page cannot be shipped out
Never seen this one in my life. Doubt that it would happen with a
modern latex version. Unless there is something really, really,
wrong.
- If stumped, try the general tricks.
! I can't find file `...'
When interactive, typing in the correct file name, or correct
package name, is the best way to proceed. However, latex in the
l2h menu is not interactive and all processing aborts.
- Interactively, LaTeX will be happy as long as it gets any valid
file name.
- Interactively, the way to get LaTeX to stop asking depends on your
operating system and TeX version. Try entering x a couple of times.
Or nul or /dev/null. Or try hitting c while holding down Ctrl.
- Interactive or not, you either have to provide a valid link to an
existing, readable file, or remove the command trying to read it.
- If stumped, try the general tricks.
! I can't go on meeting you like this
Because LaTeX loves you, it feels really bad about all the problems
resulting from your error.
- Fix the problems you have figured out so far and try processing
the latex again.
- If stumped, try the general tricks.
! I can't write on file `...'
Latex wants to create a file, but it cannot do so.
- You may get this error if you have an old version of index.pdf open
in Adobe Acrobat and postcript or pdflatex is trying to create a new one.
You will need to exit Acrobat and then try the "l" or "p" key again.
- No more disk space?
- Are you in a location where you have no privileges to write the file?
- Does someone else, like system, own the file that is to be
replaced?
- If stumped, try the general tricks.
! Illegal magnification has been changed to 1000 (...).
You are not supposed to use \magnification in latex.
- Check that "scaled" font scalings use valid numbers.
- If stumped, try the general tricks.
! Illegal math
TeX is being helpful here. You can do thousands of things wrong in
TeX, and TeX actually reduced the possible problems for you to look
for by a factor 2 or so!
- If stumped, try the general tricks.
! Illegal parameter number in definition of ...
There is a problem with a # parameter while defining something.
- If you mistype \newcommand{\mycommand}[2]{...} as
\newcommand{\mycommand}[1]{...}, references #2 to argument 2 will be
invalid.
- To get an actual #, use \#.
- For a \[re]newenvironment{name}[n]{begin stuff}{end stuff}, the n
parameters cannot be used in end stuff.
- There may be some #1, #2, ... mistyped in a \[re]newcommand or
\[re]newenvironment. (Or in a plain tex \def statement).
- Check that you are not defining something inside defining
something. (Like a \newcommand inside a \renewenvironment, say.)
- If stumped, try the general tricks.
! Illegal unit of measure (pt inserted)
Note that you cannot abbreviate 0in (0 inch), or 0pt (0 points,
i.e. 0/72 inch) as 0. You still need to add "in" or "pt" even if the
length is zero. (Which one of the two obviously does not make a
difference.)
- Like above.
- This one is likely to follow an "Missing number, treated as zero"
error. The missing number is really a missing length.
- Check the proper format of the command you are using.
- If stumped, try the general tricks.
! Improper \hyphenation will be flushed.
Improper parameter to \hyphenation
- Words should be letters and hyphens and separated by spaces.
- If stumped, try the general tricks.
! Improper `at' size (
- If stumped, try the general tricks.
! Improper alphabetic constant
- If stumped, try the general tricks.
! Improper discretionary list
- If stumped, try the general tricks.
! Incompatible glue units
- If stumped, try the general tricks.
! Incompatible list can't be unboxed
- If stumped, try the general tricks.
! Incompatible magnification (
- If stumped, try the general tricks.
! Incomplete \if...; all text was ignored after line nnn.
Unless you write your own LaTeX code, this is propably caused by
something in the wrong place.
- Look for unusual constructs.
- If stumped, try the general tricks.
! Infinite glue shrinkage found in ...
- If stumped, try the general tricks.
! Infinite glue shrinkage inserted from
- If stumped, try the general tricks.
! Insertions can only be added to a vbox
- If stumped, try the general tricks.
! Interruption
- If stumped, try the general tricks.
! Invalid code (
- If stumped, try the general tricks.
! LaTeX Error: Bad \line or \vector argument.
You put something invalid behind \line or \vector inside a picture
environment
- Try looking
at
http://en.wikibooks.org/wiki/LaTeX/Picture.
- If stumped, try the general tricks.
! LaTeX Error: Bad math environment delimiter.
Are your { and } braces matched? Is \[ or \( closed by \] or \)?
Are you entering math mode while already in it?
- Check properly opening and closing of math environments.
- Math may not contain blank lines. If you leave a single blank
line in an equation, it will generate the error message
! Missing $ inserted, followed by
! Display math should end with $$. followed
by ! LaTeX Error: Bad math environment
delimiter. Remove the blank line and all three error messages
should disappear.
- Now latex2html has a nasty habit of leaving blank lines when it
removes the labels from equations. These errors will then show up in
its math images processing. In particular, they will show up in
images.log. To fix this, put the \label{...} in equations at the end,
followed by a %. Furthermore, leave some mathematics on the same
line, before the \label{...}%.
- A missing \right after an array can cause this error.
- If stumped, try the general tricks.
! LaTeX Error: Bad use of \\
A \\ new line command is in an unallowed position.
- Remove the \\?
- If stumped, try the general tricks.
! LaTeX Error: \begin{...} ended by \end{...}
- Check for typos in ... Check that you did not forget a \begin{..}
or \end{...}.
- If stumped, try the general tricks.
! LaTeX Error: Can be used only in preamble.
Things like \usepackage can only be used before the
\begin{document} line. In particular, \documentclass must be the
first line, way before \begin{document}.
- Make sure you do not have two \begin{document} lines.
- If stumped, try the general tricks.
! LaTeX Error: \caption outside float
A \caption must inside a "float" like a figure or a table.
- Is the \begin{figure) or \begin{table} of the caption environment
properly spelled?
- If stumped, try the general tricks.
! LaTeX Error: Command ... already defined
A new command being defined already exists.
- If you are defining a new command here, the name is already used
for something else. Change it. Remember that LaTeX is case
sensitive, so simply changing the case will fix things.
- Or to overwrite the old command, use \renewcommand. Warning: this
will get you into big trouble if the overwritten command is an
important one.
- If this occurs during the loading of a package, the package
conflicts with another one. (Not at all unusual.) Try changing the
order of package loading, or forget about one of the two.
- If stumped, try the general tricks.
! LaTeX Error: Command \circle invalid in math mode.
- Like it says? However, you can put a picture environment
inside a mathematics environment. Then you can put the \circle inside
that picture. (As far as the surrounding math mode is concerned, the
entire picture will be just some very big "letter".)
- If stumped, try the general tricks.
! LaTeX Error: Command \end{itemize} invalid in math mode
If you use math mode inside an itemize and forget the closing $,
this will happen.
- Check properly closing of math mode.
- If stumped, try the general tricks.
! LaTeX Error: Counter too large.
- Unless you are defining a very long list, you probably brought
this upon yourself somehow. (Who else is readily available to be
blamed?)
- If you are really defining a long list, make sure it is a top
level list, which is enumerated by arabic numbers. (Or learn how to
define your own lists.)
- If stumped, try the general tricks.
! LaTeX Error: Environment ... undefined.
An attempt to use an environment that has never been defined.
- Check for typos in the \begin{environment} line.
- If it is part of a package, check the corresponding \usepackage
command.
- If stumped, try the general tricks.
! LaTeX Error: File `...' not found
This error is serious because latex will terminate without
finishing the document. The missing file may be a personal file that
you are trying to \input. Or it may be a package you are trying to
load with \usepackage that you do not have installed. If latex is
trying to find a .sty, .cls, or .def file, it is a missing
package.
- If latex is missing a personal file, put it in the same folder as
index.tex. Then do not use a path in the \input statement.
- If latex is missing a package, try finding the file on the web and
put it inside the "texinputs" folder inside "l2h". Note that you may
have to run latex on any .ins or .dtx file you find to get the sty
file.
- If you are running latex though an editor like TeXstudio instead
of through l2h, you may need to copy the files inside the "texinputs"
folder inside "l2h" to the same folder as your document index.tex.
- If your latex is very old, the package might not work. Try to do
without the package. Or upgrade latex to a more recent version.
Rerun install_l2h after that.
- The missing file error is somewhat tricky when making web pages.
While making web pages, latex might be looking for the file in the
wrong folder. In general, make sure that you put your pictures in the
same folder as index.tex. Not somewhere else. Or give latex a
complete, (so-called absolute), path to the file. A "./", "../", or
"subfolder/" path will not work.
- If stumped, try the general tricks.
! LaTeX Error: Float(s) lost.
Like it says; one or more figures, tables, etc., or marginpars have
not been typeset. The actual error may be well before the point where
the problem is recognized.
- You cannot put pictures or tables in minipages or parboxes. Or in
footnotes, or anything like that.
- Putting something that has a floating location (figures,
footnotes, ...) into something that also has a floating location
causes this error. After all, where should LaTeX put, say, a footnote
to a footnote? That does not make sense.
- Is a picture or table in the wrong place?
- If stumped, try the general tricks.
! LaTeX Error: Illegal character in array arg.
For "array" read "array" or "tabular" or "multicolumn" or whatever.
The argument in which you define the format of the columns seems to be
messed up. The normal letters are r, l, and c. Howver, there
is also @{} and p{}.
- Read up on arrays, tables (tabular), or whatever on
http://en.wikibooks.org/wiki/LaTeX/. Then check for typos in the
array/, tabular/, multicolumn/, whatever, environment parameters.
- If stumped, try the general tricks.
! LaTeX Error: Lonely \item--perhaps a missing list
environment.
An item command was found. Latex cannot figure out what list it
belongs to.
- Like it says? Cut and pasted something inside a list to outside
it?
- Check the \begin{...} statement of the list for typos.
- If stumped, try the general tricks.
! LaTeX Error: Missing \begin{document}
When this happens to me, I have put something printable before the
\begin{document} line. Usually I misspelled some nonprintable
command, turning it into printable text. But you could
actually forget the \begin{document} line itself, I guess.
- Do not put any printable text before \begin{document}. Just
packages, definitions, and such.
- Check everything before \begin{document} for typos or other
errors.
- Apparently, misuse of \marginsize can also cause this error.
- If stumped, try the general tricks.
! LaTeX Error: Missing p-arg in array arg
For "array" read "array" or "tabular" or "multicolumn" or
whatever.
- While defining columns, there is a p not followed by {width}
argument.
- Read up on arrays, tables (tabular), or whatever on
http://en.wikibooks.org/wiki/LaTeX/. Then check for typos in the
array, tabular, multicolumn, whatever, environment parameters.
- If stumped, try the general tricks.
! LaTeX Error: Missing @-exp in array arg
For "array" read "array" or "tabular" or "multicolumn" or whatever.
- Read up on arrays, tables (tabular), or whatever on
http://en.wikibooks.org/wiki/LaTeX/. Then check for typos in the
array/, tabular/, multicolumn/, whatever, environment parameters.
- If stumped, try the general tricks.
! LaTeX Error: No such counter
A counter is undefined
- Do not use \newcounter after \begin{document}.
- If you use a special style file, (like one provided by your target
journal), some standard counter may have been disabled by the journal
style.
- If stumped, try the general tricks.
! LaTeX Error: Not in outer par mode.
You put something, (figure, table, marginpar, ...), in the wrong
place. They cannot be inside secondary environments.
- A figure or table inside a parbox or minipage will not work.
- If stumped, try the general tricks.
! LaTeX Error: Option clash for package ...
Your guess is better than mine.
- Options to a package conflict with each other.
- If stumped, try the general tricks.
! LaTeX Error: \pushtabs and \poptabs don't match.
I think I have used the tabbing environment once, but I cannot
remember when. Otherwise I use the tabular environment inside
tables.
- Check that every \pushtabs is closed by a corresponding \poptabs.
You cannot close one \pushtabs by two \poptabs.
- If stumped, try the general tricks.
! LaTeX Error: \RequirePackage or \LoadClass in
Options Section.
Should not be there.
- Ahem! RequirePackage may not be used with \DeclareOption
- If stumped, try the general tricks.
! LaTeX Error: Something's wrong--perhaps a missing \item
One thing that is obviously wrong is the supply of meaningful error
messages.
- Like it says? Did you leave out the starting \item in an enumerate
or other list environment?
- Apparently, leaving the arguments away in a thebibliography
environment can also trigger the above nugget of wisdom.
- If stumped, try the general tricks.
! LaTeX Error: Suggested extra height (...) dangerously large.
Gee. You only live once. So live dangerously.
- Too big a number in \enlargethispage.
- If stumped, try the general tricks.
! LaTeX Error: Tab overflow.
There are only so many tab stops possible. Don't ask how many.
- Too many \= in a tabbing environment?
- If stumped, try the general tricks.
! LaTeX Error: There's no line here to end
Rather than trying to create more blank space using \\ \\, use
\\[25pt]. Been there, done that. If there is no previous \\, use
\vspace{12pt}.
- If you really need the \\ try putting in a \strut before it.
- If stumped, try the general tricks.
! LaTeX Error: This may be a LaTeX bug
Two balloonists got hopelessly lost over California. They lowered
their balloon enough that they got within shouting distance of a tall
building. That was the headquarters of the Digital Equipment Company.
They shouted: "Hello! Hello! Where are we?" A mathematician on one
of the top floors answered; "You are in a balloon," he shouted back.
That mathematician was Dr. Leslie Lamport, the author of LaTeX.
- Yes, this may be a LaTeX bug. Or a lady bug. But it is probably
a consequence of an earlier error in your index.tex file.
- If stumped, try the general tricks.
! LaTeX Error: This NFSS system isn't set up properly.
Well, set it up properly! Do I have to do everything here
myself?
- Invalid font used in \DeclareErrorFont.
- If stumped, try the general tricks.
! LaTeX Error: Too deeply nested.
You cannot just keep putting list inside list inside list ...
- The maximum depth is 4.
- If stumped, try the general tricks.
! LaTeX Error: Too many columns in eqnarray environment.
- You can only have three (i.e. no more than two &).
- Forgot a \\?
- If stumped, try the general tricks.
! LaTeX Error: Too many unprocessed floats
LaTeX has been hoarding your figures and tables for a rainy day.
However, there is no more room in its small apartment.
- The first table or figure that is being hoarded may be a bottle
neck. Change it placement options to [htbp] to make it easier to
place. Reduce its size. Or use the H placement option of the float
package to put it down whether latex likes it or not.
- A well placed \clearpage may be an option.
- Did you really use that many \marginpar commands? Shame on you!
- If stumped, try the general tricks.
! LaTeX Error: Two \LoadClass commands.
That is definitely too much.
- If stumped, try the general tricks.
! LaTeX Error: Two \documentclass or \documentstyle commands.
Too much. Too much. Try make do with only one. At the start of
index.tex, preferably.
- Kill off the second.
- If stumped, try the general tricks.
! LaTeX Error: Undefined tab position.
Latex is asked to tab to a column that is not defined.
- Did you miscounted the number of tabs, or forgot to start a new
line?
- If stumped, try the general tricks.
! LaTeX Error: Unknown option ... for package ...
Check for typos and the package documentation.
- What options are available may depend on context.
- If stumped, try the general tricks.
! LaTeX Error: \usepackage before \documentclass.
\documentclass must come before anything else nontrivial.
- Check for typos in the \documentclass command.
- Put the \documentclass before anything else besides comments and
blank space.
- If stumped, try the general tricks.
! LaTeX Error: \verb ended by end of line
- A \verb must be of the form \verb!...! where ! can be almost any
character not inside ... However, there may be no line breaks inside
...
- Make sure that the start character, ! or whatever, is indeed the
same as the end character.
- If stumped, try the general tricks.
! LaTeX Error: \< in mid line
\< (reduce tab start) should be at the start of a tabbed
line.
- To get an actual < in the middle of the text, go into math
mode. Like $<$.
- If stumped, try the general tricks.
! LaTeX Error: ... undefined
Something that you treat as defined (say the command in a \renewcommand)
is not defined.
- Check for typos in the command, both here and where it was supposedly
defined.
- Is the definition inside a comment block?
- If stumped, try the general tricks.
! Leaders not followed by proper glue
If you use leaders, you probably can figure this out.
- If stumped, try the general tricks.
! Limit controls must follow a math operator
- If stumped, try the general tricks.
! Math formula deleted: Insufficient ... fonts
- If stumped, try the general tricks.
! Misplaced alignment tab character &.
By itself, an & can only be used in tables and the like to separate
columns.
- If you want a printed &, use \&. Example: Proctor \&
Gamble.
- A missing/misspelled \begin{tabular} or similar can cause this.
- If stumped, try the general tricks.
! Misplaced \omit
The \omit command overrides column formatting in tables and arrays
and such.
- A \multicolumn statement has an implied \omit. Check its
validity. In particular, whether it does not use more columns than
there are defined.
- A \newcommand within a tabular environment can cause this, I hear.
- If stumped, try the general tricks.
! Missing # inserted in alignment preamble
- If stumped, try the general tricks.
! Missing $ inserted
Usually, this happens to me if for some arcane reason I try to use
a character like _ in the text. That can only be used in math mode
(unless preceded by \). So Tex puts a dollar sign in front of it.
Needless to say, that misplaced dollar sign will produce further
errors. After all, the subsequent text is believed to be math, and
the math following the next dollar sign to be text. (So a perfectly
valid _ or ^ in that math produces the same error once again.)
- Use \_ for an actual underscore and \^{} for a lone caret.
- Is something used in the text that can only be used in math mode?
If so, enclose it between $ and $. Example: water is H$_2$O
(superscripts and subscripts can only be used in math mode).
- Is a $ really missing from previous math?
- Math may not contain blank lines. If you leave a single blank
line in an equation, it will generate the error message
! Missing $ inserted, followed by
! Display math should end with $$. followed
by ! LaTeX Error: Bad math environment
delimiter. Remove the blank line and all three error messages
should disappear.
- Now latex2html has a nasty habit of leaving blank lines when it
removes the labels from equations. These errors will then show up in
its math images processing. In particular, they will show up in
images.log. To fix this, put the \label{...} in equations at the end,
followed by a %. Furthermore, leave some mathematics on the same
line, before the \label{...}%.
- Remember that the inside of an \mbox or \hbox is not in math mode
unless you enclose it between $ and $. Example: $\alpha\beta=0\mbox{
if $\beta$ is zero}$ needs the $ signs around the second \beta as
shown.
- If stumped, try the general tricks.
! Missing $$ inserted
TeX has found that it should no longer be in display math mode.
Note that in LaTeX you should be using \[ and \], or
\begin{displaymath} and \end{displaymath}, not $$ and $$.
- Blank lines are not allowed in math mode.
- If stumped, try the general tricks.
! Missing = inserted for ...
TBA
- If stumped, try the general tricks.
! Missing { inserted
LaTeX decided it really needed a { and inserted one.
- This is likely due to some earlier error.
- And the insertion is likely to introduce subsequent errors.
- Incorrect integral bounds can cause this error.
- If stumped, try the general tricks.
! Missing } inserted
LaTeX decided it really needed a } and inserted one.
- This is likely due to some earlier error.
- And the insertion is likely to introduce subsequent errors.
- Check for still-open opening brackets.
- If stumped, try the general tricks.
! Missing control sequence inserted
A control sequence means a LaTeX command, like \backslash.
- It is \[re]newcommand{\name}... but \[re]newenvironment{name}...
Note the backslash. In plain TeX, you have \def\name{...}.
- If stumped, try the general tricks.
! Missing delimiter inserted
- If stumped, try the general tricks.
! Missing \endcsname inserted
Typically, this occurs when you put a \ in front of an environment
name.
- Check for the above problem. For example, \begin{\itemize} should
be \begin{itemize}.
- If stumped, try the general tricks.
! Missing font identifier
- Check your
- If stumped, try the general tricks.
! Missing number, treated as zero
Missing "number" might actually be a length.
- Like it says? Check for presence and correctness of lengths
and coordinates behind \parbox, \line, \circle, \put, ....
- Remember that 0 is not a valid length. You must say 0in (inch)
or 0pt (point) or something like it.
- A [..] may have been mistaken for an optional argument. If so,
try enclosing it in brackets like {[...]}. Like change \\[text]
into \\{[text]}.
- A misplaced \protect (before something like a length or a number)
can also produce this error.
- If stumped, try the general tricks.
! Missing `to' inserted
The "to" is not really used in LaTeX. It uses {} brackets for
parameters.
- A mispelled command?
- If stumped, try the general tricks.
! Not a letter
Hyphenation words must consist of letters and hyphens.
- Using discretionary \- hyphens in the actual word is probably the
best way to keep LaTeX from nagging you.
- If stumped, try the general tricks.
! Number too big
Probably an indication that LaTeX is lost due to some error.
- If stumped, try the general tricks.
! OK
OK.
- If stumped, try the general tricks.
! Only one # is allowed per tab
- If stumped, try the general tricks.
! Output loop---
This should be very nasty, but I have never seen it.
- If stumped, try the general tricks.
! Output routine didn't use all of ...
Well, get the unused portion back.
- If stumped, try the general tricks.
! Paragraph ended before ... was complete
Parameters of commands, unless defined specially, cannot contain
blank lines.
- Check for a missing }.
- Check for blank lines inside parameters of commands.
- If stumped, try the general tricks.
! Parameters must be numbered consecutively
If you have this error, you probably know why.
- In latex, you do not normally use plain tex \def definitions. If
possible use \[re]newcommand.
- If stumped, try the general tricks.
! Patterns can be loaded only by INITEX
I cannot imagine why any new user would want to load abstract
hyphenation patterns.
- If stumped, try the general tricks.
! Please use ...
- Because you ask so nicely?
- If stumped, try the general tricks.
! Runaway argument
TeX has noted that an argument of a command does not seem
properly closed by a }.
- Check that each { has a proper closing }. Watch for mistaking ) for }.
- You cannot use a verbatim-line environment (like verbatim,
rawhtml, comment, ...) inside something else. They need to stand
alone. (Although I have used rawhtml inside a command definition.
Nothing is absolute.)
! \script...font ... is undefined (character ...)
In math mode, a special font is needed. It is not loaded
- Load it. Like \load{\footnotesize}{\sc} to load the sc (small caps)
font in footnote size.
- If your installation has only limited fonts, you can probably do
without.
- If stumped, try the general tricks.
! TeX capacity exceeded, sorry [...]
Nowadays, this is likely to be something wrong with your document.
- Line excessively long? Various MS Windows-type software insists
to put an entire paragraph of output on a single line in the input
file. That can exceed the TeX input line buffer. In TeX, you should
break up these long lines. To get a paragraph break, in TeX you use a
blank line. Not just a line break.
- A missing } makes a parameter size explode?
- A circular definition? (Something defined in terms of itself?)
- Apparently, using some commands inside a fragile command can cause
this. Try temporarily removing the contents.
- If stumped, try the general tricks.
! \textfont ... is undefined (character ...)
In math mode, a special font is needed. It is not loaded
- Load it. Like \load{\textsize}{\sc}.
- If stumped, try the general tricks.
! Text line contains an invalid character
- Like it says? Check for weird characters in index.tex. Use a
different editor if needed.
- If stumped, try the general tricks.
! This can't happen (
- If stumped, try the general tricks.
! Too late for ...
- If stumped, try the general tricks.
! Too many }'s
Sometimes they are hard to count. Or you may have missed a {.
- Missing a \begin{...} statement can cause this.
- If stumped, try the general tricks.
! Unbalanced output routine
- If stumped, try the general tricks.
! Unbalanced write command
- If stumped, try the general tricks.
! Undefined control sequence
A command you are using is not defined by you, or the system.
- Did you misspell the command?
- Is whatever is supposed to define the command missing or
misspelled? (Like the \documentclass command, the \usepackage{...},
the \input{...}, or whatever?)
- Is the command used out of context? (Like an \item not in a
list?)
- Interestingly, a footnote inside a footnote can apparently cause
this error.
- If stumped, try the general tricks.
! Use of ... does not match its definition
You are using a valid command in the wrong way. In particular, the
stuff immediately following the command is not in the right format.
(A "command" might really be an environment.)
- Did you misspell the command?
- Check the proper command format in a LaTeX manual.
- Are you using the command itself right, but is something in its
parameters not right? Like \put(10,10){\line...} where the
\line... is invalid?
- Try using {} brackets around command parameters.
- If stumped, try the general tricks.
! You already have nine parameters
TeX macro definitions have a maximum of 9 arguments. (Being #1 to
#9.) But you are unlikely to hit that limit as a new LaTeX user.
- Watch for potential problems with a # character.
- If stumped, try the general tricks.
! You can't dump inside a group
- Use the toilet already!
- If stumped, try the general tricks.
! You can't use `macro parameter character #' in ... mode
A # character is where it should not be.
- An actual # must be written as \#.
- If stumped, try the general tricks.
! You can't use a prefix with `...'
- Who says I can't? I just did, didn't I?
- If stumped, try the general tricks.
References:
- Leslie Lamport's "LaTex User's guide & Reference Manual".
Addison-Wesley 1986.
- http://www.cs.utexas.edu/~witchel/errorclasses.html
- Personal experiences.