ddn.odf.math
ODF formula/math document body model.
Provides preservation-first access to office:formula content for OpenDocument Formula files (.odf).
Formula payloads are stored as raw MathML XML strings with optional typed helpers for common operations:
OdfFormulaBodywraps the MathML content stringparseFormulaBody()extracts the formula from an XML elementserializeFormulaBody()produces the<office:formula>element- Round-trip serialisation preserves MathML structure exactly
struct OdfFormulaBody
Types 1
structOdfFormulaBody
Top-level model for office:formula body content.
The formula payload is stored as a raw XML string (MathML content) for maximum preservation.
Functions 6
fn
OdfFormulaBody parseFormulaBody(XmlElement formulaElement)Parses an `office:formula` or `math:math` XML element into an `OdfFormulaBody`.fn
string serializeFormulaBody(const ref OdfFormulaBody body)Serialises an `OdfFormulaBody` to an XML fragment string.fn
OdfFormulaBody formulaBody(string markup) @safe pure nothrowConstructs an `OdfFormulaBody` from raw MathML markup.fn
string elementToXmlString(XmlElement el)