> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/tex-latex-primitives/06-hfuzz.md).

# \hfuzz

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`](/latex/tex-latex-primitives/07-overfullrule.md) to a non-zero value:

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

The following graphic shows the output:

![](/files/3JdtdULvdR1aRSDQ75aA)

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

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

the following graphic:

![](/files/HeFDwvP1h4KmaY1ePuQb)

shows that TEX no longer treats `\hbox to 36pt{Overleaf}` as overfull, thus does not add an [`\overfullrule`](/latex/tex-latex-primitives/07-overfullrule.md) 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:

* [`\overfullrule`](/latex/tex-latex-primitives/07-overfullrule.md)
* [`\hbadness`](/latex/tex-latex-primitives/05-hbadness.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/tex-latex-primitives/06-hfuzz.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
