[Tex/LaTex] What does the phrase “Underfull \hbox (badness 10000) in paragraph” actually mean

errors

What does the actual phrase above mean?

Best Answer

99 times out of 100 it means you have \\ incorrectly placed at the end of a paragraph. But to dissect the message:

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

A box is underfull if there is not enough content to fill its stated size.

If you go \hbox to 5cm{A} then it makes a horizontal box (\hbox) 5cm wide just containing an A so it is underfull and will generate a warning, the exact amount of badness depends how much any white space is over-stretched, but here there is no white space so it is infinitely bad, which is arbitrarily truncated to the maximum value, 10000.

By placing \\ at the end of a paragraph you force a line break but there is nothing at all in the forced final line of the paragraph so it is a box that is \textwidth wide with no content. It appears a bit like vertical space but it is not it is a spurious line at the end of the paragraph. So for example it does not stretch and is not dropped at the start of a page.