Formula MathML Associates

ISO 32000-2 14.8.4.8.3 and WTPDF 1.0 8.2.5.24 attach MathML 3.0 as an Associated File of a Formula structure element

THotPDF writing members

THotPDF.AttachMathMLToFormulaElement(FormulaElem, MathMLXML, FileName, Description, AFRelationship) embeds the MathML XML as an application/mathml+xml stream, wraps it in a Filespec registered through the catalog associated files and the embedded-files name tree, and associates it with the existing Formula element

THotPDF.AddFormulaWithMathML(Parent, PageIndex, MCID, AltText, MathMLXML, ...) creates the complete tagged Formula element in one call — alt text, the PDF 2.0 MathML-namespace math structure child, and the attached MathML file

THotPDF loaded-document queries

THotPDF.GetLoadedFormulaMathML(StructElemDict, ...), with string and THPDFFormulaMathMLInfo overloads, extracts the associated MathML from one element, or reconstructs it from MathML-namespace structure children when no associated file matches

THotPDF.CollectLoadedFormulaMathML(Formulas) walks the structure tree in document order with role-map mapping, a cycle guard and a 256-level depth cap, and returns every Formula element with its MathML and text alternatives in a THPDFFormulaMathMLArray

THotPDF.AddAccessibleMathMLFormula is the earlier byte-based member of the same workflow