Commit Graph
1 Commits
Author SHA1 Message Date
kiwi4boy cc63fb5074 craft-math: a multi-letter script base survives linear text (port of wordcraft#6230)
The parser attaches a script to the last character before it (mc^2 is m, c²), so a base of
several letters from a Word or LibreOffice file, written bare, read back split. lin_base now writes
such a base in invisible brackets, 〖mc〗^2, as Word linearizes it; a number (10^3, as Word writes
it) and an upright function name stay bare.

Ported from storytold/wordcraft#6230 (issue wordcraft#6228), which is stacked on wordcraft#6084:
its own change to math.rs and its tests/linear_multichar_base.rs. The ODT test that pinned
LibreOffice's E=mc^2 (<msup><mi>mc</mi>…) moves with it: in craft-odf it now expects E=〖mc〗^2,
as in the WordCraft PR. It runs only with craft-odf's `text` feature.
2026-11-12 21:59:46 -05:00