Bug in Line Breaks

line-breaking

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.

enter image description here

\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!

Best Answer

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.

Related Question