Commit Graph
140 Commits
Author SHA1 Message Date
gloamxun 6ae609b60e Honour textwidth and setlength as the paragraph measure 2026-10-24 20:09:17 +08:00
gloamxun c494ad04ae Read documentclass size options as the base font size 2026-10-24 19:47:45 +08:00
gloamxun 9876895a84 Scale paragraphs by their declared base font size 2026-10-24 13:04:19 +08:00
gloamxun aa4d86d735 Distinguish slanted from italic and add italic typewriter
Add cmsl10/cmbxsl10/cmitt10 faces so \slshape and \textsl no longer reuse the italic cmti10 and \ttfamily\itshape reaches cmitt10. The NFSS state tracks italic, slanted and small caps separately, with last-shape-wins semantics for \em and the shape commands.
2026-10-24 12:58:41 +08:00
gloamxun 6df38ced25 Scope NFSS declarations to the rest of their group
A bare \bfseries or \em in a paragraph now switches the face from that point to the end of the enclosing group, instead of being emitted as literal text. Inline declarations recurse into the remaining body so nested groups keep their own scope.
2026-10-24 12:55:13 +08:00
gloamxun e303f7852f Select real Computer Modern small caps
Add the cmcsc10 face for \scshape and \textsc, including its Type1 outline, and compose the sc shape with the surrounding family and series. Bold small caps substitute cmbx10 and a later shape command wins, matching NFSS.
2026-10-24 12:52:15 +08:00
gloamxun 9140990a7d Add sans-serif bold and italic faces
Map \sffamily with \bfseries or \itshape onto the bundled cmssbx10 and cmssi10 metrics, with their Type1 outlines embedded alongside the other Computer Modern faces. Bold italic sans substitutes cmssbx10, matching the OT1 fallback in TeX.
2026-10-24 12:49:30 +08:00
gloamxun 03925e3116 Scan TeX math skips and correct math-unit spacing 2026-10-24 12:43:01 +08:00
gloamxun cce656a407 Lay out align and gather displays row by row 2026-10-24 12:39:02 +08:00
texrra 8c42f2de2f Add Fraktur letters, infix fractions and middle delimiters
- bundle eufm10 (TFM + Type1), add the MathFraktur face and map \mathfrak
  onto it, including PDF embedding and width lookup;
- parse TeX's infix fractions (\over, \atop, \choose, \brace,
  \brack, \overwithdelims, \atopwithdelims): the rest of the current
  row becomes the denominator, ar records whether a rule is drawn, and the
  painter no longer emits parentheses (a \frac painter bug) and only draws
  the bar for \over forms;
- add MathAtom::Middle, size top-level middle delimiters with the enclosing
  \left/\right group through the CMEX size classes, and paint
  SizedDelimiter at its selected size instead of the base glyph;
- skip the parser's '\u{0}' math spaces before \big, \middle,
  \left and the withdelims delimiters, so \big ( parses like \big(.

560 workspace tests (381 route-D unit).
2026-10-24 12:28:33 +08:00
gloamxun c9ad1e209a Split wide display formulas into lines 2026-10-24 01:26:29 +08:00
gloamxun 95e677b5c7 Map LaTeX tabular sources onto route-D halign 2026-10-24 01:22:36 +08:00
gloamxun 20011eadd3 Repeat longtable heads on continuation pages 2026-10-24 01:14:38 +08:00
gloamxun 8c3e410ffc Insert noalign glue between alignment rows 2026-10-24 01:10:49 +08:00
gloamxun 3681fd95db Honour @ column expressions in alignment templates 2026-10-24 01:07:48 +08:00
gloamxun c3e75bd244 Draw booktabs rules with their own weights and spans 2026-10-24 01:03:53 +08:00
gloamxun 01ed1b7c21 Report page badness and held-over insertions to the output routine 2026-10-24 00:02:46 +08:00
gloamxun 4dd28b3aa7 Defer bottom floats like TeX page building 2026-10-23 23:48:28 +08:00
gloamxun a09b1d1d36 Clamp held-over insertion depth with splitmaxdepth 2026-10-23 23:35:20 +08:00
gloamxun 0f4c1f85ae Report paragraph depth to the page builder 2026-10-23 23:31:47 +08:00
gloamxun db1cc98338 Place top floats on the page they appear on 2026-10-23 23:15:56 +08:00
gloamxun 6b3145fd09 Route route-D page breaking through the paged builder 2026-10-23 15:02:52 +08:00
gloamxun e632db02cf Start held-over insertions with splittopskip 2026-10-23 12:15:27 +08:00
gloamxun a4388942f0 Expose per-order page stretch to the output routine 2026-10-23 04:22:27 +08:00
gloamxun 52e3e0647c Set pages with TeX glue orders 2026-10-23 04:18:14 +08:00
gloamxun 00c23a3511 Set vertical glue for ragged and flushed pages 2026-10-23 04:13:12 +08:00
gloamxun 448152cea4 Support ragged-right paragraphs with an infinite rightskip 2026-10-23 04:08:32 +08:00
gloamxun f488dd3b6c Flow in-text floats through the paged builder 2026-10-23 04:04:03 +08:00
gloamxun 14ca3b91d9 Place bottom floats through the paged builder 2026-10-23 03:57:44 +08:00
gloamxun 7b9d543e49 Honour declared paper size in route-D output 2026-10-23 03:53:32 +08:00
gloamxun 043ae7f072 Replay paged layouts from the edited page 2026-10-23 03:46:12 +08:00
gloamxun aa081e3dc6 Place top floats through the paged builder 2026-10-23 03:30:15 +08:00
gloamxun 7964765605 Ship pages conditionally on parity in the output routine 2026-10-23 03:08:19 +08:00
gloamxun a2a2eafab5 Read output penalty and page number in the output routine 2026-10-23 03:04:58 +08:00
gloamxun 4bec90cf8c Interpret the output routine shipout and ifdim subset 2026-10-23 02:59:54 +08:00
gloamxun 6cf8221ba7 Lay out insertion classes through the page builder 2026-10-23 02:53:04 +08:00
gloamxun 6305f059ac Shrink overfull final lines and widen the oracle matrix 2026-10-23 02:45:11 +08:00
gloamxun 4be0ff5787 Replace font glue with explicit spaceskip and xspaceskip 2026-10-23 02:38:12 +08:00
gloamxun 4acccaee86 Honour explicit sfcode assignments 2026-10-23 02:29:40 +08:00
gloamxun b5ec36ae2a Split insertions at the page break and hold over the tail 2026-10-23 02:26:56 +08:00
gloamxun b7b75fbff1 Split paragraphs at line boundaries across pages 2026-10-23 02:23:18 +08:00
gloamxun daf9f5c57e Expose TeX carried marks for page headers 2026-10-23 02:00:29 +08:00
gloamxun 8d319b3b0c Apply TeX page offsets in the route-D PDF endpoint 2026-10-23 01:57:48 +08:00
gloamxun 5db7acaff2 Shift the route-D page body by TeX page origin offsets 2026-10-23 01:55:28 +08:00
gloamxun fb33ac6327 Apply the insertion count multiplier to page space 2026-10-23 01:51:19 +08:00
gloamxun 169119a48d Cap page depth at Document max_depth 2026-10-23 01:48:21 +08:00
gloamxun 9599982b91 Feed simple documents through the TeX page builder 2026-10-23 01:45:45 +08:00
gloamxun d4a9c6b4fd Add a TeX page builder over vertical lists 2026-10-23 01:41:06 +08:00
gloamxun 49bd9b63e6 Model TeX interline glue and parskip 2026-10-23 01:36:26 +08:00
gloamxun ac134b3c4e Reproduce TeX paragraph breaking with tolerance passes and demerits
- replace the single-tolerance DP with pass 0 (pretolerance, no hyphenation),
  pass 1 (tolerance, hyphenation) and an optional emergency pass
- add emergencystretch to ParagraphStyle; the emergency pass only runs when it
  is positive, otherwise TeX's overfull fallback applies and each line fills to
  the first break at or past the measure
- compute badness and fitness classes like TeX and fold them with penalties
  into demerits, ignoring the trailing forced penalty on the final line
- keep forward order in the greedy fallback
- enable the 180pt pdfLaTeX oracle fixture and add an emergencystretch test
- give route-D extraction tests scaled body styles so fixed-cell
  ParagraphStyle defaults no longer mix raw units with TFM advances
- document the passes, oracle results and remaining P1 gaps
2026-10-23 00:50:57 +08:00