Common Compilation Error List
| Error Message | Error Cause | Solution |
|---|---|---|
| Undefined control sequence. | Undefined or misspelled macro command; required package not loaded | Check command spelling; add required package with \usepackage{xxx} |
| Missing $ inserted. | Math symbols such as _ ^ \alpha appear in text mode without math environment | Enclose formulas in math environments: $ $ / \( \) / equation, etc. |
| Extra }, or forgotten $. | Mismatched braces or dollar signs with missing starting or ending delimiters | Check all {} and $ in pairs to ensure proper closure |
| Missing { inserted. | Missing left brace for command arguments, e.g. \frac a b | Wrap multi-argument contents with braces: \frac{a}{b} |
| Missing } inserted. | Missing closing right brace, incomplete grouping | Locate unclosed { and add the corresponding } |
| \left ... \right mismatch / Missing \right. inserted | \left and \right must be paired and cannot span lines | Use paired \left( ... \right); abandon \left/\right for multi-line formulas |
| Misplaced alignment tab character &. | Alignment symbol & used outside tabular, matrix or align environments | Use & 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 number | Match the number of separators in each row with the table column count |
| Too many }'s. | More closing braces than opening braces, unbalanced bracket count | Remove redundant } to balance all brackets |
| Paragraph ended before ... was complete. | Line breaks or blank lines are not allowed inside command arguments | Avoid blank lines in command arguments; split statements if line breaks are needed |
| Package ... Error: File ...sty not found | Required package file is missing | Install the missing package, change LaTeX distribution, or remove the package import |
| Overfull \hbox / Underfull \hbox | Text exceeds page margins or insufficient text stretching causes abnormal spacing | Adjust line breaking and wrapping; use \linebreak or rework paragraph layout |
| Overfull \vbox | Content vertically exceeds the page bottom boundary | Resize images and formulas, or insert page breaks with \pagebreak |
| LaTeX Error: Environment xxx undefined. | Undefined environment (e.g. align, cases) due to missing amsmath package | Load the required package: \usepackage{amsmath} |
| Illegal parameter number in definition of ... | Incorrect usage of # parameters in custom macros | Use #1,#2 for macro parameters; do not use raw # in normal text |
| Bad math environment delimiter | Mismatched 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 grouping | Use nested braces for grouping: x_{a_b} |
| Double superscript. | Consecutive superscripts (e.g. x^a^b) without grouping | Use braces for grouping: x^{a^b} |
\begin{...} on input line ... ended by \end{...}. | Mismatched names of begin and end environments | Ensure matching environment names (e.g. \begin{cases} pairs with \end{cases}) |
| Missing \endgroup inserted. | Unfinished environments or grouping structures | Verify every \begin{} has a corresponding \end{} |
| Not in outer par mode. | Float environments (figure/table) nested inside paragraph boxes | Do not place figure or table inside minipage or equation environments |
| Float too large for page. | Image or table size exceeds the available page area | Reduce the width of floating elements or split the content |
| Citation ... undefined | Citation key missing in bib file or missing BibTeX compilation | Check citation keys; compile in sequence: pdflatex β bibtex β pdflatex twice |
| Label ... multiply defined | Duplicate definition of the same \label{} tag | Rename duplicate labels to ensure global uniqueness |
| Reference ... undefined | \ref cannot find the corresponding \label | Check label names and compile the document twice or more |
To be continued...