* About the "XML is evil, MathML is XML so MathML is evil" syllogism.

I don't think it makes sense in general to say that something is good or bad 
without mentioning for what purpose. I actually agree with Joshua that XML is a 
good format to work with for a computer engineer. There are very good libraries 
and tools to handle it and things like XML namespaces that are painful on the 
Web become very important for these tools. roc is right that the "catastrophic 
fail" is certainly not good for a Web model. Note however that most of the Web 
sites are automatically generated by server side programs and I often see 
MYSQL, PHP, CGI etc failures without hearing anyone saying they should come 
back to static pages. The HTML5 parsing rules allow to get concision and 
error-tolerance when you want to quickly write pages but this "tag-soup" 
approach also brings confusion in general and is just useless for programming. 
The inclusion of MathML inside HTML5 removed the XML burden that prevented 
people to use it on the Web or in emails where the default content 
 is text/html. Actually the syntactic difference has never been a problem for 
MathJax or WYSIWYG tools (working on a DOM-like tree) or for authoring tools 
like LaTeXML (that generates XML from LaTeX and then only uses XSLT stylesheets 
at the final step to convert to EPUB, XHTML or HTML5). Perhaps one of the best 
argument against the XML-haters is that Henri Sivonen's HTML5 validator is 
itself heavily based on XML tools like RELAX NG schemas or Java XML-related 
libraries.

* About the "MathML is too specialized".

Obviously I agree with what has been said before about math being in particular 
position. I personally see mathematical writing as language by itself and so 
not having it in the browsers is just like not supporting Arabic or Asian 
scripts (BTW MathML was implemented in Gecko a long time before HTML ruby). 
Just to add one point: mathematical expressions are also very often mixed with 
other content like text or diagrams and it makes sense to have 
HTML+SVG+MathML+CSS well integrated together.

* About the "TeX is already the universally adopted standard" and " TeX is very 
friendly to manual writing".

Again, people have already said that this is not true, at least not outside 
academia (I personally use TeX too as an input method but don't want to impose 
that to other people and I'm open to use other methods like handwritting 
recognition in the future). One of the most popular question on the MathJax 
list is of course "is there a WYSIWYG math editor?" Many people also like the 
ASCII-like syntax: (x^2 + y_1)/2. For example MathJax supports that syntax, 
Daniel Glazman has a plugins for BlueGriffon & Thunderbird and this is commonly 
used in Computer algebra systems. Some people say (cf jqMath or MathEL) that 
with tools to replace the traditional keyboard, entering Unicode characters 
becomes easy and so they generalize to a Unicode-based simple syntax where you 
write the actual symbol rather than commands like \Leftrightarrow. Even modern 
LaTeX environments support Unicode. Finally, people are also interested in 
handwritting recognition (see e.g. https://www.youtube.com/watch?v
 =26opB8DRf3c or http://webdemo.visionobjects.com/portal.html). 

* About the "TeX can be nearly trivially read aloud".

This is an assumption but the reallity is that math accessibility tools would 
need a parsing into an abstract representation at some point anyway. Just 
reading the plain text source naively is not enough for the two use cases I 
mentioned. There are already MathML-based tools showing that it is possible to 
use MathML.

* About "MathML never saw much traction outside of Mozilla"

If you are only talking about browser vendors then that's true. But Web users 
have requested MathML support for a long time (remember that the Web was 
created at the CERN for research purpose) and has been implemented in Gecko and 
Webkit by volunteers. MathJax is yet another community effort to bring math on 
the Web and was initially presented to me by Robert Miner as a "transition 
technology" towards MathML in browsers. At the last W3C workshop on ebook, 
everybody complained about the lack of MathML support in layout engines (Gecko 
being excluded de facto for now) and this leads to serious discussions inside 
the MathJax consortium about how we could help implementing MathML in browsers 
(hopefully the MathJax team will be able to say more about that later). Other 
people also indicate other domain where MathML is now used. BTW, you probably 
don't care either about that argument, but MathML is part of the OpenDocument 
OASIS/ISO/IEC standard used in OpenOffice and other office s
 oftware suite.

[digression: Mozilla people keep saying that competition is good. That was 
certainly true when Mozilla was fighting against Internet Explorer predominance 
and stagnation in Web innovation. But to be honest, it seems that what's 
happening now is that Google is leading the development and other actors are 
following. Webkit developments were mostly done by Google and it's not clear 
what Apple will do after Blink fork. Opera just gave up its rendering engine 
and joined the Blink effort. Mozilla claims to propose something different but 
there have been many pragmatic decisions recently that are against its own 
community and manifesto. Many excellent Mozilla projects are now abandoned by 
MoCo and left to volunteers. I don't want the MathML story to be another defeat 
against Google's monoculture]

* About the "cost to support MathML"

I think most of the changes done by Mozilla staff are normal code maintenance 
(removing PR_TRUE macros, changing C++ interface, moving files etc) as well as 
a few security fixes. The MathML code is relatively small and isolated so it's 
not a too serious effort. There were large code refactoring a couple of years 
ago, like roc moving some font code to the style system or Karl's remarkable 
work to make MathML support live again. All the new features and other bug 
fixes not in the previous categories have been made by volunteers. I've 
actually been mentoring dizains of new volunteers in the last few months and 
some are still active in Gecko or other Mozilla projects. The synergy with 
other MathML projects outside Mozilla was also very fruitful. I'm certainly 
biased but I would say it has been more a benefit for Mozilla than a burden to 
have MathML. 

* High-quality mathematical typography in browsers is now possible, without 
using MathML. Examples include MathJax or PDF.js

I only tried PDF.js once at the very beginning. It was really slow and the 
output was really bad (disclaimer: I tried with TeX-generated papers generated, 
I guess for simple PDF documents it is fine). I don't believe the future of Web 
content is PDF and I only see the PDF.js effort as a workaround for Adobe 
plugin rather than a real wish to bring PDF document to the Web. I agree with 
that we should encourage scientific and technical content on the Web and that's 
one of the goal of the MathJax project.

Regarding MathJax output, it is certainly far better than Safari native MathML 
support at the moment but I would say that Gecko's rendering is close, 
depending on the font available on your system 
(https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts). It's 
rather impressive that a Javascript-based approach with all the approximations 
(like rounding errors in measures, placements and hardcoded font metrics) is 
able to do better than native support but I would see that as an encouragement 
for browser vendors to do better than to just give up. Microsoft Office uses 
MathML (or at least a very similar XML format) and developed the Open Type Math 
Table extension, proving that you can get a good rendering from that too. 
Jonathan Kew's implementation of the Open Type Math Table in XeTeX and the same 
in LuaTeX proved that the TeX layout algorithm can be replaced by this method 
without losing in quality and can do better than PDF.js or MathJax. Currently 
Gecko's MathM
 L tries to emulate TeX's heuritics with very few knowlegde on the current font 
but I expect we could use the OpenType Math table in the future (Karl reported 
a related bug a long time ago). Also, MathJax TeX fonts are generated from the 
classical Computer Modern font. This means that we need an autotracer to 
convert from Knuth's metafont to Web fonts and this results in not so good 
quality depending on font size (at least, some MathJax's partners from the 
publishing industry complain). I think the future for the Web is to directly 
use math fonts that have been designed as Open Type fonts and many have 
Microsoft's Math table (STIX, Asana Math, Neo Euler, Gyre, Latin Modern, 
Cambria Math etc).

Without further details, the main issues with MathJax are:

1) Performance 
2) Dynamic Update (Javascript, reflow, repaint etc)
3) Integration with HTML/CSS/SVG
4) Font support

