Skip to main content
LaTeX warnings are not errors. Your document still compiles and produces a PDF. They are TeX telling you it made a layout compromise, and some of those compromises are visible on the page while others are invisible and safe to ignore. This page explains what the most common messages mean in plain language, so you can tell the difference.

Which warnings actually matter

Overfull \hbox

overfull-warning.log
TeX could not break a line within the text width, so the line sticks out past the right margin by the amount shown. A value under about 2pt is usually invisible. Anything larger normally is visible. The usual causes are a long unbreakable item: a URL, a code identifier, a chemical name, or a wide equation or table.

Find it first

Compile with the draft 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. The url 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
This is the message that confuses people most, because nothing looks broken. Badness measures how far TeX had to stretch the spaces to fill a line. It runs from 0 (perfect) to 10000, and 10000 means “infinitely bad” — TeX gave up and stretched the spaces as far as it needed to. It is a complaint about spacing quality, not a sign of a broken document. Badness 10000 is by far the most common value because it is the ceiling. Seeing it does not mean the problem is severe; it means the problem hit the maximum on the scale.

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 a minipage or 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
This one is never safe to ignore. A figure or table has been silently dropped and will not appear in the PDF at all. It happens when a float is declared somewhere TeX cannot move it out of — floats must be able to migrate to the top or bottom of a page, and inside a box there is nowhere to migrate to. The usual culprits are a figure or table environment placed inside:
  • a minipage, \parbox, or \fbox
  • another float
  • a footnote
The closely related error ! 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 a minipage, 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
LaTeX resolves cross-references by writing them to an .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
That second command filters to overfull boxes of 10pt or more, which is a practical way to skip the noise and find the ones a reader would actually notice.

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.