I read the excellent reply by David Carlisle on a line breaking question. However, one question remained open for me.
Carlisle wrote:
\hfuzz
does not affect the typesetting in any way but just stops TeX complaining if the box is is only slightly over-full.
and
[…]
\emergencystretch
does not change the setting of "good" paragraphs, it only changes the setting of paragraphs that would have produced over-full boxes.
Both options on their own are clear. Does \hfuzz
only remove warnings from the stdout and log file or does it also prevent emergency stretching?
As an example assume \emergencystretch = 1em
and \hfuzz=5pt
. If an hbox were overfull by 3 pt would the whitespace still be stretched to avoid it? (If it were, the considerably increased whitespace between words might be worse than overrunning a paragraph by an amount which is under the threshold of the writer.)
Best Answer
No,
\hfuzz
doesn't affect the line breaking decisions.TeX will use a sequence of line breaks so that no line is overfull/underfull, if it's able to find one. Otherwise it will use the sequence the least amount of demerits even if a line is overfull/underfull; the value of
\hfuzz
only affects the console/log output: if a line is overfull beyond\hfuzz
, you'll be warned.If I take Ulrike’s example and set
\tracingparagraphs=1
, the first two paragraphs show exactly the same trace:The only difference is that no warning message is shown in the second case, where
\hfuzz
has been set to 40pt.Now change the example to
The first paragraph will have a line which is overfull by 36.27544pt. The second and third paragraphs are typeset exactly in the same way, regardless of the changed value of
\hfuzz
, which would allow the third paragraph to be set alike the first one, if it affected the line breaking decision. Here's the log.First paragraph
Second paragraph
Third paragraph
Console output