# Bug in Line Breaks?

A certain line I have written seems to never want to break on the pair of words "on groups", unless I forcibly add \linebreak. I demonstrate this in the following picture, which uses ~ to force certain words together; code below. I don't know why it won't break between "on" and "groups".

I don't have a solution/reason for this myself. I can easily fix it by just adding \linebreak if I end up keeping this sentence in this position. I'm just posting it here for those who are interested and/or work on TeX.

\documentclass{article}

\usepackage{geometry}
\geometry{
a4paper,
total={210mm,297mm},
left    = 35mm,
right   = 35mm,
top     = 35mm,
bottom  = 35mm,
}

\usepackage{lipsum}

\begin{document}

%\lipsum[1]

Teyssier's original approximation lemma is written for conjugacy-invariant RWs on groups. We ttttttttttttt it to RWs on homogeneous spaces corresponding to Gelfand pairs...

Teyssier's original approximation lemma is written for conjugacy-invariant RWs on groups.~We ttttttttttttt it to RWs on homogeneous spaces corresponding to Gelfand pairs...

Teyssier's original approximation lemma is written for conjugacy-invariant RWs on groups.~We~ttttttttttttt it to RWs on homogeneous spaces corresponding to Gelfand pairs...

Teyssier's original approximation lemma is written for conjugacy-invariant RWs on groups.~We~tttttttttttttttttttttttt it to RWs on homogeneous spaces corresponding to Gelfand pairs...

Teyssier's original approximation lemma is written for conjugacy-invariant RWs on\linebreak groups. We ttttttttttttt it to RWs on homogeneous spaces corresponding to Gelfand pairs...

%\lipsum[1]

\end{document}


David Carlisle suggests below that TeX does not allow word-spacing as large as in the final line without manual input. I haven't verified this personally, but I presume he is correct. I guess this is more a design flaw than a bug. Surely no-one prefers an overfull box so large that the text goes beyond the margin and doesn't actually get printed versus a slightly larger inter-word space!

There is no bug here, breaking after on would require stretching the inter-word spaces more than is allowed by default. You could use \sloppy to allow white space to stretch more, then it does break there.
• @SamOT I do not see why you think it is a design flaw, it seems expected behaviour to me. There are always some paragraphs that give over or underfull box warnings and need some hand adjusment. As for the amount of sretch being the issue, you don't need to believe me, try it with \sloppy (I did check in advance that that worked in his case). TeX will always prefer to have an ovrfull box (with a warning) rather than over-stretch the space, so if you never want overfull boxes you should allow the space to stretch more. Apr 7 at 10:34
• @SamOT I think I once saw someone argue that if one has to choose between typesetting overfull and underfull boxes, overfull boxes are the better choice because they are easier to spot. Both cases need user intervention, but overfull boxes show more clearly that something is wrong. If you don't want to go all the way to \sloppy, setting \emergencystretch to a high value should make underfull boxes more likely. Apr 7 at 13:18