Which warnings actually matter
Overfull \hbox
overfull-warning.log
Find it first
Compile with thedraft class option. LaTeX draws a black bar in the margin next to
every overfull box, which is far faster than reading line numbers out of the log.
Fix it
For long words and URLs, let TeX hyphenate them. Theurl package breaks URLs at
sensible points, and microtype reduces overfull boxes across the whole document by
subtly adjusting character widths and spacing.
If a single stubborn paragraph resists, \sloppy tells TeX to prefer wide word gaps
over running into the margin. Scope it to the paragraph rather than the document, or
you trade overfull boxes for ugly spacing everywhere.
Wide tables and equations need a different fix: see
advanced tables and
breaking long equations.
Underfull \hbox and badness 10000
underfull-warning.log
Common causes
\\used to force a line break in ordinary text. The forced short line must be stretched to full width. This is the single most frequent cause.\raggedright, or a narrow column such as aminipageor a two-column layout.- A paragraph where TeX chose stretched spaces over an overfull line.
Fix it
If the spacing looks fine in the PDF, ignore it. That is a legitimate decision, not laziness — the warning is advisory. If it does look wrong, in body text use a blank line for a new paragraph rather than\\:
To silence the warnings from deliberately ragged text, tell TeX not to complain:
To relax TeX’s standards document-wide, raise the tolerance. \emergencystretch
gives TeX extra room on a final pass rather than lowering quality everywhere:
Underfull \vbox
The vertical equivalent: TeX stretched the spacing between elements to fill a page. It usually appears near a page break where a float, a heading, or a\clearpage left
material that could not fill the page. If the page looks acceptable, ignore it. If
not, adjusting float placement is normally the real fix — see
float and placement issues.
Float(s) lost
floats-lost.log
figure or table environment placed inside:
- a
minipage,\parbox, or\fbox - another float
- a footnote
! LaTeX Error: Not in outer par mode has the same root
cause and is thrown in the same situations.
Fix it
Move the float to the top level of the document. If you genuinely need a captioned figure inside aminipage, do not use the figure environment — use \captionof
from the caption package, which produces a caption without creating a float:
For two figures side by side, subcaption handles the common case properly:
Undefined references and changed labels
reference-warnings.log
.aux file on one pass and
reading them back on the next. On the first compile the labels do not exist yet.
Label(s) may have changed simply means run it again. There were undefined references after a second run means a \ref or \cite points at a label that does
not exist — check for a typo, or a \label placed before its \caption.
Cloud compilers usually handle the repeated passes for you. For citations, see
bibliography build errors.
Reading the log yourself
Warnings name the input line, which is the fastest way to find the source:grep-warnings.sh
Related Pages
- Fixing compilation errors
- Float and placement issues
- Compiler and engine errors
- Troubleshooting center
Start in LaTeX Cloud Studio
Open in LaTeX Cloud Studio
Compile in the browser and read the full log next to your source.
Troubleshooting center
Work through the other common failure modes.
