Next: smallbook, Previous: Preparing for TeX, Up: Hardcopy
TeX is sometimes unable to typeset a line without extending it into the right margin. This can occur when TeX comes upon what it interprets as a long word that it cannot hyphenate, such as an electronic mail network address or a very long title. When this happens, TeX prints an error message like this:
Overfull @hbox (20.76302pt too wide)
(In TeX, lines are in “horizontal boxes”, hence the term, “hbox”. `@hbox' is a TeX primitive not needed in the Texinfo language.)
TeX also provides the line number in the Texinfo source file and the text of the offending line, which is marked at all the places that TeX considered hyphenation. See Catching Errors with TeX Formatting, for more information about typesetting errors.
If the Texinfo file has an overfull hbox, you can rewrite the sentence so the overfull hbox does not occur, or you can decide to leave it. A small excursion into the right margin often does not matter and may not even be noticeable.
If you have many overfull boxes and/or an antipathy to rewriting, you can coerce TeX into greatly increasing the allowable interword spacing, thus (if you're lucky) avoiding many of the bad line breaks, like this:
@tex \global\emergencystretch = .9\hsize @end tex
(You should adjust the fraction as needed.) This huge value for
\emergencystretch
cannot be the default, since then the typeset
output would generally be of noticeably lower quality; the default
is `.15\hsize'. \hsize
is the TeX dimension
containing the current line width.
For what overfull boxes you have, however, TeX will print a large, ugly, black rectangle beside the line that contains the overfull hbox unless told otherwise. This is so you will notice the location of the problem if you are correcting a draft.
To prevent such a monstrosity from marring your final printout, write
the following in the beginning of the Texinfo file on a line of its own,
before the @titlepage
command:
@finalout