LaTeX warning "Underfull \hbox (badness 10000) in paragraph at lines 3--4": cause and fix

Warning Underfull \hbox (badness 10000) in paragraph at lines 3--4

A line has more white space than TeX accepts: the spaces had to stretch too far, or the line is not filled at all. Badness is the measure for that, from 0 for a line that fits to 10000 for the worst case; LaTeX reports lines above 1000. It is a warning, and the PDF is still written.

Why it happens

How to fix it

A document that produces the message

\documentclass{article}
\begin{document}
First paragraph.\\

Second paragraph.
\end{document}

Open in the editor

The corrected document

\documentclass{article}
\begin{document}
First paragraph.

Second paragraph.
\end{document}

Open in the editor

Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.

Finding the line in the editor

The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.

Related pages