Commit Graph
100 Commits
Author SHA1 Message Date
gloamxun 3d94e28dff Carry TFM glyph height and depth into paragraph boxes 2026-10-21 09:18:15 +08:00
gloamxun 8731ec2b9e Subset embedded fonts to the glyphs a document uses 2026-10-21 09:14:46 +08:00
gloamxun 06779fb8dd Support per-class insertion skip
InsertionClass gains skip, matching TeX skip registers for insertion classes. The page builder prefers that value over Document.insertion_skip for the class, in both full and incremental layout; regressions cover a skip that pushes an insertion to the next page and the edit path.
2026-10-21 09:01:12 +08:00
gloamxun 7385b8862a Honour TeX float number limits
Add top_number, bottom_number and total_number to Document with TeX defaults 2, 1 and 12. Top and bottom float branches, including the incremental edit path, refuse an extra float once its placement count or the total page count is reached, so the float moves to the next page.
2026-10-21 08:57:16 +08:00
gloamxun f2deac541e Reuse page prefixes for structural route-D edits
Extract Engine::relayout_from from Engine::edit so a caller can rebuild from any checkpoint with an unchanged unit prefix. Route-D project previews now use the first differing paragraph for both text and structural edits, keeping sealed pages before the change instead of always relaying out the whole document.
2026-10-21 08:53:17 +08:00
gloamxun 8cbd72663a Correct the documented route-D test count 2026-10-21 08:48:24 +08:00
gloamxun ceb31c4612 Replay multiple paragraph edits in route-D previews
Apply same-count paragraph edits sequentially from the earliest changed paragraph, reuse the earlier page checkpoints, and report the union of changed pages. Adds a multi-page regression.
2026-10-21 08:46:56 +08:00
gloamxun 506904bbdc Apply insertion class limits in incremental edits 2026-10-21 08:43:09 +08:00
gloamxun 68d2cef346 Compare two route-D pages with pdfTeX 2026-10-21 08:40:44 +08:00
gloamxun 180c05e425 Reserve skip before the first insertion class 2026-10-21 08:28:34 +08:00
gloamxun e052a0d0f3 Compress embedded font and ToUnicode streams
Route-D PDFs embedded full FontFile2 programs and ToUnicode CMaps uncompressed. Deflate both streams and declare /Filter /FlateDecode while keeping /Length1 as the uncompressed font length. The minimal route-D PDF now renders to 13.5 KB, and the pdfTeX raster comparison still matches.
2026-10-21 08:19:02 +08:00
gloamxun aeacf53518 Make the pdfTeX raster comparison actually run
pdftoppm --version exits non-zero, so the raster test silently skipped on every host. Probe pdftoppm with -v instead, lay out the route-D paragraph at the same scaled-point geometry the server uses, and compile the pdfTeX control page as Letter (612x792bp). The ink line count and left/right/bottom edges now match exactly.
2026-10-21 08:10:29 +08:00
gloamxun 5b4eadb88f Place late top floats on the current page when they fit 2026-10-21 01:33:14 +08:00
gloamxun 484375fa2b Support absolute insertion class height limits 2026-10-21 01:28:42 +08:00
gloamxun 12d8ae805b Keep insertions from multiple classes within the page height 2026-10-21 01:18:02 +08:00
gloamxun c3277531d3 Export project PDFs through route-D when selected 2026-10-21 01:15:09 +08:00
gloamxun 21cc743236 Document the route-D preview toggle 2026-10-21 01:12:12 +08:00
gloamxun 4166cb7e9b Update route-D test counts 2026-10-21 01:11:17 +08:00
gloamxun 95760e4a1c Turn TeX hyphen runs into en and em dashes 2026-10-21 01:08:22 +08:00
gloamxun ff97f386da Apply float-page fraction in incremental layout 2026-10-21 01:02:04 +08:00
gloamxun 93dd4e531b Apply bottom float fractions in incremental layout 2026-10-20 23:44:22 +08:00
gloamxun 48d10f901d Apply topfraction in incremental layout 2026-10-20 23:41:31 +08:00
gloamxun d81021d1a3 Honour topfraction for top floats 2026-10-20 23:37:47 +08:00
gloamxun 14a3775206 Honour bottomfraction when placing bottom floats 2026-10-20 23:33:21 +08:00
gloamxun c2dbf405ab Compare route-D raster geometry with pdfTeX 2026-10-20 23:20:28 +08:00
gloamxun ea69301804 Reuse route-D page checkpoints in project previews 2026-10-20 23:13:49 +08:00
gloamxun fe7fd68321 Let project previews opt into the route-D core 2026-10-20 23:09:32 +08:00
gloamxun a8e7499ce3 Honour per-class insertion page limits 2026-10-20 23:02:30 +08:00
gloamxun ff3fff343d Paint ligature boxes as their component letters 2026-10-20 22:59:31 +08:00
gloamxun 67915402a6 Use CMR10 advances for route-D paragraphs and PDF text 2026-10-20 22:55:38 +08:00
gloamxun 8251e35de2 Fix the route-D PDF text note 2026-10-20 22:28:34 +08:00
gloamxun 5c0ffd41ac Record the route-D PDF text extraction limitation 2026-10-20 22:27:48 +08:00
gloamxun 40ed26e339 Right-align route-D paragraphs and preview flushright blocks 2026-10-20 22:23:47 +08:00
gloamxun 6714591704 Use the minimal font tier for ASCII route-D PDFs 2026-10-20 22:21:10 +08:00
gloamxun 295093ae5a Embed only the font faces used by a route-D PDF 2026-10-20 22:15:53 +08:00
gloamxun 472f778e75 Center route-D paragraphs and preview center blocks 2026-10-20 22:12:39 +08:00
gloamxun 611e6fec96 Cover incremental edits of route-D list units 2026-10-20 22:08:30 +08:00
gloamxun a9e5f38ef7 Refresh route-D M1 and M7 status 2026-10-20 22:06:57 +08:00
gloamxun fcfb7ec764 Cover route-D list PDF export 2026-10-20 22:06:24 +08:00
gloamxun ccda740476 Indent quote blocks in the route-D preview 2026-10-20 22:04:50 +08:00
gloamxun 4772985ffe Render description lists in the route-D preview 2026-10-20 22:03:19 +08:00
gloamxun edf851438b Render enumerate lists in the route-D preview 2026-10-20 22:01:02 +08:00
gloamxun cea9ccddef Render itemize lists in the route-D preview 2026-10-20 21:59:17 +08:00
gloamxun 63593e7ff3 Render display math in the route-D preview 2026-10-20 21:57:12 +08:00
gloamxun 15880c884d Cover stable page hashes across route-D edits 2026-10-20 21:55:20 +08:00
gloamxun f0e5f14a8c Hash rendered page content instead of source metadata 2026-10-20 21:53:51 +08:00
gloamxun 2c4d968659 Map sections and emphasis in the route-D preview 2026-10-20 21:45:34 +08:00
gloamxun ec9ce3b765 Export route-D preview pages as PDF 2026-10-20 21:41:46 +08:00
gloamxun 8468c36daa Embed and paint a sans paragraph face 2026-10-20 21:37:37 +08:00
gloamxun 1633e441de Paint monospace paragraphs with the embedded mono face 2026-10-20 21:35:37 +08:00
gloamxun 6dd4f6bf83 Offset math scripts by the base italic correction 2026-10-20 21:34:09 +08:00
gloamxun 6a7e79fa03 Stack insertion classes from the page bottom 2026-10-20 21:32:15 +08:00
gloamxun 060405fca6 Apply CMR10 italic corrections at line ends 2026-10-20 21:27:39 +08:00
gloamxun 7e0090c7a5 Let custom output routines force a page break 2026-10-20 21:25:00 +08:00
gloamxun 77f05513ed Assert route-D edits reuse unchanged pages 2026-10-20 21:21:41 +08:00
gloamxun dbccedb579 Expose route-D page-hash diffs for paragraph edits 2026-10-20 21:18:57 +08:00
gloamxun fab9a473fc Render route-D preview pages at page size 2026-10-20 21:16:45 +08:00
gloamxun 875f8a7600 Expose route-D pages through a preview endpoint 2026-10-20 21:15:35 +08:00
gloamxun 12288b51ee Split oversized route-D insertions across pages 2026-10-20 21:07:26 +08:00
gloamxun ac63a3db92 Substitute CMR10 ligatures in route-D paragraphs 2026-10-20 21:04:24 +08:00
gloamxun 641fc1c14b Embed all route-D text faces with CID widths 2026-10-20 20:59:01 +08:00
gloamxun 5010e9ab10 Document route-D float page fractions 2026-10-20 20:54:26 +08:00
gloamxun 2431f3a479 Model float page fractions in route-D output 2026-10-20 20:54:06 +08:00
gloamxun 867bace1c9 Apply CMR10 kern pairs in route-D paragraphs 2026-10-20 20:52:54 +08:00
gloamxun a09398811f Embed a TrueType Roman font in route-D PDFs 2026-10-20 20:49:21 +08:00
gloamxun a703f2dcc0 Wire the TFM parser into the route-D core 2026-10-20 20:46:14 +08:00
gloamxun f909e8199c Parse cmr10 TFM metrics for route-D math 2026-10-20 20:44:52 +08:00
gloamxun 84e2e9cadb Update route-D test baseline 2026-10-20 19:37:44 +08:00
gloamxun 7b19a423a2 Record route-D open milestones 2026-10-20 19:36:43 +08:00
gloamxun afe59fc7b4 Center scaled math delimiters on the baseline 2026-10-20 19:36:20 +08:00
gloamxun 4fa6998f66 Record workspace verification baseline 2026-10-20 19:34:52 +08:00
gloamxun 40264a61dd Refresh route-D milestone status 2026-10-20 19:32:03 +08:00
gloamxun b9455e0438 Parse big-delimiter control sequences 2026-10-20 19:29:42 +08:00
gloamxun 72f7cfaf2a Grow left-right delimiters with tall bodies 2026-10-20 19:28:33 +08:00
gloamxun b281738084 Parse middle delimiters as control sequences 2026-10-20 19:27:14 +08:00
gloamxun 51d82d7e43 Parse control-sequence delimiters after left and right 2026-10-20 19:26:13 +08:00
gloamxun 9c486ee7f2 Cover route-D PDF export and page-level edit replay 2026-10-20 19:24:50 +08:00
gloamxun 1236989edf Refresh the route-D core status document 2026-10-20 19:22:59 +08:00
gloamxun c7b0124369 Let mathop take limits below its body 2026-10-20 19:21:15 +08:00
gloamxun ae8f81b1a2 Place starred operatorname limits below the operator 2026-10-20 19:20:18 +08:00
gloamxun b8a135d2b6 Draw cancel and bcancel math marks 2026-10-20 19:19:13 +08:00
gloamxun 9690dbdbed Add dot and check accent commands 2026-10-20 19:17:14 +08:00
gloamxun dc8282f707 Add common fence delimiter symbols 2026-10-20 19:15:16 +08:00
gloamxun df511602cf Support bmod and pmod 2026-10-20 19:13:53 +08:00
gloamxun 7376acffb2 Draw negated math with a diagonal rule 2026-10-20 19:13:09 +08:00
gloamxun f88fa7fd9d Ignore numbering and limits control words in math 2026-10-20 19:09:44 +08:00
gloamxun c72f612431 Accept the starred operatorname form 2026-10-20 19:09:03 +08:00
gloamxun f3bbe4098b Parse operatorname as upright math text 2026-10-20 19:08:16 +08:00
gloamxun ab35e280f1 Accept tfrac, dfrac and cfrac as fraction aliases 2026-10-20 19:07:28 +08:00
gloamxun 4de329c327 Add a three-paragraph incremental article demo 2026-10-20 19:04:48 +08:00
gloamxun e05caa351b Add explicit math spacing commands 2026-10-20 19:03:07 +08:00
gloamxun 5a9571f792 Preserve math spaces as control-word terminators and text spaces 2026-10-20 19:01:33 +08:00
gloamxun 6876935e60 Treat math style declarations as transparent 2026-10-20 19:00:01 +08:00
gloamxun 495b615220 Encode Latin-1 text bytes in the PDF writer 2026-10-20 18:56:04 +08:00
gloamxun c00edaf357 Paint binomial parentheses around stacked arguments 2026-10-20 18:55:16 +08:00
gloamxun 0446a35b8c Paint sqrt degrees before the radical 2026-10-20 18:53:28 +08:00
gloamxun 17d41cbffd Paint overbrace and underbrace bars 2026-10-20 18:52:34 +08:00
gloamxun 3f1dd0c077 Paint math limits above and below their base 2026-10-20 18:51:49 +08:00
gloamxun b004cd2efb Cover bottom float content painting 2026-10-20 18:50:22 +08:00
gloamxun 34c4f0d84b Offset route-D paragraphs by their left skip 2026-10-20 18:49:27 +08:00