Some improvements could be done by providing Javascript APIs to give MathJax 
more information, especially to solve 4). However, I don't think the 
fundamental issues can be solved without proper MathML support. We have other 
ideas like using localStorage to cache the HTML-CSS output or trying to play on 
how many equations we insert at once, but I doubt we will never get the same 
performance as native MathML.

BTW, one of the most important source of complaints from MathJax users and 
partners at the moment seem to be incompatibility and conflicts with CSS and in 
general 3). It turns out that math on the web is very different to math on 
papers. With TeX, you're happy if you get a final black & white pdf, with a 
fixed layout inside page areas and user-defined size & line-breaking (you know 
the \\ and \Bigl commands). Web people not only want colors but also fonts, 
Unicode support, links, DOM & Javascript, inclusion in SVG diagrams and a 
rendering that is not "optimized for IE6 with screen resolution 1024x800". 
Actually they want compatibility with all the CSS effects like text-shadow, 
::selection, CSS animations or max-width (just to mention a few examples of 
recent feedback from MathJax users). So as roc said, in one way or the other 
what you want is a Web language with a DOM.

In my opinion the main improvement to do to MathML would be to make it even 
more close to CSS rather than trying to go back to the old TeX paradigm that is 
not appropriate at all for the Web. Some examples: <mstyle> (that just 
duplicates CSS in an incompatible and less powerful way), <mpadded 
width="2height"> (inspired from LaTeX but incompatible with the CSS box model) 
or <mphantom> (inspired from \phantom, but not very useful when you have 
"visibility: none"). I believe things like mfrac@linethickness, 
math@displaystyle, math@dir, MathML font properties that have been 
reimplemented by roc, or even parameters from the Open Type Math Table could 
become CSS properties. This would make the MathML layout more configurable and 
less random.

As a conclusion, I understand Benoit's concerns from a Web authors point of 
view. But really from my experience a solution like MathJax for a subset of 
LaTeX or alternative output like ASCIIMath + tools like LaTeXML for advanced 
and complicated TeX macros and processing is really satisfactory. WYSIWYG tools 
or handwritting recognition are maybe not widely available yet, but I expect 
the solution will be at a high abstraction level rather than just plain text.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to