Skip to main content

Common Compilation Error List

Error MessageError CauseSolution
Undefined control sequence.Undefined or misspelled macro command; required package not loadedCheck command spelling; add required package with \usepackage{xxx}
Missing $ inserted.Math symbols such as _ ^ \alpha appear in text mode without math environmentEnclose formulas in math environments: $ $ / \( \) / equation, etc.
Extra }, or forgotten $.Mismatched braces or dollar signs with missing starting or ending delimitersCheck all {} and $ in pairs to ensure proper closure
Missing { inserted.Missing left brace for command arguments, e.g. \frac a bWrap multi-argument contents with braces: \frac{a}{b}
Missing } inserted.Missing closing right brace, incomplete groupingLocate unclosed { and add the corresponding }
\left ... \right mismatch / Missing \right. inserted\left and \right must be paired and cannot span linesUse paired \left( ... \right); abandon \left/\right for multi-line formulas
Misplaced alignment tab character &.Alignment symbol & used outside tabular, matrix or align environmentsUse & only inside tabular, array, align and cases environments
Extra alignment tab has been changed to \cr.More & separators in a table row than the defined column numberMatch the number of separators in each row with the table column count
Too many }'s.More closing braces than opening braces, unbalanced bracket countRemove redundant } to balance all brackets
Paragraph ended before ... was complete.Line breaks or blank lines are not allowed inside command argumentsAvoid blank lines in command arguments; split statements if line breaks are needed
Package ... Error: File ...sty not foundRequired package file is missingInstall the missing package, change LaTeX distribution, or remove the package import
Overfull \hbox / Underfull \hboxText exceeds page margins or insufficient text stretching causes abnormal spacingAdjust line breaking and wrapping; use \linebreak or rework paragraph layout
Overfull \vboxContent vertically exceeds the page bottom boundaryResize images and formulas, or insert page breaks with \pagebreak
LaTeX Error: Environment xxx undefined.Undefined environment (e.g. align, cases) due to missing amsmath packageLoad the required package: \usepackage{amsmath}
Illegal parameter number in definition of ...Incorrect usage of # parameters in custom macrosUse #1,#2 for macro parameters; do not use raw # in normal text
Bad math environment delimiterMismatched math environment delimiters (e.g. \( without matching \))Always use paired math environment start and end delimiters
Double subscript.Consecutive subscripts (e.g. x_a_b) without groupingUse nested braces for grouping: x_{a_b}
Double superscript.Consecutive superscripts (e.g. x^a^b) without groupingUse braces for grouping: x^{a^b}
\begin{...} on input line ... ended by \end{...}.Mismatched names of begin and end environmentsEnsure matching environment names (e.g. \begin{cases} pairs with \end{cases})
Missing \endgroup inserted.Unfinished environments or grouping structuresVerify every \begin{} has a corresponding \end{}
Not in outer par mode.Float environments (figure/table) nested inside paragraph boxesDo not place figure or table inside minipage or equation environments
Float too large for page.Image or table size exceeds the available page areaReduce the width of floating elements or split the content
Citation ... undefinedCitation key missing in bib file or missing BibTeX compilationCheck citation keys; compile in sequence: pdflatex β†’ bibtex β†’ pdflatex twice
Label ... multiply definedDuplicate definition of the same \label{} tagRename duplicate labels to ensure global uniqueness
Reference ... undefined\ref cannot find the corresponding \labelCheck label names and compile the document twice or more

To be continued...