Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

January 31, 2008

Opera and MathML

Several months ago, I got an email about my “elementary” derivation of Boltzmann Entropy. My correspondent complained that I had made several boneheaded mathematical errors in my post. We went back and forth, for a bit, with me explaining what I was doing, and he insisting that I was clearly wrong.

Eventually it dawned on me that my correspondent was an Internet Explorer user who, despite the repeated warnings presented to IE users, had not installed the MathPlayer plugin. I suggested to him that, perhaps, the reason he thought my derivation was erroneous was that the formulæ were not rendering correctly in his browser. No, he insisted, he was using the latest version of Internet Explorer, and it was rendering my site just fine. The problem was in my derivation.

I guess this says something about user expectations. Neither Safari nor Opera supports MathML, but I haven’t felt the need to go to extreme lengths to warn users of those browsers that their rendering of the equations hereabouts are broken.

At least, until now.

The most recent version of Opera 9.50, is now claimed to have MathML support out of the box. What they’ve actually done is come up with a CSS stylesheet, which succeeds in giving a semblance of the correct appearance to many MathML constructs.

But, even with Opera’s fairly sophisticated extensions to the basic technology of CSS (e.g. the use of SVG background images), there are many things which simply don’t work. Most glaring are tensors. Consider the itex command, $$\tensor{R}{_i_^j_k_^l}$$. This produces

Ri j k l \tensor{R}{_i_^j_k_^l}

which looks like

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mmultiscripts>
    <mi>R</mi><mi>i</mi> <none/> <none/> <mi>j</mi> <mi>k</mi> <none/> <none/> <mi>l</mi>
  </mmultiscripts>
</math>

The Opera people have written up a “profile” of MathML, which is supported by their stylesheet. And, as you can see, tensor notation was one of the things they had to pitch overboard.

So I asked the author how one is supposed to mark up tensors in a fashion compatible with their profile. His response

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <msubsup>
    <mi>R</mi><mrow><mi>i</mi><mi> k</mi></mrow><mrow><mi> j</mi><mi> l</mi></mrow>
  </msubsup>
</math>

(there are other options too, like using mphantom or mspace instead of Unicode spaces)

was absolutely mind-blowing. He actually recommended changing the order of the tensor indices and then faking out the appearance of the correctly-ordered indices using spaces. You can imagine how that’ll work in assistive technology. And hypergeometric functions ($\multiscripts{_2}{F}{_1}$), for instance, are apparently too “marginal” to even be worthy of this ASCII Art treatment.

Chaals, the erstwhile accessibility guru, must be undergoing some serious cognitive dissonance.

I have plenty of other complaints about the proposed CSS-compatible Profile. But those’ll have to wait for some other post, as I’m nearly out of rant.

My immediate concern is elsewhere. Soon enough, users of Opera 9.50 are going to be visiting this site and, unlike in the past, they are going to assume that the formulæ they see are being rendered as intended.

So, before they start writing me about my boneheaded mathematical errors, perhaps I need to compose some popup warnings targetted at Opera users…

Posted by distler at January 31, 2008 12:00 AM

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/1588

3 Comments & 3 Trackbacks

Re: Opera and MathML

I don’t know if this fits your user’s situation but IE’s built-in blog reader does not display MathML properly formatted even if MathPlayer is installed. Unfortunately, there’s nothing we (Design Science, makers of MathPlayer) can do about it. I believe it disables all active content in its blog reader pane.

Paul Topping
Design Science, Inc.

Posted by: Paul Topping on January 31, 2008 1:51 PM | Permalink | Reply to this

Re: Opera and MathML

I imagine the situation is not that different from that of standalone feedreaders.

  1. They aggressively sanitize the content:

    • stripping out known “dangerous” elements, like <object>,
    • stripping out unknown tags (like all of MathML).
  2. They hand the content off to be rendered as text/html.

The only feedreader that I know of that renders MathML in feeds is Liferea.

In the case of the reader in the story above, I took his IP address from the email headers, and looked in the HTTP Server logs to see what browser he was using. As I had begun to suspect, it was IE, without MathPlayer installed.

Posted by: Jacques Distler on January 31, 2008 7:08 PM | Permalink | PGP Sig | Reply to this

Re: Opera and MathML

A misunderstanding like the one with the IE person is fixable by sending screenshots of correct rendering to the person :-)

Posted by: Olafur Jens Sigurdsson on February 4, 2008 8:14 AM | Permalink | Reply to this
Read the post Google Summer of Code
Weblog: Musings
Excerpt: Bring MathML to Safari, and get paid.
Tracked: March 21, 2008 5:10 PM
Read the post Dinosaur
Weblog: Musings
Excerpt: MathML and SVG come to HTML5.
Tracked: April 12, 2008 11:44 AM
Read the post Matematika di Web dengan MathML
Weblog: Dani Iswara .Net
Excerpt: Masih seputar web. Menampilkan rumus Matematika di web sebagai teks dapat dilakukan dengan MathML (Mathematical Markup Language). Untuk jangka panjang, MathML diusulkan oleh W3C sebagai standar web dalam penyajian perhitungan Matematika berbasis teks. ...
Tracked: May 15, 2008 4:47 AM

Post a New Comment