MathML Comparison in DITA Topics
DITA Comparison includes special handling for embedded MathML content within DITA topics. This enables mathematical notation to be compared and the result to remain valid and renderable.
How MathML Comparison Works
MathML elements embedded in DITA topics are identified and processed separately from the surrounding DITA markup. The comparison algorithm handles the MathML as a self-contained unit, then represents the differences according to the selected granularity mode.
Granularity Modes
|
Mode |
Behaviour |
|---|---|
|
|
Repeats both the A and B MathML inputs side by side |
|
|
Repeats the A and B inputs side by side, with individual changes highlighted within each |
|
|
Reports differences within the MathML expression without duplicating inputs |
The mode is controlled by the mathml-granularity parameter.
Viewing MathML Comparison Results
The comparison result is a valid DITA document with MathML differences represented in thecselected format. For best results, view the output in an XML editor that renders MathML, such as oXygen XML Editor.
MathML changes are highlighted using the same markup style as text changes — deleted expressions use the A markup style and added expressions use the B markup style.