[PRL] LaTeX: how to disable underfull hbox warnings?

Richard C. Cobbe cobbe at ccs.neu.edu
Sun Jun 27 21:32:09 EDT 2004


Lo, on Sunday, June 27, Eli Barzilay did write:

> On Jun 27, Richard C. Cobbe wrote:
> > Does anyone know how to (temporarily) disable LaTeX's underfull \hbox
> > warnings?  They're obscuring the important error messages, and I'd like
> > to mask them until I get the main content of the paper done and I'm
> > ready to tweak formatting issues.
> 
> Either use \sloppy in the preamble, or \begin{sloppypar}...
> \end{sloppypar} for a single paragraph.  This will convince tex to put
> much more spaces to justify text -- my experience is that leftover
> hbox problems should be considered errors (things like long \verb's
> etc).

I tried this, and it has no obvious effect.  Oddly enough, Matthias says
that when he does this, it makes things sloppy enough that the document
is nearly unreadable.  I'm actually looking for a solution that just
masks the warning messages without actually changing the way the
document is typeset.  (Should have said that the first time around.)

It appears that the \hbadness parameter (primitive to TeX) is the option
that I want.  If you set that to infinity (and since this is TeX,
infinity = 10000), it disables all underfull hbox warnings without
(apparently) changing the way the document is rendered.  It does not,
however, disable overfull hbox warnings, which is probably a good thing.

For those who care, there's a corresponding \vbadness parameter for
underfull hboxes.

Richard



More information about the PRL mailing list