Question Details

No question body available.

Tags

matlab ms-word latex mathml

Answers (1)

May 27, 2026 Score: 2 Rep: 31 Quality: Low Completeness: 80%

The issue is likely related to the specific MathML format that Microsoft Word expects for native equations. Although Word can import some MathML content, its native equation system is internally based on OMML. Because of that, not all generated MathML behaves the same way when pasted into Word.

That explains why:

  • the MathJax/LaTeX conversion workflow produces editable equations;

  • MATLAB's mathml() output is inserted as plain text instead;

  • large expressions become unreliable or require manual splitting.

So the problem is probably not MATLAB itself, but the conversion pipeline and the markup format Word recognizes as equation content.

A more robust workflow is usually:

  1. Generate LaTeX from MATLAB using latex()

  2. Convert LaTeX → OMML (instead of generic MathML)

  3. Insert the OMML into Word through COM automation or DOCX generation

For example, COM automation can create native Word equations directly:

word = actxserver('Word.Application');
doc = word.Documents.Add;

selection = word.Selection; selection.OMaths.Add(selection.Range); selection.Range.Text = 'x^2 + y^2'; selection.OMaths.Item(1).BuildUp();

However, extremely large symbolic expressions may still hit practical limits in Word itself, regardless of the conversion method.

So in practice:

  • generic MathML is not always sufficient for Word equations;

  • OMML tends to be the most reliable format for native editable equations in Word.