[Tex/LaTex] Underful hbox badness 10000

badnessspacing

A while back I ran across a web page that explained how to avoid this error by not using \\ but hfill or hspace. I can't remember which one or find anything else about it. It was a very simple solution and solved the problem without extra packages or anything and simply filled the remaining horizontal space. Any ideas?

Best Answer

Although it is difficult to adequately reproduce this warning (not an error), you may be after the UK TeX FAQ entry No line here to end. Here is one such a reproduction of the warning:

\documentclass{article}
\begin{document}
\begin{description}
  \item[Very long label] Some starter text \\
    \\
    Here is some more text.
\end{description}
\end{document}

The problem stems from the use of \\ to insert a blank line. Rather use a vertical skip (like \smallskip, \medskip or \bigskip) or leave a blank line - that would indicate a paragraph break and an associated "blank line". Alternatively, a resolution suggested is to provide an infinite stretch of space \hspace*{\fill} so that there's enough "to go around" for TeX to fill the line before breaking it.