TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a paragraph that contains an underfull \hbox. (It's loaded with huge proper nouns that don't hyphenate easily.) It's not going to be fixed (badness is only 1330), but I'd like to get TeX to stop bleating about it, so that I can get closer to a clean run. I tried setting \tolerance=1600 but evidently that's not the right incantation.

How can I explain to TeX that an underfull \hbox with badness 1330 is OK?

share|improve this question
up vote 7 down vote accepted

Set hbadness parameter

\hbadness = 1331

share|improve this answer
Correct and complete; thanks!!!! – Norman Ramsey Jul 12 '11 at 23:06

There are various ways to get TeX to change its mind about a paragraph. You can try using the sloppypar environment, or use \looseness=1 or \looseness=-1, and see which of the three of them looks least bad and warns least often. The sloppypar environment surrounds your paragraph; the other two are simple declarations that come anywhere in the paragraph that's convenient (I usually put them right at the start of the paragraph, where they're visually obvious), and are in effect only until the next paragraph break. See also here for additional suggestions.

share|improve this answer
\looseness is definitely not on; I don't want to change the number of lines. sloppypar sets a high \tolerance, but it also changes \emergencystretch, which might help. – Norman Ramsey Jul 12 '11 at 5:15
\tolerance and \emergencystretch are independent of each other. If you want to suppress that message, write {\hbadness=1331 \par} at the end of the offending paragraph (just after the final period). – egreg Jul 12 '11 at 7:18
I tested, and sloppypar changes nothing – Norman Ramsey Jul 12 '11 at 23:05
@NormanRamsey, sorry to hear that. sloppypar helps to reformat your text or at least make LaTeX less unhappy with it---sometimes but not always, depends on the exact text you have. I wasn't aware of the \hbadness macro; it sounds remarkably like a #pragma to turn off C compiler warnings... Glad to hear that works for you, and good to learn about it. :) – Ben Lerner Jul 12 '11 at 23:09
Sloppy means: \tolerance 9999 \emergencystretch 3em \hfuzz .5pt \vfuzz .5pt. It almost always succeeds in avoiding overfull hboxes, turning them into (much less offensive) underfull boxes. – Lev Bishop Jul 16 '11 at 13:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.