My organisation needs to update its website, which, in particular, will host a number of blogs and wikis on mathematics-related themes. We need to use some way of rendering of LaTeX on our web pages. Given a choice of MathJax and MathML, which one would you recommend? Any other solutions?
|
"It seems that to use MathML, I ("hypothetical I") need to use a Ruby program called iTeX, w" There seem to be some very confused descriptions of MathML, which doesn't require itex or ruby or any server side configuration at all. You cant really compare mathjax and mathml as they are different things, mathjax is a an implementation of a client side parser for both a tex-like syntax and mathml then (which ever input syntax is used for input) it can use various rendering methods including native mathml in the browser (including IE+MathPlayer, or recent webkit builds, not just firefox) or it can use css rendering. Currently, if you don't want to use some javascript such as mathjax (or the simpler, less ambitious asciimathml) then you do need to serve the files as well formed xhtml (not necessarily valid xhtml, despite the comment above) however this is changing, mathml parsing is built into html5 so firefox 4 (beta) for example will render mathml in an html page not just xhtml. So going forward a year or two one would expect html+mathml pages to not require any javascript or server side support at all. whereas a tex like syntax (like a wiki) will always require some additional javascript or server processing. whether you want to use a linear tex-like syntax or the xml/html syntax of mathml is pretty much a matter of choice, it is exactly analogous to a choice of whether to use a linear wiki style markup for your web pages, or to directly code (or generate) html markup. Sometimes one is more appropriate than the other, many sites use both wiki and traditional html markup, depending on the context. David (co editor of mathml2 and 3, and before that co-developer of latex2e, and before that a long time association with the Mathematics department at Manchester, and still an LMS member should you want any discussion offline at any stage about mathml, I'm easy enough to find:-) |
|||||||
|
|
I would recommend MathJax. MathJax has the ability to be configured to use native MathML rendering when available in a browser, and only fall back to HTML-CSS mode when native rendering is not available. This way you get the best part of both worlds. (One limitation of MathJax is that fonts tend to load slowly. However, once they are cached in the browser the display is very quick). |
|||||||||||
|
|
This question is similar to Embedding LaTeX equations into a webpage and I think that my arguments for MathML there are pretty strong. I can also now add a couple of extra things since MathOverflow uses MathJaX so I've some direct experience.
I've decided to interpret the "Any other solutions" as a request for implementations. I don't think this is the place for a full list, but just to let you know that on the server side, there is MathML-capable software for all the usual things:
|
|||||||||||||||||||
|
|
I am involved with the MathJax project and, IMHO, David Carlisle has the best explanation on this thread (as usual). All I can add is that MathJax is only just at 1.0 and has not received all the performance tuning it will eventually get. Of course, that is not to be interpreted as a promise that it will be faster in some specific browser or in all browsers. Just the other day, I noticed it was excruciatingly slow on my HTC Evo. A bug was swatted and now it is an order of magnitude faster, though it still has room for improvement. MathJax will also gain from the JavaScript engine speed wars currently being waged between all the browser vendors. Internet Explorer is particularly slow but IE9 promises to be much faster. Paul |
|||
|
|
|
|
|||
|
|
|
A 'quick and dirty' way is to use google's chart api: http://ardoris.wordpress.com/2010/06/27/converting-inline-latex-to-images-with-javascript-and-google-chart-api/ |
|||
|
|
You might want to look at using SVG on the web page, with dvisgm to generate the SVG, and Google's svgweb for IE prior to version 9. |
|||
|
|
mathjax. Does anyone know how I might installmathjaxlocally on my windows XP machine? – user4650 Apr 5 '11 at 8:22