Common error messages

*

This is the tex prompt. Latex decided your document wasn't finished, possibly because you forgot an \end{document} .

"File `packagename.sty' not found."

You are trying to use a package that isn't installed. You can ask your sysadmin to install it globally, or install it in your home directory. See a section above about package installation

"\begin{something} ended by \end{somethingelse}"

You either didn't properly nest environments, possibly because you misspelled an environment name in an \end{} .

"Can only be used in preamble"

Something, like usepackage, author definition, bibliography style settings, color declarations, etc. that should happen after \documentclass and before begin{document} happened elsewhere, probably inside the document text.

"destination with the same identifier (name{page.1}) has been already used, duplicate ignored"

This is triggered by hyperref creating index links to numbered pages when you use \pagenumbering (for example to get roman-numeral pages (the book class does this implicitly).

Specifically, this happens when page numbering is reset, which means that there is more than one page with the same number, in which case you don't have a simple 1-to-whatever numbering anymore and the page number displayed on a page will often differ from the how-manieth page it is in the actual document. If that's okay/intended, you usually want to tell hyperref to create links and mention pages according to the way they are named (e.g. ii (4 of 20)), by adding two options to hyperref: plainpages=false and pdfpagelabels .

If you switch to arabic and back, you will still likely have the title page be (arabic) 1, the TOC and such i to whatever, and then the main content 1 to whatever -- so you'll still have one duplicate, for 1.

See also this explanation, this mention and more.

"Extra alignment tab has been changed to \cr"

You have more & s in table data than you specified you have columns in the \begin{tabular}{columnspec} argument. Can easily mean you forgot a \\ somewhere.

"Fatal format file error; I'm stymied"

This usually means that TeX's files are in the wrong format after an install or upgrade. Regularly a fmtutil --all will fix this.

In my case I had upgraded to a slightly buggy beta (...version of teTeX). A slight downgrade followed by a fmutil --all fixed it.

See also pages like this.

"File ended while scanning use of ..."

Usually means a missing } somewhere.

"Illegal character in array arg"

You used a bad alignment letter (as in l, r, c, and so on) in the tabular column specification.

"Illegal unit of measure"

You always need units when specifying a length, even for zero lengths.

Missing \endcsname inserted

A TeX error that can mean various things, including accidentally using a backslash in an environment name, or forgetting a required argument in adjacent commands.

"Misplaced

oalign"

One reason is that you are using colortab with LCC/ECC and there is an empty line somewhere between the LCC and ECC.

"Misplaced \omit"

Seems to have many causes, but seems to usually be caused by a \multicolumn. In my case I had a \cellcolor right before it, and multicolumns seem to be sensitive about the commands right before it.

"Missing } inserted"

Just that - an unclosed command (or range). Can also mean a missing obligatory argument.

"Missing \cr inserted"

Can mean various typos, such as a } too much.

"Missing $ inserted"

Can mean an unclosed math mode range (like Costs $20. ), or something that should only appear in math mode, such as \: and \And .

"Missing delimiter"

