Creating accessible maths notes with LaTeX

Rosie Shewell Brockway

Across the university, increased efforts are being made to remove barriers to accessibility, so that all students can access learning in a way that best suits their needs. Part of this has been ensuring that teaching materials are in a format that is compatible with assistive technologies, such as screen readers, magnifiers and text to speech software. 


Since everyone’s access needs are different, a great way to improve the accessibility of digital content is by using a format that can be tailored to a student’s needs by allowing them to alter page features such as font, text size, background colour and text colour. This is particularly important for visually impaired students, and students with specific learning differences (SpLDs) such as dyslexia, where font, colour and contrast all affect how readable a document is.


For autistic students such as myself, altering the background and colour contrast can help to manage the sensory environment and reduce overload.


As well as helping with visual impairment, screen readers can also be very helpful for autistic students and students with SpLDs, helping to reduce cognitive load and speed up reading comprehension. 

Accessibility in maths

Currently, the standard file format for mathematical teaching resources is PDF, as this is the default file format produced by the mathematical typesetting language LaTeX. Alternatives to LaTeX such as Microsoft equation editor are really only suitable for documents with only a small amount of mathematics, and in many cases, LaTeX is the only viable option when it comes to producing high quality mathematical teaching resources.


The problem with PDF as a file format is that the page characteristics, such as text size and colour, cannot be adjusted by the reader. PDFs created using LaTeX cannot be read using a screen reader, which means that at present, students who rely on a screen reader to access their learning, for example those with a visual impairment, can find it difficult to access degree programmes that feature mathematics. 

MathJax

MathJax is a javascript display engine that can render equations created with LaTeX in an accessible form. The developers are part of a larger project called A11y that is focussed on open source solutions to digital accessibility.


Equations created with MathJax are automatically equipped with a mathematically-informed alt-text that can be read by a screen reader. Other properties such as text size, colour, font and background colour can also be edited without needing to change the LaTeX source code.


Here is an excellent YouTube playlist demonstrating how MathJax equations can be read using a variety of common screen readers: MathJax tool demo videos.

LaTeX as html

Though MathJax is primarily designed for use on websites, packages such as LaTeXML or lwarp can be used to create html versions of notes created with LaTeX, and in such a way that all typeset equations are rendered using MathJax.


I first came across this method for making LaTeX resources accessible when working as a Maths and Statistics Help (MASH) Mathematics Tutor. A student booked in for a 1:1 to discuss the SoMaS module MAS334 Combinatorics. Neil Strickland’s course notes for this module are available either in the usual LaTeX pdf format or as an html file. I was immediately struck by how pleasant to read the html format is, with material presented in an organised way that feels uncluttered and natural to read in a browser.


Fewer and fewer students download or print course materials, with many preferring to access materials in browser tabs. It occurred to me that if students read PDFs in browser tabs anyway, they may as well open html files, which are far better suited to use on a range of devices and screen sizes. 


Another huge advantage of the html format is its accessibility. Page properties such as text size, font and colour scheme can all be altered without disturbing any of the actual content of the document, and by rendering equations with MathJax, html notes can be read using a screen reader.


For students with SpLDs or those of us who are neurodiverse, these increased accessibility options make a big difference to the amount of effort required to process written information. For visually impaired students, it could make all the difference when considering whether to pursue a STEM degree programme. 

Creating html versions is easy!

LaTeXML, lwarp and Pandoc are all software packages that can be used to create html documents from TeX files, in much the same way as you would use pdflatex to generate a pdf file from a TeX file. All the editing is done in the tex file, so you do not need knowledge of html or css. Plus you can enable an option to have all equations automatically rendered using MathJax, so that the file produced can be read using a screen reader.


LaTeXML is the package used by Neil Strickland to make his lovely combinatorics notes — see this very useful article on Using LaTeXML to convert your latex files (thank you to Neil Strickland for sharing this with me).


lwarp is another tool for converting LaTeX to html, and Nic Freeman from SoMaS has written a comprehensive tutorial for using Iwarp to create html versions of LaTeX files.

Other useful links:

About the author

I am a pure maths PhD student in the School of Mathematics and Statistics (SoMaS), now in the final stages before submitting my thesis. I have a strong interest in maths education and accessibility, and am involved in a range of teaching in the university, both at SoMaS and at the 301 Academic Skills Centre, where I work as a Maths and Statistics Help (MASH) tutor.