Commit Graph
100 Commits
Author SHA1 Message Date
gloamxun 8ac2e828df Honour club and widow penalties on paragraph lines
Route-D expanded a paragraph into one node per line without TeX's
\clubpenalty/\widowpenalty, so a page break could orphan the first line or
widow the last. Insert the penalties between line nodes (150 by default, read
from the source registers) and make the page builder reject any penalty of
10000 or more as a breakpoint. Forced -10000 values now break exactly where
pdfLaTeX does; two page oracle fixtures compare per-page text, and unit tests
cover the node order and the forbidden breakpoint.
2026-10-26 22:14:01 +08:00
gloamxun 1bb28cf141 Skip the SIVP test when its project fixture is absent
projects/ is gitignored, so a fresh clone has no projects/_sivp__/sn-article.tex. Return early like the neighbouring front-matter test instead of panicking on the missing file.
2026-10-26 22:03:25 +08:00
gloamxun 83f49db49e Sort oracle word boxes before grouping lines
pdftotext 26 does not always emit words in reading order: wide justified gaps and hyphenated lines interleave words from different baselines, so parse_bbox split one visual line into several. Sort by baseline and then x before grouping. It also reports each word box as the font extent, whose ascent varies with type size; compare display limits by the subscript/superscript baseline gap, which is anchor-free, instead of mixing 7pt box tops with the 10pt base.
2026-10-26 22:03:25 +08:00
gloamxun e09e413892 Break long paragraphs with prefix sums
The line-breaker rescanned items[start..end] for every break pair, so a 900-word paragraph took seconds and the 2,700-word edit fixture took about 30 s. Prefix sums over natural width, stretch, shrink, glue order, box count and the last penalty give each candidate its metrics in O(1); the search now costs O(breakpoints^2) and the same document lays out in about 0.3 s. Add a 900-word regression test and note the change in TEX_CORE.
2026-10-26 22:03:19 +08:00
gloamxun 41c68baa5d Ignore display break hints 2026-10-26 20:37:24 +08:00
gloamxun 7271e2ee12 End table rows with tabularnewline 2026-10-26 20:36:57 +08:00
gloamxun 80a5e8272d Stretch tabular* tables to their target width 2026-10-26 20:36:49 +08:00
gloamxun 3770de0804 Render tabular* by its declared column template 2026-10-26 20:36:43 +08:00
gloamxun 40abb7bef3 Reserve environment definitions declared in the body 2026-10-26 20:36:30 +08:00
gloamxun 0d9ed56a55 Reserve theorem definitions declared in the body 2026-10-26 20:36:21 +08:00
gloamxun 3087a9a116 Reserve saveboxes declared in the body 2026-10-26 20:35:58 +08:00
gloamxun eaebb1edbf Reserve registers declared in the body 2026-10-26 20:35:42 +08:00
gloamxun 13de893c46 Capture body-level newif definitions 2026-10-26 20:35:34 +08:00
gloamxun dc49b92a47 Capture body-level chardef definitions 2026-10-26 20:35:09 +08:00
gloamxun 2408736c5e Capture body-level let aliases 2026-10-26 20:34:44 +08:00
gloamxun 6efb210781 Capture definitions written in the body 2026-10-26 20:34:33 +08:00
gloamxun 1d891b2c6a Verify test server identity before accepting it 2026-10-26 20:34:20 +08:00
gloamxun 7c98c61b7a Ignore preamble-only guards 2026-10-26 20:34:06 +08:00
gloamxun 991498b0e1 Guard definitions with @ifdefinable 2026-10-26 20:33:57 +08:00
gloamxun f6a41c9f59 Expand the checkmark symbol in text 2026-10-26 20:33:49 +08:00
gloamxun 8e884e6db1 Expand parameterised newcolumntype letters 2026-10-26 20:33:43 +08:00
gloamxun 9d57ca604e Expand newcolumntype letters in table specs 2026-10-26 20:33:14 +08:00
gloamxun 97e883f51d Branch on @ifclassloaded for supported classes 2026-10-26 20:33:02 +08:00
gloamxun c9982a7675 Branch on @ifpackageloaded for known packages 2026-10-26 20:32:51 +08:00
gloamxun fce3a3b0a0 Honour optional newenvironment defaults 2026-10-26 20:32:41 +08:00
gloamxun b7d18dff37 Expand punctuation and symbol commands 2026-10-26 20:32:18 +08:00
gloamxun 3a089c6175 Number standalone captionof captions 2026-10-26 20:32:01 +08:00
gloamxun 7d05268983 Keep underline text without the rule 2026-10-26 20:31:45 +08:00
gloamxun f147ccc8c5 Parse array column modifiers and their alignment 2026-10-26 20:31:33 +08:00
gloamxun 71dc8ca59b Treat starred floats as their single-column forms 2026-10-26 20:31:18 +08:00
gloamxun 8ecbd5e720 Centre multirow cells over their rows 2026-10-26 20:31:03 +08:00
gloamxun e039cfb8a9 Report float and equation pages through pageref 2026-10-26 20:30:22 +08:00
gloamxun aa072f58d8 Reserve outer tabcolsep margins around tables 2026-10-26 20:29:51 +08:00
gloamxun 20d23ce68d Record the round-150 handoff 2026-10-26 04:54:57 +08:00
gloamxun b191f7d66c Record the remaining compatibility gaps 2026-10-26 04:52:57 +08:00
gloamxun 20813a6607 Ignore strut commands in running text 2026-10-26 04:52:34 +08:00
gloamxun 22f95c1536 Print character commands by codepoint 2026-10-26 04:50:54 +08:00
gloamxun 2476c1893f Keep leftline arguments flush left 2026-10-26 04:49:10 +08:00
gloamxun 3d33ee9dc3 Flush rightline arguments to the right margin 2026-10-26 04:47:29 +08:00
gloamxun 9aa7198aed Centre centerline arguments 2026-10-26 04:45:58 +08:00
gloamxun f11561f15f Keep raggedright blocks unjustified 2026-10-26 04:44:21 +08:00
gloamxun 337f1f6de6 Centre blocks after a centering declaration 2026-10-26 04:41:31 +08:00
gloamxun 3d1ace51ae Print registers as roman numerals 2026-10-26 04:39:55 +08:00
gloamxun ca433d256d Drop break hints and discretionary hyphens 2026-10-26 04:38:04 +08:00
gloamxun 6c771e0820 Reuse savebox content through usebox 2026-10-26 04:35:42 +08:00
gloamxun c57de1e03c Reserve the named TeX spaces in text 2026-10-26 04:32:40 +08:00
gloamxun 1e8b2367ca Space text with quad and punctuation commands 2026-10-26 04:30:22 +08:00
gloamxun c290b6f38d Reserve hspace width in running text 2026-10-26 04:28:03 +08:00
gloamxun 090f389589 Reject test servers that exit after a port race 2026-10-26 04:26:17 +08:00
gloamxun 313ea366d6 Expand more text symbol commands 2026-10-26 04:21:51 +08:00
gloamxun 55d34dc259 Drop layout-only commands from paragraph text 2026-10-26 04:19:18 +08:00
gloamxun fb111806e2 Keep the text of mbox and makebox commands 2026-10-26 04:17:26 +08:00
gloamxun 0c8228eced Lay out ensuremath bodies as math 2026-10-26 04:14:38 +08:00
gloamxun 0340878909 Pad color boxes by fboxsep 2026-10-26 04:11:42 +08:00
gloamxun 8e274a252d Separate table columns by twice tabcolsep 2026-10-26 04:09:57 +08:00
gloamxun d89b71bfbc Measure table cells with Computer Modern metrics 2026-10-26 04:07:29 +08:00
gloamxun 39f02b83c0 Cover a report-class document and restore a macro test 2026-10-26 04:00:39 +08:00
gloamxun ba05af11f2 Number report and book chapters above sections 2026-10-26 03:58:43 +08:00
gloamxun e6a12fae9a Treat tildes as spaces outside URLs 2026-10-26 03:54:15 +08:00
gloamxun 994c360ec0 Draw fbox frames without a background 2026-10-26 03:51:28 +08:00
gloamxun 3d01fbe589 Cover report and geometry documents in the compatibility corpus 2026-10-26 03:47:37 +08:00
gloamxun 90cf2236ee Space booktabs rows with addlinespace 2026-10-26 03:43:29 +08:00
gloamxun 09b6c2b810 Exercise a warning-free article and close inline table ends 2026-10-26 03:41:21 +08:00
gloamxun d362d189ac Define character commands with chardef 2026-10-26 03:38:50 +08:00
gloamxun e81c82cf61 Invert conditionals with unless 2026-10-26 03:36:11 +08:00
gloamxun 9873c84416 Compare characters and parity in conditionals 2026-10-26 03:34:31 +08:00
gloamxun 3156d1488a Compare token categories in ifcat 2026-10-26 03:32:50 +08:00
gloamxun d1d6672503 Parse delimited macro arguments 2026-10-26 03:29:37 +08:00
gloamxun 269c633233 Frame link annotations in the SVG preview 2026-10-26 03:23:22 +08:00
gloamxun 2126ba8436 Chain zero-argument expandafter prefixes 2026-10-26 03:20:56 +08:00
gloamxun 77d76af4a7 Accept DeclareRobustCommand and honour providecommand semantics 2026-10-26 03:18:48 +08:00
gloamxun 7dbcea2319 Parenthesise glue expressions and keep register components 2026-10-26 03:16:20 +08:00
gloamxun fe1a001e62 Widen numbered registers to 256 slots 2026-10-26 03:10:47 +08:00
gloamxun 2018e5f8b8 Paint framed colorbox backgrounds 2026-10-26 03:08:37 +08:00
gloamxun d88e74cd29 Paint colorbox backgrounds 2026-10-26 03:05:07 +08:00
gloamxun eebe6deac5 Track scratch dimension and glue registers 2026-10-26 03:00:45 +08:00
gloamxun a25c3aace3 Evaluate scratch count registers 2026-10-26 02:58:53 +08:00
gloamxun e4720407a9 Evaluate glue expressions over skip registers 2026-10-26 02:56:23 +08:00
gloamxun d011806343 Discard gobbled arguments and test argument emptiness 2026-10-26 02:53:30 +08:00
gloamxun cb00e21127 Accept long global and protected definition prefixes 2026-10-26 02:51:35 +08:00
gloamxun c95cfa5967 Colour link annotation borders 2026-10-26 02:48:57 +08:00
gloamxun 352c44a9b1 Choose branches with @ifstar and @ifnextchar 2026-10-26 02:46:15 +08:00
gloamxun 7e3877df98 Track glue registers with newskip 2026-10-26 02:42:20 +08:00
gloamxun ea89bc1522 Colour href labels from hypersetup 2026-10-26 02:38:41 +08:00
gloamxun 8f429b892b Mix named colors with xcolor bang specs 2026-10-26 02:36:21 +08:00
gloamxun 69dc0a4863 Evaluate dimexpr dimension arithmetic 2026-10-26 02:34:21 +08:00
gloamxun 1ab2a29bfa Fill the page background with pagecolor 2026-10-26 02:31:50 +08:00
gloamxun 4cb456743a Honour definecolor models in text colors 2026-10-26 02:28:05 +08:00
gloamxun a888421f0e Colour the rest of a paragraph after a color switch 2026-10-26 02:21:13 +08:00
gloamxun 0d8125f854 Track dimension registers alongside integer counts 2026-10-26 02:18:30 +08:00
gloamxun 99eb24c153 Evaluate numexpr arithmetic in the body 2026-10-26 02:16:37 +08:00
gloamxun 676a6976f8 Expand the common LaTeX internal commands 2026-10-26 02:14:42 +08:00
gloamxun ded738d445 Choose ifcase branches and fall back to else 2026-10-26 02:08:16 +08:00
gloamxun 4352922240 Protect tokens from expansion with noexpand 2026-10-26 02:06:23 +08:00
gloamxun c74d604c40 Compare integers and token meanings in conditionals 2026-10-26 02:01:32 +08:00
gloamxun a0f4a35c94 Track integer count registers 2026-10-26 01:58:56 +08:00
gloamxun 206591c725 Test declared macros with ifdefined 2026-10-26 01:56:31 +08:00
gloamxun fa93b198bf Expand the macro after an expandafter prefix once 2026-10-26 01:52:46 +08:00
gloamxun 863f3e1b80 Expand edef bodies and csname sequences at definition time 2026-10-26 01:44:43 +08:00
gloamxun 028137a9ad Parse phantom bodies as braced groups 2026-10-26 01:41:27 +08:00