Standards: December 2008 Archives

MathML for IE7 Update

| | Comments (0)

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.

Time for a Montenegran Web Site?

| | Comments (1)

While I was Brett's Gaming Commons blog entry on the totally awesome RJDJ interactive music application for the iPhone, my inner geek noticed that the download was actually from http://rjdj.me with the .me domain

I knew about the .tv domain (which is really the South Pacific island Tuvalu), but this was new so I checked it out. The .me domain is in fact from the country Montenegro (one of the many republics formed from the former Yugoslavia), and it has only become available in January 2008. from GoDaddy.com.

By July though, it turned out that GoDaddy was having a little problem sorting out multiple applications for hug.me and other popular .me ideas. It's always great to see how international protocol interacts with the marketplace.

Speaking for the former Yugoslavia though, we did lose a potential domain treasure when their original domain .yu was discontinued. Alas, there will not be any over18funfor.yu sites coming our way any time soon.

MathML Testing & One Weird Benefit

| | Comments (0)

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)

Fraction - a = 27 r squared times T sub c squared over 64 P sub C

Image of Equation Generated by MathML (Sharper)

Same Fraction Rendered in MathML/Firefox

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.