Key takeaways
- MathML is the W3C standard for representing mathematics in HTML, EPUB and XML.
- It lets screen readers speak equations, braille displays render them and text scale cleanly.
- Produce MathML from structured sources such as LaTeX, MathType or XML, then check it.
- Support varies by reading system, so test and plan fallbacks where needed.
Why MathML matters
When equations are images, a screen reader can only read the alt text, which is often missing or simplified. Students cannot zoom an image without blurring it, search it, copy it or navigate within it. MathML stores the equation's structure: fractions, roots, subscripts, operators and their relationships. Assistive technology can then speak it, render it in braille or let the student explore it part by part.
For STEM textbooks, assessments and journals, this is the difference between content that is accessible and content that is not.
Presentation and content MathML
MathML has two forms. Presentation MathML describes how notation looks and is what EPUB and HTML use for display and accessibility. Content MathML describes mathematical meaning and is used in some specialised systems. Most publishing workflows produce presentation MathML. Our eBook and data conversion services include MathML for EPUB and HTML where included in scope.
Producing MathML
| Source | Route to MathML |
|---|---|
| LaTeX | Conversion tools that map LaTeX math to MathML |
| MathType equations in Word | Export or convert MathType objects to MathML |
| Word equation editor | Convert OMML to MathML |
| XML workflows | Store MathML in the XML directly |
| Equation images | Re-key or recognise, then check carefully |
Structured sources give the most reliable results. Equation images need re-keying or recognition, both of which require careful proofreading. Our STEM and math typesetting guide covers math in the print workflow.
Rendering and support
MathML support in browsers and reading systems has improved, but it is not uniform. Some reading systems render MathML natively; others rely on scripts or do not render it well. Before production, check the reading systems and platforms your buyers use, and test sample equations on each.
Where support is uncertain, common strategies include providing alternative text with each equation, or an image fallback with alt text, while keeping MathML as the primary content.
Accessibility details
- Speech: screen readers and math-aware tools convert MathML to speech. Correct structure gives correct speech.
- Braille: MathML can be converted to braille math codes such as Nemeth or UEB technical.
- Navigation: some tools let students move through an equation term by term.
- Language: the surrounding text language affects speech, so set language correctly.
Quality checks
- Validate MathML as part of the file validation.
- Compare rendered equations with the print edition.
- Listen to a sample of equations with a screen reader to check speech.
- Check that inline and display equations are marked correctly.
- Confirm fallbacks or alt text exist where the plan requires them.
Common errors include invisible operators missing, such as implied multiplication, numbers split into separate tokens and wrongly grouped expressions, which may look right but read wrongly.
MathML in assessments
In assessments, MathML must not give the answer away through alt text or annotations, and equations in options must be read clearly. Test assessment items on the delivery platform, as described in our guide to assessment material production.
Metadata
When an EPUB includes MathML, its accessibility metadata should declare it, for example through the accessibilityFeature value MathML. This helps students and platforms find accessible STEM titles.
Planning MathML into production
Decide at the start of a project that math will be MathML, choose the source format, agree on fallbacks and set up checks. Converting math from images at the end of a project costs more and risks errors.
Converting legacy math content
Backlist titles often contain equations as images or in old equation formats. Converting them to MathML involves:
- Identifying every equation, including inline expressions in body text.
- Converting from the best available source: original equation objects where they survive, or re-keying from the printed form.
- Proofreading against the print edition, ideally by someone with subject knowledge.
- Testing rendering and speech on a sample.
Re-keyed math needs particularly careful checking, because a single wrong symbol changes the meaning.
Consistent conventions
Agree conventions for the project before conversion: how to represent units, how to mark up chemical formulas, whether to use particular characters for minus signs and multiplication, and how to treat equation numbers. Consistent markup gives consistent rendering and speech across a title and a series.
Working with authors
Authors who write in LaTeX or with MathType can make MathML production easier by using standard commands and avoiding visual tricks, such as spacing adjustments to fake alignment. A short guide for authors on equation preparation, issued at manuscript stage, pays off throughout production.
How M.S. Corporations helps
We produce MathML from LaTeX, MathType and XML sources, check rendering and speech, and include MathML in EPUB, HTML and accessible files where included in scope. See our accessibility services and higher education services, or request a sample review.