## 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

$\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>
[/itex]

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>
[/itex]

(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:   http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/1588

### 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