#
Recently in *MathML* Category

I was also able to get MathML to display in Drupal, at least on the AccessAbility Web site. The key for Drupal is to make sure that the **Input Format** is set for **Full HTML.**

**See the ANGEL and MathML entry for information getting the appropriate namespace version of MathML. **

I'm prepping for a STEM Accessibility webinar and I am happy to announce that ANGEL does support MathML, at least for browsers that are able to display it. For accessibility purposes, my goal is to ensure that MathML is displayed properly in a version **Internet Explorer with Math Player** because that is the configuration that the JAWS screen reader supports.

### Browser Support

Before testing you want to make sure you are working with the right browsers and have the right fonts and players installed. So for MathML you will need

- Firefox 4+ (Best native support)
- Internet Explorer 9 + MathPlayer 3
- Safari 5.1+ (Limited native support)
- MathML font like STIX (free)

Note that Chrome did not support MathML natively as of Sept 28, 2012.

### Getting MathML Code

For the moment, I recommend using raw MathML code if you want to experiment. Where do you get MathML code? It can be exported an equation editor like MathType or MathMagic. You can start to learn more about these editors on my MathML Tutorial page.

BTW - The ANGEL equation editor default setting appears to insert an image based on MathML code, but it's still an image. This is OK, so long as you changed the ALT tag to be something understandable on a screen reader. Right now the default ALT tag is "mathml equation".

### First Try: HTML Editor

My first attempt was to cut and paste sample MathML code into the ANGEL HTML Editor in source view. This works great for modern versions of Firefox and Safari, but unfortunately NOT Internet Explorer. Sigh.

### Second Try: Upload HTML 5 File

My second try was to upload an HTML 5 with MathML file into ANGEL via a File Upload. This did work, but I had to make sure I was using the right MathML markup for Internet Explorer, specifically "namespace mark up" in which the initial `<math>`

tag includes the link to the MathML specification. That is:

```
````<math xmlns='http://www.w3.org/1998/Math/MathML'>`

#### CSS and MathML

If you really want to impress yourself, you can combine MathML with CSS. For instance, I use CSS to enlarge equations embedded in the MATH tag to font-size: 1.5em as follows:

```
````math {font-size: 1.5em; font-style:normal}`

### Ready for Prime Time?

The fact that I got a MathML posted into the ANGEL environment is good news, but it still requires the developer/ID/instructor to be comfortable working with HTML source view.

If the instructor is NOT comfortable with this, but can use an equation editor, the best option might be to export an equation as an image and insert it with an ALT tag. Fortunately, It is possible to insert images into ANGEL with an Alternative Tag.

As part of the Penn State accessibility initiative, I've been working on how to accessify math/science courses along with others like World Campus and Dutton Institute.

Part of that has been figuring out how to post MathML on modern browsers, but the second part has been to determine if the output can be read on a screenreader. The answer is yes...on some browsers with the right plugins.

### Screen Reader Results

I was able to get native MathML read aloud correctly on JAWS, but only on **Internet Explorer with the MathPlayer** plugin. For IE, you also need to ensure that the first line of the Math ML code links to the spec (see below)

```
<math xmlns="http://www.w3.org/1998/Math/MathML">
```

**<!-- xmlns link for IE 9 Support -->**

**EQUATION MATHML CODE HERE**

</math>

Sadly JAWS and Firefox were not a good match and neither were Safari plus VoiceOver. The good news, many blind users do use the IE+JAWS combo, but many are moving to Mac. For these users, the alternative may still be an image plus apprpopriate ALT tag, particularly for multi-line equations.

### So Close...Except for Browser Upgrades

The good news is that MathML is really becoming a viable option, but there are issues. One pointed out by my colleague Stevie Rocco is that many systems like ANGEL support only Firefox 3 and it's not until version 4 that improved MathML support is available. Similarly, not everyone may be upgraded to Safari 5.1 or Internet Explorer 9.

But I do expect that within 6-12 months, that could change, and MathML could mature into a key technology with relatively few quirks, like CSS and Unicode.

I had heard rumors (partly via Jerry Maddox) that you could actually post the same flavor of MathML on Firefox, Internet Explorer and Safari, and it would actually WORK.

I was able to do just that today. You can see the HTML5+MathML page as proof. More details are on the updated MathML Tutorial page.

Of course you can also check out this detailed MathML test page from Josephus "Joe Java" Javawaski. Safari is still a little behind the curve there.

