Repository navigation
\sloppy and \fussy do what latex.ltx says they do - #769
Conversation
Both were `\def\sloppy{}` / `\def\fussy{}` — empty. latex.ltx:13367-13378 is the
whole of them:
\sloppy \tolerance 9999 \emergencystretch 3em \hfuzz .5\p@ \vfuzz\hfuzz
\fussy \emergencystretch \z@ \tolerance 200 \hfuzz .1\p@ \vfuzz\hfuzz
⛔ \sloppy IS IN 775 OF THE 2935 CORPUS PAPERS — 26.4%, measured with TeX
comments stripped. A quarter of the corpus asked the line breaker to loosen and
this engine answered by doing nothing.
That census is also why this is the change being made rather than the
hyphenation exception list, which was next on a list I had ordered by how
clearly wrong each item looked:
\raggedright 871 29.7%
\sloppy 775 26.4%
\emergencystretch 301 10.3%
\hyphenation 170 5.8%
\uchyph 9 0.3%
\tolerance is the one this engine acts on (paragraph.go:195 reads it through
namedInt), so this takes effect. \emergencystretch, \hfuzz and \vfuzz are
accept-and-ignore parameters — the same as they already are when a document
assigns them directly — and are set so the definitions stay honest for a
document that reads them back.
⚠ \sloppy'S EFFECT IS CONDITIONAL, which is pinned by a test so a future reader
does not take a no-change for a broken command. Measured against tectonic
0.17.0: the same paragraph at \hsize=100pt comes out IDENTICAL under \fussy and
\sloppy, because it already fits within \tolerance=200. The two part only when
the paragraph genuinely fails at 200 — at \hsize=45pt the reference goes from
5 lines to 8.
The tolerance test asserts the STARTING value first, because \fussy's value and
the default are both 200 and a \fussy that did nothing would otherwise look
like one that worked. It also pins that the assignment is group-scoped: a
document that loosens one paragraph has not loosened the rest.
⚠⚠ THE CORPUS A/B IS OWED AND HAS NOT RUN. This changes paragraph breaking for
a quarter of the corpus and the honest measurement is a before/after against
the reference, not a witness. It has not run because the machine's 1-minute
load average is 73 — page counts would be exact under load, but 120 compiles
now would starve the ~27 other sessions sharing this host for hours. Deferred
on purpose and said out loud; this should not merge until it has run.
⚠ AND A LARGER DIVERGENCE SITS BESIDE THIS ONE. Our DEFAULT breaking is already
about as loose as the reference's \sloppy — 5 lines against our 8 on that 45pt
witness, with the font and the measure controlled. That is #768 and is not
addressed here; it is the opposite of the long-standing reading in #381/#449
that our lines hold MORE than the reference's.
Refs #768.
Co-Authored-By: Claude Opus 5 <[email protected]>
|
The corpus A/B this PR said it owed has now run, and it says do not merge this yet. The measurement60 papers sampled from a 200-paper pool, same seed both sides, One paper of 37 moved, and it moved down. Two controls, because one number is not a resultDoes the change act where it should? Was there enough exposure to conclude anything? 44 of the 200-paper pool use Without the second control, "1 of 37 moved" could have meant "the only exposed paper moved", which would be a very different sentence. What it meansThe change is faithful — it is what
So this is a correct change whose benefit is dominated by #768, and merging it now buys a measured −0.1% on one paper and nothing anywhere else. What I am doing with itLeaving it a draft. It should be re-measured after #768, where the same change over a breaker that is no longer too loose has a reason to help. The code and the tests are ready; it is the ordering that is wrong, not the work. ⚠ Not claimed: that it would help after #768. That is a hypothesis with a clear test, and the test is this same A/B run again. 🤖 Generated with Claude Code |
|
Re-measured against the new #768's finding (2) is fixed (#780, The witness, all four paragraphsSame file,
⭐ Our ⛔ And we do not reproduce the reference's ⚠ So the two commands do now part, which is what this PR said its own test pins and what it could not demonstrate before: our What is still owedThe corpus A/B. Machine 1-minute load is 12.8 right now, and the rule here is not to measure above ~8 — counts would be exact but a timeout changing which papers get scored is exactly the failure that makes an A/B unreadable. Deferred on purpose, not forgotten; the branch is ⚠ Not claimed: that this now helps the corpus. The previous A/B found 1 paper of 37 moved and it moved DOWN (-0.1). That measurement was taken against a breaker that has since been rewritten, so it says nothing about this one either way. 🤖 Generated with Claude Code |
|
The A/B this PR owed has run, properly this time, and the hold reason is gone: This PR was held with: "a correct change whose benefit is dominated by #768 … It should be re-measured after #768, where the same change over a breaker that is no longer too loose has a reason to help." #768's finding (2) is fixed (#780, #781), so that is the measurement. The run
41 papers both sides, identical populations, no status flips, no page count moved. Five papers moved at all, every one of them by a thousandth of a divergence point: Four improved, one worsened, all far inside the noise. What that changesThe previous A/B — taken against the old breaker — found 1 paper of 37 moved and it moved down (−0.1). That regression is gone: over a breaker that is no longer too loose, So the honest position is: a faithful port with no measured corpus effect, which is the shape that lands. ⚠ And it is not the reference's ⚠ Not claimed: that Marking ready on that basis. 🤖 Generated with Claude Code |
\sloppy and \fussy do what latex.ltx says they do
Both were
\def\sloppy{}/\def\fussy{}— empty. latex.ltx:13367-13378 is thewhole of them:
⛔ \sloppy IS IN 775 OF THE 2935 CORPUS PAPERS — 26.4%, measured with TeX
comments stripped. A quarter of the corpus asked the line breaker to loosen and
this engine answered by doing nothing.
That census is also why this is the change being made rather than the
hyphenation exception list, which was next on a list I had ordered by how
clearly wrong each item looked:
\tolerance is the one this engine acts on (paragraph.go:195 reads it through
namedInt), so this takes effect. \emergencystretch, \hfuzz and \vfuzz are
accept-and-ignore parameters — the same as they already are when a document
assigns them directly — and are set so the definitions stay honest for a
document that reads them back.
⚠ \sloppy'S EFFECT IS CONDITIONAL, which is pinned by a test so a future reader
does not take a no-change for a broken command. Measured against tectonic
0.17.0: the same paragraph at \hsize=100pt comes out IDENTICAL under \fussy and
\sloppy, because it already fits within \tolerance=200. The two part only when
the paragraph genuinely fails at 200 — at \hsize=45pt the reference goes from
5 lines to 8.
The tolerance test asserts the STARTING value first, because \fussy's value and
the default are both 200 and a \fussy that did nothing would otherwise look
like one that worked. It also pins that the assignment is group-scoped: a
document that loosens one paragraph has not loosened the rest.
⚠⚠ THE CORPUS A/B IS OWED AND HAS NOT RUN. This changes paragraph breaking for
a quarter of the corpus and the honest measurement is a before/after against
the reference, not a witness. It has not run because the machine's 1-minute
load average is 73 — page counts would be exact under load, but 120 compiles
now would starve the ~27 other sessions sharing this host for hours. Deferred
on purpose and said out loud; this should not merge until it has run.
⚠ AND A LARGER DIVERGENCE SITS BESIDE THIS ONE. Our DEFAULT breaking is already
about as loose as the reference's \sloppy — 5 lines against our 8 on that 45pt
witness, with the font and the measure controlled. That is #768 and is not
addressed here; it is the opposite of the long-standing reading in #381/#449
that our lines hold MORE than the reference's.
Refs #768, #381, #449, #780, #781.
(#768's finding (2) is fixed by #780/#781, which is what unblocked this; its
finding (1) is what this PR implements. #381 and #449 stay open on purpose —
they are the line-capacity reading this PR's own text argues against, and it
does not settle them: the clean A/B after the rebase moves no page count at
all.)
⭐ Re-measured 2026-11-14 after #780/#781 — corpus-NEUTRAL, which removes the
reason this was held. Rebased onto
3afebd8so the only difference is\sloppy/\fussy; 60 sampled at seed 1, load 5.1-5.7:41 papers both sides, no status flips, no page count moved, five papers moving
by thousandths. The earlier A/B's −0.1 on one paper is gone: over a breaker that
is no longer too loose, this costs nothing. It does not help either.
⚠ And it is not the reference's
\sloppy: on #768's witness ours now gives thereference's
\fussyline for line while the reference's\sloppysets nineunderfull lines. Separate divergence, not claimed fixed here.
Co-Authored-By: Claude Opus 5 [email protected]