Skip to content

pptx-ts/math ​

Author display equations in LaTeX or MathML and get OMML for the math: option on addText (see TextProps.math).

Pipeline: LaTeX --temml--> MathML --mathml2omml--> OMML.

Both converters are optional peer dependencies (temml is MIT, mathml2omml is LGPL-3.0-or-later); install them to use this subpath:

sh
npm install temml mathml2omml

This subpath is Node-only: it loads the converters synchronously via node:module's createRequire, so latexToOmml() / mathmlToOmml() stay synchronous. Both display and inline (in-sentence) equations are supported: a default latexToOmml() returns a centered display <m:oMathPara>, while latexToOmml(tex, { display: false }) (and mathmlToOmml()) return the bare <m:oMath> form you pass to a text item with inline: true to flow it mid-paragraph (see TextProps.inline).

Interfaces ​

Functions ​

References ​

Diagnostic ​

Re-exports Diagnostic


DiagnosticCode ​

Re-exports DiagnosticCode


DiagnosticHandler ​

Re-exports DiagnosticHandler


ErrorCode ​

Re-exports ErrorCode


InternalError ​

Re-exports InternalError


InternalErrorCode ​

Re-exports InternalErrorCode


InvalidOptionError ​

Re-exports InvalidOptionError


InvalidOptionErrorCode ​

Re-exports InvalidOptionErrorCode


MediaError ​

Re-exports MediaError


MediaErrorCode ​

Re-exports MediaErrorCode


PackageReadError ​

Re-exports PackageReadError


PackageReadErrorCode ​

Re-exports PackageReadErrorCode


resetDiagnosticState ​

Re-exports resetDiagnosticState


setDiagnosticHandler ​

Re-exports setDiagnosticHandler


TsPptxCode ​

Re-exports TsPptxCode


TsPptxError ​

Re-exports TsPptxError


TsPptxErrorOptions ​

Re-exports TsPptxErrorOptions


UnsupportedFeatureError ​

Re-exports UnsupportedFeatureError


UnsupportedFeatureErrorCode ​

Re-exports UnsupportedFeatureErrorCode