I'm hoping to get some advice or perspectives so I don't overlook something. I'm looking to future-plan for math/equations in a mediawiki environment.
My understanding of an overview of the situation is something like this:
(I expect to keep my own library of standalone formulas and equations, adding them to wiki pages and editing and expanding my library over the years, and hopefully still being readable by whatever browser or viewer exists in 15+ years.)
The 2 main possibilities for me actually writing the markup for equations are (La)TeX or MathML.
In general: - MathML is supported natively by Firefox, and probably WebKit (Safari) eventually - TeX is not likely to be native supported, and will require some sort of conversion for (X)HTML environments
which looks like a win for MathML
However, _right_ now, TeX has better support in MediaWiki (for what I find odd reasons) The methods that work now are:
1. texvc - works, but generating bitmapped PNGs is suboptimal and not what I have in mind for the future in terms of scalable typesetting
2. MathJax (two sub-methods):
A. poorly documented, but the best method I have found is to edit LocalSettings.php and add a hook for BeforePageDisplay, to do an addScript() and add MathJax/MathJax.js {I say poorly documented because the MathJax instructions on http://www.mathjax.org/docs/1.1/platforms/ to add [script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config..."] "just before the /head tag in your theme file ... like skins/[current_skin].php" is terrible advice. Most novices are not going to know which is the current_theme file (probably MonoBook), and MonoBook.php does _not_ have a /head tag anywhere in the file!}
Using MathJax like this, one is forced to use TeX as the source (cannot use MathML), but MathJax can emit/convert to either HTML-CSS, or can emit MathML for native rendering in Firefox, which works very nicely
B. Extension:MathJax (http://www.mediawiki.org/wiki/Extension:MathJax) is nicely documented and works, but only accepts source as TeX, and only emits HTML-CSS as output, MathML output is not an option
The common thread is that all these methods work with TeX as input source for the formulas, and only TeX. MathML as the input seems to be disapproved, and difficult: MathJax can't work on MathML input since all the XML element/tag structure the < and > all get sanitized in wiki PHP output to < and > I somewhat grasp that this is at least partially due to concerns about XML markup within wiki content - similar to the concerns expressed in the warnings for Extension:Inline_SVG (http://www.mediawiki.org/wiki/Extension:Inline_SVG).
Yet, mediawiki and MathJax is easily configured to have as final rendered output MathML.
Am I the only one who finds this odd - that I can't write MathML input, but yet mediawiki and MathJax are moving with browsers to having MathML as the rendered output?
This seems like a waste - I have to worry writing nice TeX, then worry about how it is converted by MathJax to MathML, and any possible bugs in that conversion process - when I could just write MathML and have only to worry about how Firefox renders it.
What advice do people have about a "good way" (simple, future compatible, least likely to break with converters) to deal with math/equations in mediawiki?
Thank you in advance for your thoughts and insight.
mediawiki-l@lists.wikimedia.org