Repository navigation
Description
Two findings from one witness, and the second is the larger one.
The witness
Same text, same 45pt measure, same face (lmroman10 at 10pt on both sides after #764). The only difference between the two paragraphs is the command:
\hsize=45pt
{\fussy \noindent Typographical incomprehensibilities overwhelm every paragraph.\par}
{\sloppy \noindent Typographical incomprehensibilities overwhelm every paragraph.\par}tectonic 0.17.0
\fussy \sloppy
Typographical Typographical
incomprehen- incompre-
sibilities over- hensi-
whelm ev- bilities
ery paragraph. over-
whelm
5 lines every
para-
graph.
8 lines
go-tex/engine
\fussy \sloppy
Typo- Typo-
graphical graphical
incompre- incompre-
hensibil- hensibil-
ities over- ities over-
whelm whelm
every para- every para-
graph. graph.
8 lines 8 lines — identical
(1) \sloppy is a no-op here
latex.go:1353 is \def\sloppy{}. LaTeX's is \tolerance=9999 \emergencystretch=3em \hfuzz=.5pt \vfuzz=\hfuzz.
170 of 2935 corpus papers set \hyphenation; 775 set \sloppy — 26.4%, measured with comments stripped. \tolerance is plumbed (paragraph.go:195 reads e.namedInt("tolerance")), so defining the command would take effect today; \emergencystretch is accept-and-ignore and is go-typeset/linebreak#12 item (6).
⚠ And its effect is conditional, which is worth knowing before implementing it: at \hsize=100pt the same paragraph comes out identical under \fussy and \sloppy in the reference, because it already fits within \tolerance=200. A witness for \sloppy has to be a paragraph that genuinely fails at 200.
(2) The larger one: our default is already as loose as the reference's \sloppy
Our \fussy gives 8 lines where the reference's gives 5, and our 8 are close to what the reference produces only when asked to be sloppy.
The reference, at \tolerance=200, would rather set incomprehen-/sibilities over-/whelm ev-/ery paragraph. — four more-or-less full lines — than break the word three times. We break it three times by default.
That is the opposite of the long-standing corpus reading (#449, #381: "our lines hold MORE than the reference's"), and it is on the same channel: lines decide pages. It looks like the emergency pass at paragraph.go:251-258, which raises the tolerance to maxBadRatio when a bad line survives — a pass TeX reaches only with \emergencystretch set, and reaches differently (§863 adds stretch to the background; it does not widen the tolerance).
⚠ Not claimed: that (2) explains any part of the corpus deviation, or that the emergency pass is the cause rather than a candidate. What is measured is the 5-versus-8 above, on one witness, with the font and the measure controlled.
What I would do next, in this order
- Define
\sloppyand\fussyproperly — cheap, 26.4% of the corpus, and\tolerancealready works. - Then re-measure this witness. If our
\fussystill gives 8, (2) is independent of (1) and is the real finding.
I have not done either: (2) changes paragraph breaking for every document and wants a corpus A/B behind it, not a witness.
Refs go-typeset/linebreak#12, #583, #381, #449.
🤖 Generated with Claude Code
Prior art: priorart "sloppy fussy tolerance emergency pass paragraph too loose" at 2026-11-12 21:47 CET reported prior art; checked: 368 entries. #194 (merged) brought TeX's two passes and the parameters a document sets — \tolerance is plumbed because of it, which is why (1) is cheap. #381 and #449 (open) read the corpus as 'our lines hold MORE', which the 5-vs-8 here contradicts on one witness and is why I am filing rather than appending. #754/#765 are my own audits and name neither \sloppy nor the emergency pass. #666 (closed) is \parfillskip, a different pass.
Activity
tannevaled commentedon Nov 13, 2026
The control this issue was missing. #762 landed, so the question can now be asked instead of inferred.
Same face, same space, same tolerance — and 5 lines against 8
On the witness above (
\hsize=45pt,Typographical incomprehensibilities overwhelm every paragraph.), both engines answer:\fontname\font[lmroman10-regular]lmroman10-regular\the\fontdimen2\font\the\toleranceThe reference sets that paragraph in 5 lines and we set it in 8.
So finding (2) is not a font difference wearing a line-breaking costume, and it is not a tolerance that was quietly different: with the face, the interword space and the badness threshold all identical, the two breakers reach different answers. That is as clean a separation as this witness can give.
⚠ What this does not establish. Which part of the breaker. The candidates named in the issue stand unchanged — the emergency pass at
paragraph.go:251-258raising the tolerance tomaxBadRatio, and go-typeset/linebreak#12's missing glue orders — and nothing here chooses between them. It also remains one witness; the corpus A/B is a separate measurement and has not been run for this.⚠ And one thing that is now measurable and was not. Before #762, confirming the face and the space meant rendering to SVG and subtracting glyph positions, which is how the font half of #449 and #612 had to be done.
\fontnameanswers it directly, so the next person checking a breaking divergence can rule out the font in one line rather than in an afternoon.🤖 Generated with Claude Code
tannevaled commentedon Nov 13, 2026
⛔ Correcting myself: finding (2)'s characterisation is wrong, and the direction is the opposite of what I wrote.
I said "our default breaking is already as loose as the reference's
\sloppy". The measurement that follows says we are not looser — we are more eager to break.What the reference's log says
The
\fussyparagraph of that witness, at\hsize=45pt:Four overfull lines, up to 18.16pt past a 45pt measure. That is where its 5 lines come from: it sets
Typographicalwhole, overhanging the margin by a third of the measure, rather than hyphenate it.Our 8 lines all fit. We hyphenate five times and stay inside the measure; the reference hyphenates three times and spills.
So the diagnosis changes
Not "we are looser" but "we will not leave a line overfull, and TeX will".
tex.web's breaker deactivates a node when nothing feasible exists there and ends up recording the forced break with its overfull line; the engine's wide-open pass (
paragraph.go:251-259, tolerance raised tomaxBadRatio) instead finds a feasible solution by taking more hyphens. Both are "the last pass", and they resolve the same dead end in opposite directions.That also puts this issue beside #583 — "an overfull line with fill glue is accepted" — rather than opposite it: the two are about where the overfull/feasible boundary sits, from the two sides.
What survives from the original finding, and what does not
Survives: the 5-versus-8 itself, and its control — same face (
lmroman10-regular), same\fontdimen2(3.33pt), same\tolerance(200), verified with #762. It is a line-breaking divergence and not a font one.Does not survive: "looser". Nor the suggestion that raising our tolerance further explains it — if anything our willingness to hyphenate is what needs reducing, not our tolerance.
Still open and now better posed: which pass. The candidates are unchanged — the wide-open pass here, and go-typeset/linebreak#12's missing glue orders — but the question to ask them is now "why does the dead end resolve to hyphens here and to an overfull line there" rather than "why are we looser".
⚠ And the
\sloppyhalf of this issue is unaffected:\sloppywas\def\sloppy{}and is now implemented (#769), whose own A/B showed it changes one paper of 37 and slightly for the worse — consistent with the corrected reading, since asking for more tolerance does nothing about a breaker that was never short of tolerance.🤖 Generated with Claude Code
[-]\sloppy is a no-op, and our default breaking is already looser than the reference's \sloppy[/-][+]\sloppy is a no-op, and we refuse the overfull lines the reference accepts[/+]an overfull line is SAID, and the paragraph that had none is no longe…
centred text is not hyphenated either, which is why the condition ask…
ragged text is not hyphenated, because an infinite background makes e…
The second pass is the final pass, and we loaded patterns the referen…
tannevaled commentedon Nov 14, 2026
Finding (2) is located: it is the wide-open pass, and removing it gives the reference's five lines. #778 (draft).
The witness, four ways
\hsize=45pt,\fussy, face and\toleranceverified identical as in the comment above:FinalPassarmedparagraph.go:319breaks the paragraph again at\tolerance=maxBadRatiowhenever the pass above left a bad line.tex.webhas no such pass — §863 has three, and none of them raises the tolerance. The pass above had already found the reference's answer; this one threw it away, becausehasBadLineis true of a solution TeX deliberately chose. At\tolerance=200a short line with no stretch has badness 10000 and is not feasible, so TeX overhangs rather than hyphenate. That is this issue's corrected diagnosis read from the other side.What unblocked it
Params.FinalPasscould not be armed whilego-typeset/linebreakrecorded every forced break whatever its badness and ranartificial_demeritsoutside §16769's branch. Both are that package's #12 item (5) and its neighbour, fixed in v1.4.0. With the flag armed, §863'sfinal_pass:=(emergency_stretch<=0)is simply what this engine's second pass is.And the last divergence on the witness was not the breaker at all
The reference sets
whelm ev-/ery para-where we setwhelm/every para-. The engine embeddedushyphmax.texand loaded all of it:hyphen.tex's patterns, a marker, then 492 additions. LaTeX loadshyph-en-us.tex— the first half..ev2is an addition and outrankshyphen.tex'sev1erat the same position; 2 is even, so it forbids the break.everyhad no break point at all. tectonic at\hsize=18ptsetsev-/ery, and so do we now; the other words of this witness break exactly where they did.Why the pass is not removed in #778
Four tests go red without it, all saying a word that must be hyphenated stops being hyphenated:
linebreak#12item (1) — one float of stretch,plus 1filflattened to a large finite number — makes a\raggedrightline TeX scores at badness 0 score 10000 here, so TeX's pass 2 has a feasible solution and hyphenates inside it while ours has none and takes the single overfull line. The wide-open tolerance hides that by making everything feasible.Order:
linebreak#12item (1), then the pass, then this issue.⚠ Not claimed: any corpus effect. The A/B is owed on #778 and has not run — the machine's 1-minute load is 62.
🤖 Generated with Claude Code
The second pass is the final pass, and we loaded patterns the referen…
\leftskip/\rightskip are the background, glue orders are carried, and…
tannevaled commentedon Nov 14, 2026
Finding (2) is fixed and on
main— #780, merged, CI green at11de0a1.The wide-open
maxBadRatiopass is gone. It could not go until the two things it was standing in for were real, which took three releases:go-typeset/linebreakv1.4.0artificial_demeritslives inside that branchgo-typeset/linebreakv1.5.0\leftskip/\rightskipare the background of every line (§16307-16315)On this issue's own witness (
\hsize=45pt,\fussy), face and\toleranceverified identical:Five lines against the reference's five, lines 1-3 matching to 0.02pt. This morning: seven.
⚠ What is left of this issue. Finding (1),
\sloppy, is implemented in #769 and still a draft: it was held pending this, on the reasoning that raising the tolerance "asks for more of what we already do too much of". That reasoning is now obsolete — the breaker is no longer too loose — so #769's own A/B is worth re-running against thismain, which is exactly the test it said to run.⚠ And the residue on the witness is not the breaker:
ev-eryis a hyphenation point the reference takes on the same patterns and we do not. Separate from both findings.⚠ Not claimed: a corpus gain. Over 40 papers line agreement went 91.23 → 91.34% and exact page counts 12 → 13/40, against Σ|page error| 123 → 125 and divergence 3.884 → 3.935. The full table is on #780; two of the three papers that moved a page are #381 showing through.
🤖 Generated with Claude Code
the skips' width is taken off the measure ONCE: #780 counted it twice (…
\sloppy and \fussy do what latex.ltx says they do (#769)
tannevaled commentedon Nov 15, 2026
The
ev-eryresidue is not hyphenation: the break is offered and the breaker declines it. One probe settles which half to look at, which the earlier note left open.Asked of the hyphenator this paragraph actually uses, at
main:ev-eryis there, at exactly the position the reference takes, and the min-affix limits (2 left, 3 right) admit it. So the discretionary reaches the horizontal list and the line breaker then does not use it.That removes the two candidate explanations that would have been about patterns — a missing pattern, or a
\lefthyphenmin/\righthyphenminthat forbids a two-letter prefix — and leaves the one recorded earlier on this issue: our active list retains a node TeX deactivates, so theonlyActiveclause that authorises an artificial break cannot fire. Unmeasured; this comment narrows where to look rather than claiming the mechanism.⭐
hy-phen-ationis also worth one line, since it is the word TeX's own manual uses as its example of whathyphen.texgets right, and we get the same two points.⚠ Not claimed: that the breaker is wrong to decline it. Both sides set five lines on this witness; the residue is which break fills them, and nothing here says whose choice has the lower demerits.
🤖 Generated with Claude Code
tannevaled commentedon Nov 15, 2026
Retiring the hypothesis I left on this issue. I read tex.web §16824-16831 and the breaker's own code against it, and the artificial-demerits clause is implemented faithfully — including the part I suspected.
What I had recorded was: our active list may retain a node TeX deactivates, so the
onlyActiveclause cannot fire. The source says:with Knuth's own warning two lines above it: "This particular part of TeX was a source of several subtle bugs before the correct program logic was finally discovered; readers who seek to 'improve' TeX should therefore think thrice before daring to make any changes here."
go-typeset/linebreakv1.5.0linebreak.go:397-399:Term by term:
final_pass→p.FinalPass; the enclosing branch(b>inf_bad)or(pi=eject_penalty)→desperate;link(r)=last_active and prev_r=active→onlyActive(len(active) == 1);minimum_demerits=awful_bad→ all fourbestHereentries nil, which is right becauseminimum_demerits"keeps track of the smallest value in the minimal_demerits array" (§16432-16433) across the four fitness classes, not one of them.⭐ And the one place those two could have diverged, they cannot.
minimum_demeritsis reset mid-walk, at §16490-16492, each time the line-number class changes — so in principle TeX could fire the clause for a later line class after recording a break for an earlier one, wherebestHerewould still be full. It cannot happen:prev_r=activerequiresrto be the first active node andlink(r)=last_activethe last, so the clause is only ever reached with one active node and therefore one line-number class, and no mid-walk reset has occurred. The two conditions are equivalent, and the shortcut is sound.So the
ev-eryresidue is not this clause, and it is not hyphenation either (the previous comment: the break is offered at exactly the reference's position). What is left is the demerits arithmetic choosing a different break among feasible ones —\adjdemerits,\doublehyphendemerits,\finalhyphendemerits, the fitness classification — which is a different investigation from the one I had queued, and a smaller claim than "a node is retained".⚠ One structural observation from the same reading, unfiled
KnuthPlassWith(items []Item, lineWidth float64, p Params)takes onelineWidthfor the paragraph, and the per-position loop keeps onebestHere[4]across the whole active list. tex.web keepsminimal_demerits[fit_class]per (line-number class, fitness class) and flushes it wheneverl > old_lwhile walking (§16461-16472), witheasy_lineas the optimisation for the case where every line has the same width.For a uniform paragraph the two agree exactly, which is why nothing has shown it. For
\parshapeand\hangindent— where the width is a function of the line number — there is no way to express the width through this API at all, so the line-number-class dimension has no counterpart rather than a wrong one.⛔ Not filed, deliberately:
priorart --repo go-tex/engine "parshape hangindent per-line width in the line breaker"exited 2 — the tracker and the branch list were both unread, stopped at the API budget reserve (715 left, 1000 held back). An unread surface is not an absence of prior art, and this repository has ahangindentbranch I already know of, so filing now would risk duplicating work I simply could not look for. Recording it here so it is not lost, to be checked against the tracker when the budget allows.⚠ Not claimed: that the collapse is a defect. For every witness on this issue it is exactly equivalent; whether it matters is a question about documents this breaker cannot currently be asked about.
🤖 Generated with Claude Code
tannevaled commentedon Nov 15, 2026
The obvious next instrument — ask the reference to print its own demerits — does not exist in the reference we have, and tex.web says precisely why.
Having narrowed the
ev-eryresidue to the demerits arithmetic, the right oracle is\tracingparagraphs: TeX printsb,panddfor every feasible break it considers, so the reference states its own reason instead of being inferred from its output. Run on this issue's witness against tectonic 0.17.0:Tried both in the preamble and in the body, with
\tracingonline0 and 1, reading both the log and stdout. TheOverfull \hbox (33.1pt too wide)is there, so the paragraph was broken and the log was written.⛔ And the positive control, because an absent trace and a stripped log look identical.
\tracingcommands=1on the same engine, same flags:Six hits. So tracing works; it is this trace that is missing.
Why, from tex.web
Every
tracing_paragraphssite in tex.web sits inside the@!stat … tatsconditional — the WEB section that a build can omit:— nine of them, and the same for
tracing_pages,tracing_restoresandtracing_stats.tracing_commandsis not:A bare
if. So a TeX compiled without thestatsection emits\tracingcommandsand emits no paragraph trace — exactly the asymmetry measured above. The control and the source agree, which is what makes this a finding about the build rather than a guess about tectonic.(No other TeX is installed here:
which pdftex xetex luatex tex etexfinds none.)What follows
tex/pdftexwould print it. Worth having on the measurement host for this class of divergence, and it is the cheapest route to the reference's own demerits.\tracingparagraphsis intexparams.go:25as an accepted count with no effect, so neither engine can currently be asked why it chose a break. tex.web §16854-16874 gives the exact format, and emitting it needs a trace hook ingo-typeset/linebreak(the demerits live there) with the engine wiring the parameter to it. That makes every future break divergence a diff of two traces instead of an inference from glyph positions.⚠ Not claimed: that tectonic is at fault, or that its maintainers disabled anything deliberately. What is measured is that this binary does not emit the trace while it does emit another, and tex.web explains how that combination arises.
🤖 Generated with Claude Code
tannevaled commentedon Nov 15, 2026
A sourced fix landed, and it does NOT move this witness. Saying so before anyone reads the merge as progress on
ev-ery.Following the narrowing to the demerits arithmetic, go-typeset/linebreak#15 is merged: the paragraph-ending break is tex.web:17198's distinguished call
try_break(eject_penalty,hyphenated), so at that break the test(break_type=hyphenated)and(type(r)=hyphenated)reduces to "was the previous break a hyphen", andcur_p=nullselects\finalhyphendemerits. The caller hadatEnd = b == n(the last line ends at the forced penalty, not atn) andflagged = flaggedAt(items, b)(a\penalty-10000, never flagged), so neither parameter was charged and a hyphen on the last line but one was free. Both halves mutate red by assertion.Measured on this witness, with the fix linked
go.modreplaced to the fixed clone, confirmed in effect (go list -m→v1.5.0 => …/linebreak-finalhyph), engine atmain4d20b7b:No
ev-. Identical to before:whelmthenevery para-, two overfull lines where the reference has one.Why it cannot move it, which is the useful part
Both candidate solutions end the same way:
The penultimate break is
para-— a hyphen — in both. So\finalhyphendemeritsis now charged to both and cancels. The fix is real and it is invisible here by construction.⚠ And the charge TeX adds that we still do not goes the other way: the reference's
para-break hastype(r)=hyphenated(r isev-), so TeX also charges it\doublehyphendemerits— 10000 — and the reference still wins. Whatever makesev-erycheaper for TeX is worth more than 10000 demerits, so it is not a demerits term that is missing. It is the badness of those lines.Which points at a filed divergence, verified here
go-typeset/linebreak#12 item (2): widths go into prefix sums, so a penalty's width is charged to every line that does not break there, where tex.web §869-§870 add
disc_widthonly for the break being tried. This engine's workaround is in its own words,paragraph.go:580-588:So the line that does break at a hyphen is measured without the hyphen it will carry — about 2.5pt at 10pt, on a 45pt measure.
whelm ev-is scored as if it were a hyphen narrower than it will be set, and so isevery para-. That is a badness error of the right size and in the right place to decide this break, and it is exactly what item (2) describes.⚠ Not claimed: that item (2) explains
ev-ery. It is now the leading candidate with a mechanism and a measured address, not a demonstrated cause — the previous two candidates (the artificial-demerits clause, then hyphenation itself) were each eliminated by measurement rather than argued away, and this one deserves the same treatment.⚠ Also not claimed: that #15 helps anywhere. On this witness it is neutral by cancellation; its effect is on paragraphs whose penultimate break is a hyphen where the alternative's is not, and no corpus figure is offered — the machine's 1-minute load average is 14.6, over the ~8 threshold, so the A/B is deferred rather than taken badly.
🤖 Generated with Claude Code
\tracingparagraphs: let the breaker state its own reasons, in TeX's f…
tannevaled commentedon Nov 15, 2026
The instrument exists now, and the engine side is one API decision — which reading
Optionssettles. Writing it here rather than as its own issue, for a reason stated at the bottom.go-typeset/linebreakv1.7.0 shipsParams.Trace, anio.Writercarrying TeX's own paragraph log in tex.web's format:Emitted where tex.web emits it — the feasible break at
:16843, inside "Record a new feasible break" and before the champion comparison, so every break considered appears and not only the winners; the active node at:16659, as it is linked in, which is where the serial is assigned. A test pins that the breaking is identical with the log on and off.What the engine needs, and the one thing that had to be decided
⛔
Optionshas no log destination at all.Diagnosticsis a struct returned after the compile, not a stream, and nothing inOptionstakes a writer or a callback. So the trace cannot be wired without adding a field, which is why this was worth settling before writing code rather than during.Options.Trace io.Writeris the right shape, for three reasons: a trace is a stream and can be megabytes on a real document, so it does not belong in a summary struct;io.Writerlets a host send it to a file, which is where TeX puts it; and it composes withlinebreak.Params.Tracewithout translation.The insertion points are small and already in one place:
paragraph.go:205-212buildsLineBreakParams— setTracethere whene.namedInt("tracingparagraphs") > 0andopt.Trace != nil.\pretolerancepass builds its ownqat:213-215, so@firstpass,@secondpassand@emergencypass(:16990,:17013,:17017) go around the three.texparams.go:25already accepts\tracingparagraphsas a named count, so no parameter plumbing is needed — only that its value stop being ignored.⚠
\tracingonlinecannot be honoured and should be documented as such rather than faked. It selects between TeX's log file and its terminal; with a single writer there is one destination, and pretending otherwise would be a parameter that reads as working and does nothing.⛔ And the trace cannot arrive on its own. v1.7.0 also carries v1.6.0's
\finalhyphendemeritsfix, which changes paragraph breaking, so the bump owes the corpus A/B that #784 is already held for — the host's 1-minute load average has been 14.6, then 22.3, then 133 today, all far over the ~8 threshold this repository measures under. Whoever takes it should either fold it into #784 or wait; what it must not be is merged as "just a feature" because the trace half is harmless.⚠ Not filed as its own issue, deliberately.
priorart --repo go-tex/engine "tracingparagraphs wire the line breaker trace to a writer"exited 2: the tracker and the branch list were both unread, stopped at the API budget reserve (525 left, 1000 held back). An unread surface is not an absence of prior art, and this repository has 1032 entries on the neighbouring subject — filing now could duplicate something I simply could not look for. This comment keeps the design where its purpose lives until the budget allows the check.🤖 Generated with Claude Code
tannevaled commentedon Nov 15, 2026
The instrument works, I pointed it at this witness, and it says the search I was conducting could not have succeeded: on this paragraph the demerits cannot discriminate at all.
go-typeset/linebreakv1.7.0's trace, wired tobreakSegmentin a throwaway worktree (not committed — the real wiring is theOptions.Tracedesign in my previous comment), on this issue's own witness:52 trace lines, 35 scored breaks. Counted:
⛔ So 31 of 35 candidates cost exactly the same thing. §16902 sets
d:=100000000whenever|line_penalty+b| >= 10000, and §108 caps badness ATinf_bad, so every one of those lines is charged the ceiling and nothing distinguishes them. The paragraph's total, 317 283 089, is three saturated terms plus loose change.\doublehyphendemeritsis 10000.\finalhyphendemeritsis 5000. A hyphen penalty squared is 2500. Those are the quantities that would decidewhelm ev-againstwhelm— and they are four orders of magnitude below the 1e8 terms they are being added to. The demerits arithmetic cannot see the difference, whatever it contains.That explains two dead ends in this issue's own history rather than merely adding a third: the artificial-demerits clause was faithful (measured), and go-typeset/linebreak#15's
\finalhyphendemeritsfix was neutral here (measured) — not because either was wrong, but because this witness saturates the cost function, and I was looking for a term in a sum that cannot resolve it.⚠ And the witness is partly doing it to itself
The source sets
\tolerance=10000, which is what makes a badness-10000 line feasible rather than refused. A paragraph at\tolerance=200would have had those 31 candidates rejected and the passes would have done the work instead. So this is a statement about this witness, not about the breaker in general.⭐ Which gives this issue something concrete it has been missing: a better witness. For the
ev-eryquestion to be answerable, the competing breaks must have badness well under the cap, so that demerits decide and the trace shows them deciding. The witness to build is a paragraph where our breaking and the reference's differ by one hyphen and every line is merely bad — not one where seven lines are hopeless and the eighth is the question.And it corroborates the lead, by a second route
If 31 of 35 lines come out at the badness cap, the suspicion falls on what badness is computed FROM. go-typeset/linebreak#12 item (2) — the hyphen's width charged to every line that does not break there, so the line that does break at a hyphen is measured about 2.5pt short on a 45pt measure — is a systematic error in exactly that input. Reached here from the demerits side, having reached it earlier from the cancellation side, which is two independent routes to the same place.
⚠ Not claimed: that item (2) explains
ev-ery. Still a lead, now with two reasons to look there and one fewer place left to look.🤖 Generated with Claude Code
A penalty's width is charged to the line that breaks there, and to no…
linebreak v1.8.0 instead of v1.6.0: three versions, still ONE behavio…
linebreak v1.8.0: a hyphen on the last line but one stops being free (#…
\emergencystretch reaches the line breaker, so \sloppy means something (
the comment said the pass stays, is gone, and is still here (#797)
tannevaled commentedon Nov 16, 2026
Both findings have landed. Closing, with the witnesses rather than an assertion —
and with one correction to what this issue predicted.
(1)
\sloppyis no longer a no-oplatex.go:1376-1377is LaTeX's own pair:and
\emergencystretchis no longer accept-and-ignore:paragraph.go:390-408reads the dimen, sets
FinalPass = emergency <= 0astex.web:17014does, andruns §863's third pass with the stretch in the background when the second
pass leaves a bad line.
Measured just now on this checkout, same document under each command:
\fussy(\emergencystretch 0pt)\sloppy(\emergencystretch 3em)(
TestEmergencyStretchReachesTheBreaker, withTestWithoutEmergencyStretchNothingChangesas the control: at zero stretch\fussyand the default must agree, or the third pass is firing when TeX's wouldnot.)
This issue counted 775 of 2935 corpus papers setting
\sloppy— 26.4%.(2) Our default was as loose as the reference's
\sloppy— and that pass is goneThe cause was named here as a candidate and it was the right one: the home-made
emergency pass that raised the tolerance to
maxBadRatio. Nothing intex.webdoes that — §863 has exactly three passes and none of them widens the threshold;
the third adds
\emergencystretchto the background.It went with #780, and the measurement is recorded at
paragraph.go:431-443against tectonic 0.17.0 on this issue's own witness (
\hsize=45pt,\fussy):Pass 2 had already found the reference's answer and the extra pass threw it away,
because
hasBadLineis true of a solution TeX deliberately chose: at\tolerance=200a short line with no stretch has badness 10000 and is notfeasible, so TeX overhangs the margin rather than take the hyphens.
⛔ Why it could not simply be deleted, which is the part worth keeping: one
removal attempt (#778) turned six tests red, four of them saying a word that
must be hyphenated had stopped being hyphenated. That was
go-typeset/linebreak#12 item (1) seen from here — the library carried one float of
stretch and flattened
0pt plus 1filinto a large finite number, so a line TeXscores at badness 0 scored 10000 here and was infeasible. The wide-open tolerance
had been hiding that. The library's v1.5.0 carries the glue orders and makes
\leftskip/\rightskipthe background; #780 consumed it and the pass went withthe cause.
The correction
⚠ This issue proposed the order "define
\sloppyfirst, it is cheap, thenre-measure". That order was right but the reasoning under it was not: while the
emergency pass existed,
\sloppy's\tolerance 9999would have been invisible,because the engine already behaved as though the tolerance were 10000 whenever a
bad line survived. (1) could only be observed after (2) was fixed. The two were
not independent, and this issue's step 2 — "if our
\fussystill gives 8, (2) isindependent of (1)" — had the dependency the other way round.
⚠ Not claimed: that either change moved the corpus. Neither has a measured
corpus cost here. What is measured is the two tables above.
Closes #768.
🤖 Generated with Claude Code