# What does “overfull hbox” mean?

I often see output from TeX with the warning overfull hbox, badness 10000. What does this message mean?

• they are "seeding" which means asking and answering their own questions to build a nice bedrock of "good" questions so that newbies to the site will have good examples. – BBischof Jul 26 '10 at 19:48
• Aye! The whole point of the private beta is to seed answers to questions that we anticipate may be common. Answering your own question is perfectly acceptable if you have a good answer but no one has bothered to ask the question yet. – Sharpie Jul 26 '10 at 20:18
• Yes, but! Please do give some time before answering so that others have a chance as well. This also has the effect of producing novel answers which you might have not known otherwise! meta.tex.stackexchange.com/questions/4/… – Juan A. Navarro Jul 28 '10 at 16:45
• Possible duplicate of What are underfull hboxes and vboxes and how can I get rid of them? – Teepeemm Jul 28 '16 at 21:49
• How can this be a duplicate of a question about underfull boxes? – egreg Jul 28 '16 at 23:15

## 3 Answers

You can control how the overfull hbox, badness work configuring these latex parameters explained on:

1. badness is an integer from 0 to 10000 that is a measure of the quality of the spacing in any given box. https://en.wikibooks.org/wiki/TeX/definition/badness

2. \tolerance A parameter that tells TeX how much badness is allowable without error. [number] can range from 0 to 10000, and there are no units. https://en.wikibooks.org/wiki/TeX/tolerance

3. The TeX primitive \pretolerance is an integer parameter that is used in TeX's line breaking algorithm as described below. The quantity is an integer from -1 to 10000.

If \pretolerance is an integer from 0 to 10000, then TeX's line breaking algorithm first attempts to break up a paragraph without hyphenation. In this attempt TeX ties to minimize the badness of each line. If TeX can break up a paragraph so that none of the lines have badness greater than \pretolerance, then TeX accepts it. If this is not possible, TeX will re-attempt to break up the paragraph with the allowance of hyphenation of words. In this second attempt, the integer parameter \tolerance is used instead of \pretolerance. If TeX is unsuccessful in the second attempt an error is reported in the log file.

If \pretolerance is -1, then TeX bypasses the first attempt at breaking a paragraph without hyphenation. https://en.wikibooks.org/wiki/TeX/pretolerance

On these questions there are more related information about line breaking:

Hyphenation:

Bad boxes:

Table of Contents:

Miscellaneous:

1. underfull \vbox
2. What is the difference between \hspace*{\fill} and \hfill?
3. how to suppress "Underfull \vbox (badness 10000) ... while \output is active"?
4. http://www.tex.ac.uk/FAQ-overfull.html (La)TeX makes overfull lines
5. http://www.tex.ac.uk/FAQ-paraparam.html Why does it ignore paragraph parameters?

The first answer doesn't really help somebody fix the problem, though. Take a look at:

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=overfull

and

http://en.wikibooks.org/wiki/LaTeX/Text_Formatting#Hyphenation

to learn about \tolerance, \pretolerance, and \hyphenpenalty and how they affect the overfull/underfull behavior. Also, if you're fixing the document by hand, you can add hyphenation dictionary entries with \hyphenation or add discretionary hyphens into words with \-.

This message means that a line of your document is too long to fit within the horizontal space on the page, and TeX couldn't find a good way to break it apart. This will usually result in text hanging out past the margin, possibly even running off the side of the page. Common causes are long words without proper hyphenation information and long displayed equations.

• If you use draft mode (\documentclass[draft]{article}) you can see black lines on the side of your document where there is overfull hbox badness. This is a convenient way to find and fix these errors. – Otis Jul 26 '10 at 19:54
• @Otis: Or simply something like \overfullrule=1mm so that you don't get the unwanted side effects of the "draft" mode. – Jukka Suomela Jul 26 '10 at 20:34
• Overfull hboxes are not limited to overlong lines on a page. A hbox can overflow anywhere, for example, inside a table. Whithout \overfullrule in effect this is often hard to detect. – Christian Lindig Apr 17 '11 at 5:06