Underfull \hbox (badness <n>) in paragraph at lines <a>--<b>
A line had to be stretched more than TeX likes, leaving wide gaps between words. Usually caused by \\ or \linebreak in running text.
Help centre › LaTeX errors › Floats and layout · Warning: the document still compiles
What the log says
Underfull \hbox (badness 10000) in paragraph at lines 4--6
[]What it means
TeX justifies each line by stretching the spaces between words. Badness measures how much: 10000 is the maximum, meaning a line that is almost empty or stretched as far as it can go. The PDF still comes out; the line simply looks loose or the paragraph ends oddly. Unlike an overfull box, nothing crosses the margin.
Causes and fixes
Most common first. Each example is a complete document; the first fails with this message, the second is the same document fixed.
1. \\ used to end a paragraph or to add vertical space
\\ ends a line inside a paragraph; at the end of a paragraph it leaves an empty, infinitely stretched line. End paragraphs with a blank line, and add space with \medskip or \vspace{…}.
\documentclass{article}
\begin{document}
The first observation was made in March.\\
The second observation followed in May.
\end{document}\documentclass{article}
\begin{document}
The first observation was made in March.
\medskip
The second observation followed in May.
\end{document}2. \linebreak or \newline forcing a break in a justified line
A forced break in mid-line leaves too few words to fill the line, so the spaces stretch. Remove the forced break and let TeX choose; if a break is needed for layout, fix it only in the final version.
\documentclass{article}
\begin{document}
We measured the temperature \linebreak at three sites over two years and found a steady rise in the mean.
\end{document}\documentclass{article}
\begin{document}
We measured the temperature at three sites over two years and found a steady rise in the mean.
\end{document}3. Long words in a narrow column or table cell
In a narrow p{…} column there are too few spaces to stretch. Set the column ragged right with >{\raggedright\arraybackslash}p{3cm} (needs the array package), or widen it.
4. \sloppy or long URLs that left a line with few break points
A line that ends just before an unbreakable URL may be stretched to fill the width. \usepackage{xurl} lets the URL break and fills the line instead.
In Manulyx
The editor lists the warning with the compile's others; it never stops the PDF.
Write in Manulyx for free · Journal templates
More in floats and layout
- LaTeX Error: There's no line here to endA line break (\\ or \newline) comes where no line has started, typically after a blank line. Use \vspace or \medskip for vertical space.
- LaTeX Error: Not in outer par modeA figure, table or \marginpar is inside a box, minipage, table cell or another float. Floats must be in the main text; put the box inside the float.
- LaTeX Error: Too many unprocessed floatsFigures and tables are queued faster than LaTeX can place them, often behind one that cannot be placed. Relax placements, shrink it, or add \clearpage.
- LaTeX Error: Float(s) lostA figure or table sits inside a footnote, a framed box or a similar construct LaTeX cannot place floats from, and it disappears. Move it into the text.
- LaTeX Warning: Float too large for page by <n>pt on input line <n>.A figure or table is taller than the text area, so it overprints the footer or runs off the page. Scale it to fit, or split a long table.
- Dimension too large.A length went past TeX's limit of about 16383pt (5.75 m). Usually a TikZ plot with large coordinates or a scale factor gone wrong.
Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors