## Use MathML in online contents!

There are not many ways of including a mathematical expression in a Web page. The 2 main ways are:

- using an image representing the formula → the
**wrong**way - using MathML → the
**right**way

I could argue that using MathML *improves* accessibility. But actually it does far more than this. It quite simply makes accessibility **possible**.

What I mean is that even if an image has an alt attribute in a readable format, this format will only be understandable by a small percentage of disabled people.

#### What will you put in the alt attribute for an image?

For blind people, you can put it in Braille, but then which Mathematical Braille code are you going to use? Even if it is a page in French, will you adopt the 2007 revised version of the code? It would not be a bad idea but what about the people who were taught the 2001 version or even the 1971 one? And then which Braille table are you going to use? Now not all Blind people read Mathematical Braille code. I am not just talking about elderly people who are less likely to be studying Maths.

You could replace it with a text sentence representing the formula. That would be understandable by a few more people. Including a larger number of blind people and those with limited vision. But it will become very difficult to understand as soon as it reaches a certain level of complexity.

Let’s try with an example. Take a blank sheet of paper and a pen. And now read the following equation and write it down. To be fair, read it first, without writing anything. And then write it down without looking at it again.

Ready? Go: « Integral from zero to one of f of t, dt, equals limit when n tends to infinity of Sum from k equals zero to n of one over n by f of one over k. » Now write it down without looking the screen again. Can you? Ok maybe you are a genius. But most people are not… And just imagine that you have to use this equation to solve a problem…

#### Enlarging text

Partially sighted people usually need to enlarge the size of the text. This does not work of course with images. Or very badly. It usually becomes unreadable. Here on the right is a fragment of an expression, enlarged 8 times. How nice! And you should know that magnifying software can enlarge up to 32 times.

Other people with partial sight will need to use personalised background/foreground colours (or instance white text on black background): this will not work either with an image.

### Now what changes when the formula is in MathML format?

- First of all, the rendering can be resized without any loss of quality. The user can enlarge the size of text, the formula will grow as well! And this time it will be readable!
- Then an appropriate plugin will be able to automatically convert this to accessible forms. For instance the MathPlayer offers various functions: it can enlarge the formula, make it more visible (separate it from the background) and convert it to a sentence that can be output with speech synthesis.
- Finally the formula (or the document containing it) can be downloaded and accessed with specific software, like the Math Genie or the lambda editor, or converted to Braille documents (using for example Bramanet in French, or the multilingual UMCL).

Other plugins are currently being developed for converting into Braille from the browser (allowing the user to choose their preferred Braille code and Braille table).

### What about sighted individuals?

But OK, I understand that some people still think that it won’t concern enough people to be worth the bother. I don’t agree with them but I know that unlike dinosaurs, they still exist… So if one of them displays a gif image in a web page to show a Mathematical formula, well usually it will look like this:

Now isn’t that great? This one was copied from an existing online course in my own university (shame). Look under the sigma. Can you read it? It’s easier if you already have a Masters in Maths, so you can guess from the context, but what if you are studying Maths, at beginners level?

∫01f (t)dt=limx→∞∑k=0n1nf(1k)

Now try to enlarge this using the using the relevant menu item (depending on your browser). At least with Firefox and all browsers based on Gecko it works perfectly.

Conclusion: even for sighted people: PLEASE USE MATHML!

How did you include MathML in WordPress? Did you use the itex2MML plugin?

I did not use any plugin, I just pasted the MathML code in my post, via the « code view ». The formule was produced using MathType, and exported to MathML.

I had to hack a little bit the code of the theme I’m using in order to make it generate pages with the XHTML+MathML doctype instead of HTML. I reckon it’s not « plug&play ». I plan a post to describe all that, asap.

Very useful plugin. Thanks.