Re: Mozilla mathml project to be interred
Frédéric Wang <[email protected]> Mon, 05 Oct 2009 22:58:52 +0200
| Newsgroups | gmane.comp.mozilla.devel.mathml |
|---|---|
| Message-ID | <[email protected]> |
I'm not really a fan of the use of scripts to convert row text into MathML. This assumes that any program reading the formula has javascript/DOM capability and can build the MathML DOM tree. But for example, this may not be the case for other non-browser rendering engines or for search engines [1]. In general techniques that do not give access to MathML source (such that the construction of SVG formulae proposed by the moodle guy) should be avoided, in my opinion: they prevent all of what MathML is intended for (apart from giving a good rendering). I think the right thing to do is to make the conversion *before* serving the page, such as in [2] or as Blahtex does. Of course, I would really be happy if Wikipedia uses ASCIIMathML to replace png images. However it seems the main difficulty here is to make core developers of MediaWiki integrate a new extension. About mixing formulas & graphics, the W3C has not specified entirely how this should be done, even if MathML & SVG specs and note [3] give some hints. The inclusion of a formula inside a graphics should be reflected by the DOM structure: the MathML tree should be a subtree of the SVG one. Hence the use of a <foreignObject/> to put MathML inside SVG (again, see [2]) is better than using overlapped CSS <div/>'s. For instance, it is expected than a copy&paste of the <svg/> also acts on the formula and this is straightforward when <foreignObject/> is used. Another example, for people who have Amaya or a SMIL-enabled build of Mozilla: a formula *really* included inside SVG can be transformed and/or animated [4]. Back to the chicken or the egg dilemma, I think that implementers should take the first step and propose as much features of the Spec as possible. People do want to use formulas on the Web and if the current implementations are not sufficient, they are unfortunately going to use workarounds such that png/svg images or javascript-generated MathML DOM + CSS. Thanks to the switch to Cairo and Karl's work, MathML-in-SVG is now possible in Mozilla. Allowing MathML/SVG in HTML is another step forward, since it seems that the current requirement that a document must be served as XML is one of the main limitation for users. Finally, another improvement in Mozilla that has not been previously given: Thunderbird is now built with MathML support [5]. [1] http://search.mathweb.org/index.xhtml [2] http://golem.ph.utexas.edu/instiki/show/Sandbox [3] http://www.w3.org/Math/Documents/Notes/graphics.xml [4] http://www.maths-informatique-jeux.com/international/mathml_with_other_standards/mathml_svg.xml [5] https://bugzilla.mozilla.org/show_bug.cgi?id=456014