Repository navigation
\hyphenation{…} was a stub that threw the document's words away - #775
Conversation
⛔⛔ AND THE COMMENT SIX LINES ABOVE THAT STUB, IN THE SAME FILE, WARNS ABOUT
EXACTLY ITS SHAPE. amssubstrate.go, about \mark:
"DISCARDS its argument is the one shape no channel can see: the document
says what it wants, the engine says nothing, every test stays green, and
the loss shows up only as ink that is not on the page."
Two lines later sat
% \hyphenation{…}: exception list — nothing to record here.
\def\hyphenation#1{}
"nothing to record here" was true when it was written and silently false
afterwards. The file documents the defect class and then contains an instance
of it.
⚠ AND THE SILENCE FELL ON THE WORDS IT WAS ASKED ABOUT. A document writes
\hyphenation for the words the patterns get WRONG — that is the only reason to
write it — so every entry that mattered was discarded and the patterns' own
answer used instead. 170 of the 2935 corpus papers use it (5.8%), and it is one
of the gaps #765 names.
WHAT IS IMPLEMENTED
hyphexception.go: \hyphenation{photo-graphy manu-script} parsed in the shape
doPatterns reads \patterns{…}, keyed on the word without its hyphens, with the
break points counted in LETTERS.
⛔ AN EXCEPTION REPLACES THE PATTERNS, IT DOES NOT ADD TO THEM (tex.web §937).
A word in the list breaks only where its entry says, and the patterns are never
consulted for it. Consulting both would hand a document that spelled a word out
the very breaks it wrote the entry to prevent.
⛔ AN ENTRY WITH NO HYPHEN IS NOT NOTHING. \hyphenation{bibliography} says the
word may never be broken, and recording an EMPTY list of points is what says
so; dropping it as "nothing to record" would hand the word back to the
patterns — which is the stub's mistake in miniature.
MEASURED, tectonic 0.17.0, \hyphenation{photo-graphy manu-script} at
\hsize=58pt: the reference leaves `photography` whole and breaks `manu-script`,
never `pho-tography`. The patterns' own answer is `pho-tog-ra-phy`, so a break
after `pho` is the shape that proves the entry was ignored — and that is
exactly what this engine produced before.
before A pho-tography and a manuscript and a bibliog-raphy …
after A photo-graphy and a manuscript and a bibliog-raphy …
THE MUTATION: putting the stub back reddens both document tests, naming the
patterns' break.
`photography` was broken where the PATTERNS say, not where the document
says: the exception was ignored
⚠ WHAT IS NOT CLAIMED. The lookup case-folds with strings.ToLower where TeX
uses \lccode, which this engine does not track — #765 names that separately and
this does not close it. The difference shows for an alphabet whose case mapping
a document has redefined.
⚠ No corpus A/B: the 1-minute load average is 11 and 120 compiles would starve
the other sessions on this host. The witness here is direct and against the
reference.
Refs #765.
Co-Authored-By: Claude Opus 5 <[email protected]>
CLAUDE.md asks every user-visible change to reach the README, and two of today's did not: the accented-word fix (#774) and the \hyphenation exception list (#775). The roadmap's line-breaking item now carries them in the shape section 4 already uses — the capability, then the defect with the measurement that settled it. ⚠ It also says the thing the README was silent about and a reader most needs: only English patterns are embedded, so a paper in another language is set unhyphenated where a real TeX hyphenates it. That is #754's finding E, open. Refs #754, #774, #775. Co-authored-by: Claude Opus 5 <[email protected]>
|
⭐ THE CORPUS A/B OWED FOR THIS AND #774 HAS RUN. No detectable effect, which is what was predicted — and the prediction is the weaker part of this, not the stronger. Base Three of 37 papers moved, by +0.1, +0.3 and −0.1. Nothing flipped status. ⚠ What this does NOT establish, which is most of itIt is not evidence that the changes work. The corpus is English-language And all three movements are at or below this metric's own noise floor. So the honest statement is: this measurement could not have detected the I deferred this run four times yesterday, at 1-minute loads of 11, 19, 12 and Refs #774. |
\hyphenation{…} was a stub that threw the document's words away
⛔⛔ And the comment six lines above that stub warns about exactly its shape
amssubstrate.go, about\mark:Two lines later sat:
"nothing to record here" was true when written and silently false afterwards.
The file documents the defect class and then contains an instance of it.
⚠ The silence fell on the words it was asked about. A document writes
\hyphenationfor the words the patterns get wrong — that is the only reasonto write it — so every entry that mattered was discarded and the patterns' own
answer used instead. 170 of the 2935 corpus papers use it (5.8%).
What is implemented
hyphexception.goparses\hyphenation{photo-graphy manu-script}in the shapedoPatternsreads\patterns{…}, keyed on the word without its hyphens, withbreak points counted in letters.
⛔ An exception replaces the patterns, it does not add to them (tex.web
§937). A word in the list breaks only where its entry says. Consulting both
would hand a document that spelled a word out the very breaks it wrote the
entry to prevent.
⛔ An entry with no hyphen is not nothing.
\hyphenation{bibliography}saysthe word may never be broken, and recording an empty list of points is what
says so. Dropping it as "nothing to record" would hand the word back to the
patterns — the stub's mistake in miniature.
Measured
tectonic 0.17.0,
\hyphenation{photo-graphy manu-script}at\hsize=58pt. Thereference leaves
photographywhole and breaksmanu-script, neverpho-tography. The patterns' own answer ispho-tog-ra-phy, so a break afterphois the shape that proves the entry was ignored:bibliography, which has no entry, keeps its pattern break in both — a testthat did not check this would pass for an engine that had stopped hyphenating
altogether.
The mutation
Putting the stub back reddens both document tests and names the cause:
⚠ What is not claimed
strings.ToLowerwhere TeX uses\lccode, whichthis engine does not track. The hyphenation pass against tex.web §§891-966: nine divergences, starting with a paragraph's first word #765 names that separately and this does not
close it; the difference shows for an alphabet whose case mapping a document
has redefined.
starve the other sessions on this host. The witness here is direct and
against the reference.
Refs #765.
🤖 Generated with Claude Code