Rubric: contents fit
Written by a person. Last read by a person on 2026-09-17, 11 days ago. Its facts were checked by the eval suite on 2026-09-28.
Enforced by check_toc_fits.
The claim
No entry in the contents list wraps to a second line.
Observable evidence
- Every second- and third-level entry in the built contents list of every page.
- The number of characters the column holds on one line: 18 for a second-level entry, 17 for a third-level one.
- The ledger of entries that already wrapped when the check landed, in
data/toc-wrap-ledger.yaml.
The pass bar
Every entry is at or under the cap, or is in the ledger, or its page declares toc_wrap_ok
with a reason. A ledger entry that no longer wraps is a failure until it is removed, so the
ledger only shrinks.
Why this rubric exists
A contents list is a map. A reader scanning it for a section name reads one line per section, and an entry that wraps makes them read two lines to find one. At the live column width half the site's entries wrapped, and nothing reported it, because a wrapped link is valid markup on a page that renders.
The cap is measured, not chosen. In Chrome at 1280 wide the second-level link has 127.6 pixels for text at 13.12 pixels of the system font, and the site's own heading text averages 6.47 pixels a character, which is 19.7 characters. One character of margin, because an average hides wide letters, gives 18.
A crawl of every page confirmed the number. Everything at or under it fit, except two entries built from wide letters, and most entries one over it wrapped. Change the stylesheet's column and this check is how you find out the cap has to change with it.
Ambiguous cases
The fix is the heading, not the column. A heading is editorial and sits above the thing it
names with the whole page as context; a contents entry is a navigation label with none. Shorten
the heading when the shorter form is still the heading, and use {toc: Short label} when it is
not. Widening the column is a last resort, and a page with a real reason says so in
toc_wrap_ok.
The page title is exempt. The first entry is the page's title, which is a sentence by design and wraps on every page. The rule is about section names.
Characters, not pixels. An author can count characters and cannot measure pixels, so the cap is stated in characters and admits that a heading of wide letters at the cap can still wrap. The crawl found two such entries in 343. That is the cost of a number an author can apply without a browser.