1

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!

1 Answer 1

3

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.

8
  • So it's better to extend forever (it appears)? One can argue about whether a 4.3pt overflow is better than moving "groups" to the next line, but clearly the penultimate one is not better by anyone's measure! I must confess, I am skeptical of your claim that the stretch would be more than allowed, too... I am close to certain that I have had some which are stretched significantly more in the past—like, maybe 1.5x as much. Still, you are extremely knowledgeable, so maybe I'm mistaken! Either way, it's either a bug or a design flaw =P
    – Sam OT
    Apr 7 at 9:51
  • 1
    @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
  • I'm not suggesting one should never want certain things. Just, clearly, the penultimate version is a lot worse than the final version! It's picking an option that (surely) most people would say is worse—arguable, even objectively worse. That's what I meant by "design flaw". I guess one could summarise the issue as "having a (pretty small) maximum stretch, but no maximum overfull—including going so far into the margin that it's no longer printed on the page". Ideally, I just rephrase/structure my sentence/paragraph. This way, by designing my writing better, I avoid both pitfalls! :)
    – Sam OT
    Apr 7 at 11:44
  • @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.
    – moewe
    Apr 7 at 13:18
  • 1
    @SamOT actually it is rather the other way, underful boxes are allowed at varying degrees of badness but any overfull box is maximally bad. One consequnce of that is that a box that is 1 metre over full is no worse than a box that is 1pt overfull. This does mean (and Knuth even documents it in the texbook) that the one really bad overfull line gets preferred over lots of fairly bad lines, That may not mach your intuition but it's aa rational outcome of the least cost algorithm used to find line breaks. Apr 7 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.