Βι¶ΉΣ³»­

Making LaTeX Math Equations More Accessible

People who use equations and formulae heavily often prefer to create content in LaTeX rather than word processing software. LaTeX is a publishing system based on the TeX markup language that accurately renders math and equations, which are often difficult to create in other applications.

Although LaTeX will render equations properly when converted to Portable Document Format (PDF), the results are only useful for people who do not rely on assistive technologies such as screen readers. Screen readers announce the content aloud to visually impaired users and assist them in navigating a document. Unfortunately, when LaTeX is converted to PDF, screen readers generally will not properly announce the equations, formulae, and special characters. Although simple equations and related material can be tagged as images in the PDF and provided with alternative text, it is often difficult to accurately describe complex equations and positional relationships, and it can be a cumbersome and laborious process, even for material that is relatively easy to describe in text.

Fortunately, converting from LaTeX to the current version of Hypertext Markup Language (HTML), HTML5, works well and allows assistive technologies to read the textual content in web browsers. However, HTML5 by itself can have problems properly displaying math and other equations. 

It is possible to convert LaTeX to HTML5 in a variety of ways. An easy approach involves use of a free online tool called Pandoc. To display formulae, equations, and special characters, and make them accessible to screen readers, MathJax (an HTML plugin) was developed by the American Mathematical Society (AMS). It allows commands and mathematical formulae to be read as if it were LaTeX itself.

General Process for Converting LaTeX with Math to Accessible HTML5

  1. Create content in LaTeX
  2. Convert the body of LaTeX documents to HTML5 via Pandoc
  3. Add MathJax code snippet to the HTML preamble to make HTML understand LaTeX
  4. Update the HTML file to account for HTML-editable conversion issues as needed (note that these only apply if necessary/desired):
    • Convert any macros used in LaTeX for proper MathJax rendering by adjusting the preamble
    • If metadata is needed (author, title, keywords, abstract, subject classification), reproduce these parts manually in HTML
    • Adjust possible list formatting issues in HTML
    • Create special headings for theorems or definitions, manually italicize the internal text
    • Create equation, theorem, or section numbering if desired
    • Adjust HTML to properly render accents for non-English origin names

For questions and details about the LaTeX to HTML-MathJax conversion process using Pandoc, please inquire by email to the Research and Scholarly Works Information and Communications Technology (ICT) Accessibility subcommittee (researchandscholarlyworks@lists.unr.edu).