When migrating to structured content, there is a strong motivation to backup DITA content with other complementary XML technologies, such as SVG for images, or Mathematical Markup Language (MathML) for equations.
MathML: a W3C standard
Now in its third version, MathML is a W3C standard, a mathematical vocabulary created to include mathematical expressions in Web pages.
MathML vocabulary enables a) localization and b) processing with mathematical tools.
Authoring MathML is easier with editors specific to MathML, such as MathFlow or MathJax – for a complete list, see list of editors. Amongst the most important features: copying and pasting equations; visual editing; exporting to images (for example, SVG).
There are other mathematical vocabularies (OpenMath) and scientific authoring tools (LaTeX, TeX). Additional third-party tools can take in charge the exchange or export/import between these tools and formats.
Find MathML samples
You can find simple or complex sample files from the W3C test suite (see link below). From the suite page, display the mml version (name of the MathML extension). A sample Integral1.mml is pasted here:
<?xml version="1.0" encoding="UTF-8"?> <!--Samples from the W3C test suite--> <math xmlns="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" display="block"> <mstyle displaystyle="true"> <mo>∫</mo> <mi>f</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mtext> </mtext> <mo>ⅆ</mo> <mi>x</mi> </mstyle> </math>
MathML + DITA = ?
DITA does not support MathML markup out of the box. There are therefore specific challenges for tools to support DITA + MathML so they can:
- support the derivative DITA + MathML schema,
- present a preview of the files,
- check the XML compliance,
- check and maintain links,
- publish MathML in the Web, print and mobile pipelines.
MathML files can be referenced as external objects, as mml files or images, OR equations can be in the topic body -inline.
In the latter case, the DITA topic must integrate MathML markup in its schema (on top of DITA). The editor must then validate the mathematical vocabulary. Most leading XML editors support MathML editing – either with their own MathML editor or integrating another editor, such as MathFlow (Design Science).
There are different possible workflows possible but most XML publishing chain would include:
- An XML editor – must validate MathML and integrate/support a MathML editor.
- The DITA + MathML specialization – to validate, link, reuse, reference, and maintain the content.
- Stylesheets and renderers – must process and print equations with the appropriate formats and fonts for print, Web, and mobile outputs.
- Most browsers support MathML notations, natively or with a plugin.
Do you need a specific MathML editor?
If your review, translation, and publishing workflows do not include an iterative cycle between different teams, equipped with distinct tools, then you can simply export the equations as images before linking the media.
However, you probably need MathML support in your collaborative tool if your content contains equations that the Information Development team needs to review, edit or translate equations.
MathML in Componize
MathML is integrated and supported by Componize solutions. From authoring with the Author component (oXygen integration), to the publishing, with dedicated PDF pipelines. Componize (and oXygen) uses the FireLab public DTD for base topics and composite topics. oXygen Author, fully integrated to Componize (from 1.6), supports MathML and offers integration to MathFlow.
References and resources
MathML specifications: http://www.w3.org/TR/2010/REC-MathML3-20101021/
Copy samples from the test suite: http://www.w3.org/Math/testsuite/overview.html
W3C Math Home http://www.w3.org/Math/