eBook, EPUB & XML

MathML in digital textbooks: accessible, searchable mathematics

Equations set as images look correct but are closed to many students. MathML makes mathematics readable by assistive technology and adaptable to every screen.

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

Common sources of MathML
SourceRoute to MathML
LaTeXConversion tools that map LaTeX math to MathML
MathType equations in WordExport or convert MathType objects to MathML
Word equation editorConvert OMML to MathML
XML workflowsStore MathML in the XML directly
Equation imagesRe-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

  1. Validate MathML as part of the file validation.
  2. Compare rendered equations with the print edition.
  3. Listen to a sample of equations with a screen reader to check speech.
  4. Check that inline and display equations are marked correctly.
  5. 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:

  1. Identifying every equation, including inline expressions in body text.
  2. Converting from the best available source: original equation objects where they survive, or re-keying from the printed form.
  3. Proofreading against the print edition, ideally by someone with subject knowledge.
  4. 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.

Frequently asked questions

What is MathML?

MathML (Mathematical Markup Language) is a W3C standard for describing mathematical notation and structure in markup. It is part of HTML and is supported in EPUB 3, so equations can be rendered as text and read by assistive technology.

Should I still provide alt text for equations in MathML?

It can help as a fallback where reading systems do not support MathML well. Many workflows include alternative text or an annotation with each equation, while treating MathML as the primary representation.

Experience our publishing production quality firsthand

Share your project requirements or sample files with our team. We will review the scope and discuss suitable production, quality assurance and delivery options. We confirm the scope and turnaround before work begins. NDA on request.