maligngroup / malignmark alignment

Serve the repo root over HTTP (e.g. python -m http.server 8080) and open http://localhost:8080/malign/index.html so ES modules load.

Tests for MathML3 §3.5.5 alignment markers. malign/malign.js is registered on mtable:has(maligngroup) and runs before mtable/mtable.js: it measures each alignment group, then replaces every maligngroup/malignmark with a computed-width <mspace> so the groups line up vertically within each table column.

Before vs after _MathTransforms.transform
Description Before (native) After (polyfill)
Spec §3.5.5.8 example.
mtable
groupalign=
"{decimalpoint left left
decimalpoint left left decimalpoint}"
Two equations aligned on the decimal points, the coefficients/variables, and the = sign.
8.44 x + 55 y = 0 3.1 x - 0.7 y = -1.1
8.44 x + 55 y = 0 3.1 x - 0.7 y = -1.1
groupalign="right left" on a single column.
Integer parts right-aligned, fractional parts left-aligned (manual decimal alignment).
12.5 3.75 100.125
12.5 3.75 100.125
groupalign="decimalpoint" single group.
Numbers aligned on the . automatically, no marks needed.
1.2 34.567 891 .0625
1.2 34.567 891 .0625
malignmark with edge="left".
Explicit mark before the = aligns the equals signs.
x=1 a+bcd=2
x=1 a+bcd=2
MathML from MS Word: absolute-value inequality chain.
maligngroup + malignmark before each relation.
Aligns = / across rows (Word-style single-column table).
| (x+y) 2 | = | x2 + 2xy + y2 | | x2 | + | 2xy | + | y2 | = x2 + | 2xy | + y2
| (x+y) 2 | = | x2 + 2xy + y2 | | x2 | + | 2xy | + | y2 | = x2 + | 2xy | + y2