Skip to content

TEX provides commands that allow you to influence its decision as to whether it considers a box is to be overfull and reported as such—for example in the .log file.

  • \hfuzz[=] dimension: \hfuzz specifies the amount by which the content in an \hbox can exceed the width of that \hbox before being considered overfull.
  • \vfuzz[=] dimension: \vfuzz specifies the amount by which the content in a \vbox can exceed the height of that \vbox before being reported as overfull.

Note that:

  • [=]” means that the equals sign is optional.
  • dimension is an amount specified in units that TEX can understand—e.g., pt, bp, mm etc.

Usage examples

  • \hfuzz=0.5pt or \hfuzz 0.5pt (the “=” is optional)
  • \vfuzz=0.75pt or \vfuzz 0.75pt (the “=” is optional)

Example

If we put the word “Overleaf” into an \hbox and measure its width (using the default fonts):

\setbox99=\hbox{Overleaf}\the\wd99

we see a value of 36.41675pt. If we now put “Overleaf” in an \hbox that is too narrow, say 36pt, and set \overfullrule to a non-zero value:

\overfullrule=5mm
\hbox to 36pt{Overleaf}

The following graphic shows the output:

If we we set \hfuzz=0.5pt and repeat the above exercise:

\overfullrule=5mm
\hfuzz=0.5pt
\hbox to 36pt{Overleaf}

the following graphic:

shows that TEX no longer treats \hbox to 36pt{Overleaf} as overfull, thus does not add an \overfullrule rule, because the value of \hfuzz (0.5pt) is just enough to prevent that.

The behaviour of \vfuzz is analagous to \hfuzz—except that TEX does not display overfull rules for vboxes.

More detail on \hfuzz

What TEX actually checks is the difference between the excess width of the material and the total (zero order) shrink glue. For example, suppose the total width of some content is 100pt and the desired box width is 95pt: the excess width that TEX needs to absorb is 5pt—it needs to shrink the available glue by 5pt. Suppose there is a total zero order glue shrink of 4pt, then TEX compares the current value of \hfuzz with the value of 5pt\(-\)4pt\(=\)1pt.

Related commands

See also:

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX