Commit Graph
86 Commits
Author SHA1 Message Date
gloamxun 4068366190 Support xrightarrow and xleftarrow
The amsmath extensible arrows were unknown, so their labels fell back to plain
text. The math parser now reads \xrightarrow/\xleftarrow, an optional [below]
label, and the above label, and builds nested Stack atoms around the arrow
symbol: above stacks upward, an optional below label stacks downward.

The math test compares the bare arrow with the labeled form (width/height grow)
and with the two-label form (total height plus depth grows).
2026-10-27 03:18:20 +08:00
gloamxun 8307fc8918 Map boldsymbol to the bold math alphabet
\boldsymbol and \bm were unknown math commands, so a bold symbol fell back to
the default layout. Both names now select the same bold alphabet as \mathbf;
symbol-heavy arguments still use the regular symbol metrics, which is the
existing alphabet approximation.

A math test compares \boldsymbol{x} with \mathbf{x} for equal width and height.
2026-10-27 03:15:16 +08:00
gloamxun 4b28d65006 Render Greek math commands as their letters
\alpha through \omega, the uppercase Greek commands and the varepsilon /
vartheta / varrho / varsigma / varphi / varpi / varkappa variants were not in
the math command table, so a formula such as $\alpha+\beta$ painted "?" glyphs.

Map them to their Unicode code points. The math renderer already treats the
Greek ranges as math letters and sends them through the math-italic fallback,
so the formula now previews as α+β=γ with no warnings; the widths still use the
TFM fallback constant rather than per-letter cmmi metrics.

A core test pins the parsed symbols and a route-D test checks the previewed
characters.
2026-10-26 23:52:44 +08:00
gloamxun 0c8228eced Lay out ensuremath bodies as math 2026-10-26 04:14:38 +08:00
gloamxun 028137a9ad Parse phantom bodies as braced groups 2026-10-26 01:41:27 +08:00
gloamxun 7ba66392ea Set operator names upright and declare new ones 2026-10-26 01:24:46 +08:00
gloamxun 8686b9a35e Stack substack rows with TeX inter-row gaps 2026-10-26 01:12:00 +08:00
gloamxun ab5e857705 Build genfrac fractions with explicit delimiters 2026-10-26 01:03:31 +08:00
gloamxun d237e0cc9b Keep integral scripts beside the operator 2026-10-26 01:01:11 +08:00
gloamxun 569160f805 Check stacked limits against pdfLaTeX 2026-10-26 00:59:19 +08:00
gloamxun 52a74755f7 Check matrix and cases positions against pdfLaTeX 2026-10-26 00:53:40 +08:00
gloamxun e926bc9eb3 Honour explicit limits and nolimits on operators 2026-10-26 00:48:52 +08:00
gloamxun 29d363d47a Set multline rows flush to the margins 2026-10-26 00:46:22 +08:00
gloamxun 59b6ca571b Lay out matrix and array environments as grids 2026-10-26 00:39:28 +08:00
gloamxun 971190df26 Report diagnostics and lay out cases environments 2026-10-26 00:35:08 +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 cb40cc4634 Draw mathbb letters from msbm10 2026-10-24 12:14:54 +08:00
gloamxun e229809581 Draw mathcal letters from cmsy10 2026-10-24 03:49:55 +08:00
gloamxun 66ceabad0e Draw big operators with cmex10 outlines 2026-10-24 03:46:50 +08:00
gloamxun a07d93510f Map math alphabets onto Computer Modern Type1 faces 2026-10-24 03:38:53 +08:00
gloamxun a95cf8092e Embed math italic letters as Computer Modern Type1 outlines 2026-10-24 03:35:33 +08:00
gloamxun bb897411d0 Number equation environments in route-D 2026-10-24 01:57:18 +08:00
gloamxun 3cbfdabe03 Space math atoms with the full TeX class table 2026-10-24 01:51:10 +08:00
gloamxun f7e89c78a2 Select CMEX delimiter sizes for left and right 2026-10-24 01:47:42 +08:00
gloamxun 4c2aefd490 Use CMEX size variants for big math delimiters 2026-10-24 01:42:49 +08:00
gloamxun 03afc828f3 Use cmsy10 symbol metrics in route-D formulas 2026-10-24 01:38:15 +08:00
gloamxun 8f675bcabd Use Computer Modern math metrics for route-D formulas 2026-10-24 01:31:51 +08:00
gloamxun c9ad1e209a Split wide display formulas into lines 2026-10-24 01:26:29 +08:00
gloamxun 6dd4f6bf83 Offset math scripts by the base italic correction 2026-10-20 21:34:09 +08:00
gloamxun f909e8199c Parse cmr10 TFM metrics for route-D math 2026-10-20 20:44:52 +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 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 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 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 946f8b1b76 Paint math atoms in the route-D display list 2026-10-20 13:46:54 +08:00