Can be various types of typo, such as \left{ when you meant \left\{ or \right when you want \right.

"Missing number, treated as zero"

Tex expects a number and you probably gave it either a string or nothing. May mean you have a typo (e.g. a missing \ ) in a command that should return a number.

"Overfull \hbox" and "Underfull \hbox"

Overfull and underfull hbox messages ususally come from TeX's perfectionistic word spacing / line breaking logic. This is rarely visually problematic, though in some cases it is.

You can make TeX less strict by telling it to be \sloppy

If it seems TeX doesn't know how to hyphenate a word you can tell it how, in the prelude: \hyphenation{man-u-script} , or inline: man\-u\-script . Both only inform latex of how to hyphenate, and neiter has any visual effect until latex decides to hyphenate.

"Overfull \vbox" and "Underfull \vbox"

Like the hbox variants, but vertically. Mostly seems to happen on when TeX can't really fit (long, unbroken) paragraphs well. Also happens when floats are very high and won't fit on a page.

"Package array Error: Illegal pream-token (1): `c' used."

Happens when you enter an illegal preamble character in \multicolumn (you may be thinking of \multirow, where a column size goes in the second argument).

"Package inputenc Error: Unicode char \u8:âsomething not set up for use with LaTeX"

inputenc allows you to use non-ASCII characters, and have TeX handle the necessary translation into TeX commands.

There are a metric ton of potential characters. While most of the basics are covered, there are characters it doesn't yet know about, many of which seem to be the ones more ambiguous in use, i.e. for which the right TeX depends somewhat on how you are using the characters, such as with some of the dozen or two existing quotation mark alternatives.

After you decide the mapping from Unicode codepoint to TeX you want, you must declare them, ading them to the document's prologue, or perhaps to a file you include in every document you need the mapping in. Examples:

% 'low single comma quotation mark' \DeclareUnicodeCharacter { 2019 }{ ' } % accent acute, probably used as quote character \DeclareUnicodeCharacter { 00B4 }{ ' } % 'double low-9 quotation mark' \DeclareUnicodeCharacter { 201E }{ `` } % some mathematical things: \DeclareUnicodeCharacter { 00B1 }{ \ensuremath { \pm }} %plus-minus sign \DeclareUnicodeCharacter { 00BC }{ \ensuremath { \stackrel {1 }{ 4 }}} % French/belgian/german angle-bracket quotation marks \DeclareUnicodeCharacter { 00ab }{ \lfqq } % or \guillemotleft ? \DeclareUnicodeCharacter { 00bb }{ \frqq } % or \guillemotright ? \DeclareUnicodeCharacter { 2039 }{ \lfq } \DeclareUnicodeCharacter { 203a }{ \frq } \DeclareUnicodeCharacter { 20ac }{ \euro } % from the eurosym package

The error doesn't tell you the code point it's missing, though. One solution is to less the .tex or .log file. Since it'll likely be UTF-8, which uses runs of high bytes, it should be shown like <E2><80><9E> . To decode this into the codepoint, use some unicode tool that allows input as hexadecimal UTF8. I use my own. Googling for the byte sequence may also work (try some variations, such as adding and removing spaces between bytes) .

"Paragraph ended before \somecommand was complete"

Tends to mean you forgot to close an argument, used a bracket ) instead of a curly bracket } or some such thing.

May also mean there is an implicit paragraph (empty line) inside a range (ranges can be implicit, as with \LCC to \ECC in colortab).

"Runaway argument"

Tends to mean you forgot to end a command argument (forgot a } ) (the error appears mostly when there in a paragraph in what with this typo is inside the argument) , or a mandatory argument is missing.

"Token not allowed in a PDFDocEncoded string"

Usually means that you are using hyperref's bookmark option and the titles sent to those bookmarks contain TeX, which they shouldn't. One solution is to disable bookmarks, another is to specify one string for typesetting, another for the according bookmark entry; see pages on hyperref that mention \texorpdfstring .

"Undefined control sequence."

You are using a command that is not defined.

Tends to mean a package was not included, you misspelled the command, or that you used a driver-specific command with a driver that does not support it and so doesn't define it (e.g. \c@lor@to@ps in pdftex).

"Environment align undefined."

The align environment is defined in the amsmath package, so include that. Alternatively, emulate the align with a simple table.

Printing/conversion

"lpr: Error - scheduler not responding!"

The dvips utility may be configured to send the PostScript it generates directly to the printer (it's a semi-default configuration), which means that a printer daemon must be accessible when you call dvips. (an incorrectly set CUPS_SERVER or an incomplete CUPS configuration can also cause this - or similar for other print servers)

If, like most people, you just want a postscript file, explicitly tell dvips to write to a file ( -o outputfile ), or change its configuration file (named config.ps . It will likely currently have a line like o |lpr )



"lpr: Error - no default destination available."

Print server is available (see dvips behaviour notes in the last entry) but it has no (default) printer defined.

If you actually meant to print, you can set a default printer (for the current user) using lpoptions -d printername . If you want a postscript file, explicitly ask for one, or configure dvips to write files by default.

Tex programming / package bugs

"Illegal parameter number in definition"

Happens when you defined a command with e.g. one parameter and you refer to parameter 2.

"Command ... already defined"

Code tried to create a command or environment where one already existed under that name. If this is your own code, try giving it another name, or if you mean to override behaviour, use the proper renew-type command.