Friday 23 September 2022

Making equations accessible

 Today I watched the JISC Accessibility Clinic recording A collaborative approach to maths accessibility learning a lot about the challenges in making math or STEM content accessible. 

I have used MathJax and MathML with Moodle and have blogged about it earlier in my work at UCEM



Listening to and watching a demonstration of the LaTex and how PDF export loses the structure of equations made me think of the number of inaccessible learning materials we could be having. It is definitely something that we all will have to work on.

So I am looking at how MathJax can be included in a standard HTML page like this blog page.

If I try to include the Pythagoras theorem's equation for hypotenuse I will have to type something like 
hypotenuse  = (a^2+b^2)^0.5 because I am not familiar with MathML to make it work.

But now I can use MathJax. You add these two lines into the HTML code.

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

Then write your code 

<p> \ [hypotenues =  \ sqrt{a^2+b^2}\]</p>

There are no spaces between backslash and the character next to it but to show how to write the equation I am adding spaces

Then the MathJax will make it look like

\[hypotenues = \sqrt{a^2+b^2}\]

There are obviously some notations to learn.

MathJax documentation on Writing Mathematics for MathJax 

\[...\] for displayed mathematics

 \(...\) for in-line mathematics and lots more for various operations.