Math Formulas in Accessible Ebooks

Illustration promoting accessible math formulas in ebooks. Part of the #AccessibilityAcademy series. A girl studies various symbols and equations on a large screen, highlighting the need to make math and science content readable for everyone, including users of assistive technologies.

Written by

Monika Zarczuk-Engelsma

Posted on

Apr 16, 2025

Category

Accessibility

Introducing math formulas into ebooks is a significant challenge in the context of making them accessible for all users, including those who use screen readers. It is of vital importance to use the right content format, e.g. MathML, which contains mathematical logics of formulas and influences the quality and accessibility of mathematical content.

Formats Used to Represent Math Formulas

MathML (Mathematical Markup Language) is a language describing mathematical expressions, created with the aim to integrate mathematics with internet documents. It enables the semantic presentation of formulas, which is key for assistive tools, e.g. screen readers. This way, blind or visually impaired individuals are able to access mathematical content in a comprehensive and effective way.

An alternative approach is to use the LaTeX language, which has long been used to professionally edit scientific documents containing advanced math formulas. However, in order for formulas written in LaTeX to be correctly displayed in ebooks, it is necessary to use the right rendering tools, e.g. MathJax. MathJax is a JavaScript library which enables the display of math formulas on websites using the LaTeX, MathML or AsciiMath editors. However, JavaScript doesn’t work in the ePub format on most ebook readers, so it is not possible to use MathJax. Therefore, it is advisable to use MathML, which displays math formulas correctly, adjusts them to different screen sizes and is compatible with assistive technologies.

Displaying Formulas in the ePub and PDF Formats

Depending on an ebook’s format, the implementation and display of math formulas may vary:

  • ePub3: As the open standard for ebooks, ePub3 supports the integration of MathML, which enables a semantic and accessible presentation of math formulas. MathML works on most ebook readers. However, the way of rendering formulas might be a little different for different devices or applications.

  • PDF: Although the PDF format is frequently used, it has no native support for MathML. Math formulas are often rooted as pictures or using special fonts, which makes them a lot less accessible for screen readers. In order to make a pdf more accessible, alternative texts should be added.

Technical Challenges

The implementation of accessible math formulas in ebooks faces a number of challenges.

  • Compatibility: not all ebook readers display MathML formulas correctly, which makes it necessary to implement alternative solutions, like rooting formulas as pictures. This, however, makes them less accessible.

  • File format conversion: converting documents containing math formulas from one format to another (e.g. from LaTeX to MathML) may lead to the loss of information or incorrect rendering.


Requirements for Users Who Use Screen Readers

In order to make math formulas fully accessible for screen reader users, a few things should be taken into account:

  • Recording formulas semantically: Using MathML enables the conversion of the logical meaning of mathematical expressions, which makes it easier for screen readers to interpret them

  • Alternative descriptions: When it is not possible to use MathML, text descriptions of formulas or their alternative versions should be added so that screen reader users are able to understand mathematical content. Alternative texts in HTML and ePub2 can contain MathML.

  • Testing accessibility: testing ebook accessibility regularly using different screen readers makes it possible to identify and eliminate any problems that might occur.


Have a Book’s Comment:

At Have a Book, we believe in the “born accessible” approach, which means taking accessibility into account at the typesetting stage of preparing an ebook. When it comes to math formulas, even small mistakes might make them difficult to read for assistive technologies, which affects an ebook’s accessibility.

We usually prepare ebooks based on publications typeset in the Adobe InDesign program. For many years, math formulas did not work in that application and had to be prepared using specific extensions or external applications, e.g. MathType, MathMagic. In the latest version of InDesign, native support of formulas in the MathML format was added. Regardless of how one chooses to do it, math formulas need to be recorded using very specific operators. The overriding goal of all formula-recording technologies is to preserve their mathematical logic, not just their appearance. Texts handed over for typesetting often contain mistakes which alter the mathematical sense of an expression. It is of vital importance to notice them while preparing files.

Typical mistakes which might occur are:

  • Incorrectly marked variables – there are specific styles for variables, defining them incorrectly might lead to disorder, especially for people who use screen readers.

Two instances of the Pythagorean theorem are shown. On the left, the formula “a squared plus b squared equals c squared” is written in red with upright letters, which is incorrect formatting for mathematical variables. An arrow points to the corrected version on the right, where the same formula is written in blue with italicized letters, which is the proper style for variables. Below, the lowercase Greek letter pi is shown in red with upright style, followed by an arrow pointing to a blue italicized pi, demonstrating the correct way to present Greek variables in math expressions.
  • Incorrect spaces – MathML regulates distances when projecting a formula, adding unnecessary spaces might lead to mathematical operators being misinterpreted.

    A math expression is incorrectly formatted: “2 plus 3 equals 5”. Extra spaces are inserted between the numbers and the operators, shown as grey vertical bars. This can cause issues with how screen readers interpret the formula. A red circle with a white “X” on the left indicates this is incorrect formatting.
  • Incorrect use of parentheses – parentheses marked as text and not as a MathType, MathML or LaTeX function are going to be misinterpreted by screen readers. It is particularly problematic in expressions with multiple roots.

Illustration comparing incorrect and correct use of parentheses in mathematical expressions. First example (incorrect): The expression 2((x + y(z + b))) is displayed in blue using plain text formatting, where the parentheses do not adjust in size to the nested structure. Second example (correct): The same expression 2((x + y(z + b))) is displayed using MathType or similar math markup, with progressively larger parentheses to visually reflect the nested structure. This preserves mathematical hierarchy and improves accessibility for screen readers.
  • Using a hyphen instead of a minus sign – a formula containing a hyphen instead of a minus sign will not be read correctly.

The math expression “5 - 3 = 2” is displayed incorrectly. The minus sign is replaced by a hyphen, highlighted in red to indicate the mistake. A red circle with a white “X” on the left shows that this is not the correct way to write the formula. This can cause screen readers to misinterpret the expression.

Being aware of these problems and eliminating them at the typesetting stage helps create accessible publications.


Bibliography

https://www.w3.org/TR/MathML/

https://docs.mathjax.org/

https://www.latex-project.org/

https://karol-koziol.blogspot.com/2014/06/wyrazenia-matematyczne-na-stronach-www.html

https://www.aph.org/blog/making-math-more-accessible-monarchs-word-processor/

https://daisy.org/news-events/articles/creating-reading-accessible-math-w/

https://jaws.altix.pl/2020/06/05/dostepnosc-matematyki-dla-uczniow-i-studentow-z-roznymi-niepelnosprawnosciami-przeglad-rozwiazan/

https://asciimath.org

The article was created in close collaboration between the Polish Foundation for the Blind and Visually Impaired "Trakt” and Have a Book.

Translated by Aleksandra Kallas