While I have not tried yet to incorporate this in Moodle, I can demonstrate MathML rendering from within the WeBWorK electronic homework system for which I provide an interface in Moodle. To see this go to the following url:
and check the MathML radio button. Try it with Mozilla or with IE+MathPlayer, and look at the HTML source.
The question arises now if you plan to replace soon the mimeTeX filter by these scripts?
Still, we have the MathML and TeX plugins for now.
Also there is the public relations advantage of being able to brag that Moodle supports MathML.
With that scheme as I understood it, you couldn't copy MathML from anywhere, then paste it into a Moodle forum post, because the source code would actually need to be TeX. This means students would still have to learn TeX.
I'm not dissing the scripts, I'm just trying to point out small problems to help us think about solutions for this tricky client/server situation ... they are most likely surmountable. User preferences are a good idea that will help.
The nice thing about the scheme we hammered out for the TeX filter is that it "just works" in all browsers and HTML-email programs. I'm of course as keen as you to see MathML support in Moodle but it has to have the same sort of solidity for all sorts of viewer situations. I'd love to see a MathML->gif filter written 100% in PHP, for example.
It does not preclude later developing some other method of inputting MathML directly using, e.g. some equation editor addon to HTML Editor.
As far as I can tell there are at least three areas for formulas on webpages that can benefit from development.
Converting formulas to gifs is certainly the most portable, and has been used on the web for many years. The correct baseline positioning and sizing of the formulas is often difficult, and the printed output is less than perfect, but it ensures that the largest number of users can see the formulas. So it is desirable to keep such a solution as a default, and perhaps allow the user to switch to several other formats that her/his browser might support. MathML would be the recommended format, and the more it is used, the more likely it will be included in future releases of browsers or provided by plugins.
Wysiwyg seems to be what most beginning users prefer (i.e. formulas are constructed by clickinig on templates and symbols). But there are several drawbacks.
There are not many good freely available editors that work uniformly on different operating systems, and the resulting files are often nonportable. Many users prefer the editor they learn to use first, making it difficult to communicate with users of a different editor. It is unlikely that there will be a standard solution anytime soon.
If copied and pasted into email the formulas are seldom readable or familar to the user.
Text with many (small) formulas (e.g. most mathematical text where each variable is a formula) is cumbersome to type since it requires frequent switching between keyboard and pointer device.
So, ascii based formula languages are often a convenient alternative. Variants are part of most computer algebra systems and advanced calculators, but certainly (La)TeX is the most widely used.
Any such ascii language has to translate the 2D formula notation into a one-dimensional character stream, and come up with ways to code many different symbols. Currently Moodle provides an algebra and TeX filter, and there is discussion here to include another recent variant (ASCIIMathML) that partially overlaps both these languages. It would be a good idea to compare and contrast all three and see if there is some concensus that could result in a combined "standard". This would lead to less confusion on the users' side, but perhaps also to less flexibility.
3. Translating from input to output:
Advantages: complete control over server setup.
The user is sent a webpage that (hopefully) works correctly on the client.
Advantages: Less overhead for server.
Can also work offline.
Allows instant dynamic preview (possibly even as the formula is being typed).
I'm looking forward to reading about other users views on these issues.
I like ASCIIMathML a lot and I think it would be very nice to have
it included in Moodle - and it seems as if I am not alone :
(in case you havent already read this thread)
...if TeX is still required at the source level then what's the advantage converting into MathML?
I believe that many would still prefer entring math. expressions in TeX because (1) they know this syntax (2) it's imo a more comfortable syntax for authoring larger texts than MathML
Maybe a good alternative would be a php wysiwyg math editor (like mathtype) as I mentioned earlier today (see below).
For the php wysiwyg math editor I could maybe help although I am just starting with php (but I have some knowledge in other programming languages like Java, LabView/G, Pascal, js and (rudimentary) in C). But I like constructionism... Depends on your plans with this issue.
In my ideal world the raw, base format (to be actually stored in the database) would be normal MathML format. There could be various input methods (including TeX) that would convert to MathML, and various filters to transform the MathML into images or whatever is required to get them to work for each user.
There are already plenty of WYSIWYG MathML editors around (and they don't need to be built-in to the editor) that will produce MathML which can be pasted into Moodle, so this is not that urgent.
Now with all that said, I just took a look at Peter's AsciiMath page and I must say the shorthand format there looks pretty impressive as an input method, especially since the scripts also support TeX. However, the TeX support seems rather rudimentary.
It's difficult to see the best way forward - I've confused myself again. I'll go work on something else for a while.
It looks to me like this could be a good candidate the replace the algebra filter (especially if the database format became MathML). The algebra filter is very neat and I have students who use it a lot, but it does have limitations that come from its history as a Perl function evaluation translator, not an input layer filter. Did you notice AsciiMath has now been ported to PHP? http://www.jcphysics.com/ASCIIMath/index.php
Also, I think it could be a mistake to underestimate the value of better equation rendering that might come through MathML--especially as a PR tool.
Is there a way to create a pop-up screen like the "Use emoticons", that can be filled with teacher/admin selected material? My thought was that the screen could serve as kind of a palette/quickeys tool, where the graphic parts of maths could be listed and selected into non-html windows.
If this were possible, I would be interested in creating other kinds of palettes for the screens my teachers see (items that teachers might frequently use to respond to a student's assignment)...
Porting WebCT UQAM site to Moodle, I am asking:
"What happen to MathML since your 2004 comment?
Tex is always in Moodle but MathMl seems to have disappeared."
There is nothing in Moodle docs on MathML and nothing easy to find in forums.