Post by m***@gmail.comI'm not doing anything fancy in LaTeX but I'm getting these "Overfull
\hbox" errors. Sometimes they say that xx.xxpt is too wide in a certain
paragraph, and the text extends past the margins, or it gives me an
Underfull error reporting "(badness 10000)", which is significantly
badassness, but irritating. The underfull errors don't appear to give
any noticeable formatting glitches in the output pdf file.
I realize I can manually break the line to remove the overfull error,
but that seems unnatural. And I have no idea what the underfull errors
are for.
There can be many contributory reasons, but the net effect in normal LR
setting is that an overfull \hbox means that there is a hyphenation or
justification problem: moving the last word on the line to the next line
would make the spaces in the line wider than the current limit; keeping
the word on the line would make the spaces smaller than the current
limit, so the word is left on the line, but with the minimum allowed
space between words, and the warning is given so that you can find the
line and fix it.
An underfull \hbox in the same circumstances means the reverse: adding
another word to the line would make the spaces in the line smaller than
the current limit; moving the word to the next line would make the
spaces larger than the current limit, so the word is moved to the next
line and the line is spaced out, and the warning is given so that you
can find the line and fix it.
(This isn't the whole of it, but it's enough for the moment.)
There are lots of ways to handle this. Some people inevitably ask "why
doesn't [La]TeX 'just do it right' by itself, like [wordprocessor]?" If
you examine the output of most other systems, they have fudged the issue
by making the wordspace far too wide or narrow on these occasions, or
even resorting to unpleasant letter-spacing. In almost all cases the
output is markedly inferior to [La]TeX's.
José Carlos has already posted some solutions; other possibilities are:
1. if it's your own text, reword it slightly;
2. set \spaceskip to the width of a lower-case e, variable by going as
narrow as the width of a lower-case i, or as wide as a lower-case m.
These values were given to me by an old hot-metal compositor: I don't
know how useful they are for digital type. It's usually A Bad Idea to
meddle with the type-designer's settings for word-spacing, if any,
but it may be needed for particularly narrow settings relative to the
type size;
3. make changes to the hyphenation so that the paragraph breaks
differently;
4. manually break the line where the error occurs (this is usually a
mistake in a long document if you are revising it, as you will almost
certainly reword some of it at some stage, and then the manual break
won't be needed);
5. change the typeface or size (usually not a realistic option though).
///Peter