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.
.malign-after (blue outline) and is transformed on load.| Description | Before (native) | After (polyfill) |
|---|---|---|
Spec §3.5.5.8 example.mtablegroupalign="{decimalpoint left leftdecimalpoint left left decimalpoint}"Two equations aligned on the decimal points, the coefficients/variables, and the = sign.
|
|
|
groupalign="right left" on a single column.Integer parts right-aligned, fractional parts left-aligned (manual decimal alignment). |
|
|
groupalign="decimalpoint" single group.Numbers aligned on the . automatically, no marks needed.
|
|
|
malignmark with edge="left".Explicit mark before the = aligns the equals signs.
|
|
|
MathML from MS Word: absolute-value inequality chain.maligngroup + malignmark before each relation.Aligns = / ≤ across rows (Word-style single-column table).
|
|
|