mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-07 11:12:37 +00:00
Each equation is written as an embedded formula object (ODF 1.3 §10.4.3): a frame in line with the text whose `draw:object` points at a sub-document `Object N/` (declared in the manifest as a formula) whose content.xml is the equation's MathML, with its linear text as an annotation. The reader already opens LibreOffice's formula objects, so equations round-trip. They were written as their linear text. LibreOffice scales a formula to its frame, so the frame is sized from the equation's structure (a box per node: fractions, scripts, radicals, n-ary operators, delimiters, matrices) and centred on the line. Checked in LibreOffice 24.2 with LibreOffice Math. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBVQLyDnrG8Tn1yDQcUabC