Hi.
Brion Vibber wrote:
On Dec 8, 2004, at 11:34 AM, Robert Miner wrote:
I saw a thread from last August on the status of MathML support, and am writing to inquire if there has been any activity since.
None, so far as I know.
Thanks Brion. That's what I figured.
As co-chair of the W3C Math Interest Group, an editor of the MathML spec, and one of the authors of the MathPlayer plug-in for Internet Explorer, I am interested in doing what I can to help.
There are two things to look at.
First, is the actual conversion to MathML; currently only a couple of very simple stub bits are supported, eg nothing where it would actually be useful. :) The TeX preparser which produces HTML and MathML output is written in ocaml which unfortunately is perhaps an impediment to wide hacking on it. Currently more functions are supported for HTML output than MathML simply because the work hasn't been done.
Apart from the ocaml thing, which is a bit of a challenge, this sounds reasonably straight forward.
Second, is producing appropriate output markup. The current system will embed the MathML code directly into the XHTML output. This works in Mozilla when the wiki is configured to send an application/xml+xhtml Content-type for pages, but not when using text/html (as is default because not all browsers support this and we can't currently guarantee well-formed markup at all times).
Right. This was the thrust of the August thread as well.
Does the MathPlayer work with directly embedded code, or does it require some sort of plug-in-style usage?
It works with directly embedded MathML.
Actually for this application, the situation is pretty good. MathPlayer sniffs all incoming documents with the application/xml+xhtml MIME type and looks for a DOCTYPE declaration mentioning MathML. If it finds it, it filters the incoming document, adding a declaration to the document header to load MathPlayer and bind it to the MathML namespace. Also, since IE doesn't display XML directly, it changes the MIME type back to text/html, which "tricks" IE into displaying the document as HTML.
In practical terms, what this means is a sloppy XHTML page with embedded MathML will generally display okay in IE. Of course it still crashes in Mozilla/Netscape/Firefox.
I take it there is currently no convenient content negotiate mechanism in MediaWiki so one could serve MathML embedded in (X)HTML to IE, and HTML with PNGs to other browsers? When MathPlayer is installed in IE, it modifies the user agent string so it is easy to detect.
--Robert
------------------------------------------------------------------ Dr. Robert Miner RobertM@dessci.com W3C Math Interest Group Co-Chair 651-223-2883 Design Science, Inc. "How Science Communicates" www.dessci.com ------------------------------------------------------------------