I posted an MathML Tutorial in preparation for a talk Feb 5. You can also click "MathML" in the categories menu on the left to view all commentary on MathML (so far).

There are also some test pages available:

- Firefox (Native MathML) - May need to download MathML fonts
- Internet Explorer (Microsoft m:space MathML) - Math Player Plugin required

My last write-up on MathML indicated that I was having problems implementing MathML on Internet Explorer 7.

As it turns out I did get a rapid note from Design Science, the creator of the MathType equation editor which explained that MathML could be implemented on Internet Explorer 7 and they sent me a link to their MathML documentation at :

http://www.dessci.com/en/products/mathplayer/author/creatingsites.htm

I did want to expand my horizons, so I read their information. First, they did admit that there is no set of code that will work on all browsers (Math ML in IE 7 has a slightly different syntax). Fortunately, they do provide Javascript code for a browser sniffer.

In terms of viewing page in IE 7, you may have to download the MathType plugin. The first time it runs, you will likely get a security warning. You need to right-click and agree to run the Active X control.

IE Math ML Test Page

http://www.dessci.com/en/products/mathplayer/author/sample.htm

I did get MathML to run on my version of IE 7 (finally), but it looks like developer will be creating double versions of MathML for a while.

### Comment on Future Support

As with any browser war, there is a question of which version of MathML within HTML will be supported in the long run. Both implementations have their annoying quirks, I am placing my bets on the Firefox raw MathML win HTML version. One reason is that it is supported by Firefox and Opera which are known for promoting cross-platform standards. Indeed, the Firefox solution is the one used at the W3C MathML Test Suite. Also It's also the only method which works on any Mac browser at all (and yes there are technical researchers who do use a Mac). If you want Mac & PC, this is the only route.

A key player may be Safari - it would be interesting to see if they developers at Apple choose to implement the Firefox solution, the Microsoft solution or nothing at all.

Math ML is one of those standards that has been waiting for implementation for years. It's been on my list to try "one of these days" and I used an engineering course to try it out. First, it helps that modern equation editors are not exporting MathML files - I wouldn't want to try and code these by hand.

### Browser Implementation

Unfortunately, I was disappointed to learn that MathML is inconsitently implemented on the different browsers. It works best in **Firefox**, but only if you embed the HTML & MathML together in a true XML page (with the `<?xml version="1.0"?>`

header) and change the extension to **.xml** or **.xhtml**). The good newa is that If you're comfortable with CSS, you can apply styles to get some very nice effects (either in a DIV or directly on the tags).

See Fake Blog Test Page with MathML (with .xhtml extension)

**Update on Feb 4, 2009** - Firefox users should install an MathML font. For now I recommend the font from MIT (scroll down), but the Stix font should be available at some point in the future. I also recommend upgrading to Firefox 3.

The same file will also work in Opera, but with some display quirks (at least for exponents). Safari has no MathML support, but you can kluge some results with the right CSS stylesheet...but that page will look weird in Firefox (sigh).

As far as I can tell, IE 7 is hopeless. Once you change the extension from .htm/.html, IE 7 treats the file as a "random" XML file and can no longer parse the HTML tags properly - everything runs together on the page. I think you could fix the HTML part, but recreating a CSS stylesheet (e.g `h1,h2,h3,h4,p,ol,ul: {display:block}`

...but is it worth the hassle? The real problem is that the MathML does not display correctly.

In theory, there are plugins for MathML for IE 7, but they were designed for older versions of IE. The one I tried hasn't worked so far. To make it worse, when it did work, you apparently had to use an OBJECT tag (in an .html page) which then makes it stop working in Firefox - Arggh.

**Update on 8 Dec** - I was able to view a version of MathML of IE7, but the syntax is not the same. See the IE 7 and MathML Update entry for details

### Weird Benefit

If it ever works, it will be great because the MathML versions display much better than the GIF/JPG files generated by the Equation editor (see below for comparison). You can also make minor edits in the code to fix any typos/formatting issues (such as super tniny exponents)

**Image Generated by Equation Editor (Fuzzy)**

**Image of Equation Generated by MathML (Sharper)**

Which leads me to the weird benefit - I CAN use MathML in Firefox to post the equations and take screen captures for all other browsers. Plus, you can then have a record of the MathML to use for quick corrections. Then...when everyone gets to the same place, it will be nice to have a repository available to plug in later.