Please help test the MathML filter

Please help test the MathML filter

by Zbigniew Fiedorowicz -
Number of replies: 6

Please help test the MathML filter by connecting to the following URL: https://webwork2.math.ohio-state.edu/moodle1_2d/mod/forum/view.php?id=5&username=guest. You will automatically be logged in as a special guest user with posting privileges.

Please copy and paste MathML from whatever sources you like.  I am sure that a lot of bugs will turn up.  Also please note that the HTML Editor is turned OFF for that account, since it is currently incompatible with MathML tags. Please use HTML Format to post.

Average of ratings: -
In reply to Zbigniew Fiedorowicz

Re: Please help test the MathML filter

by Bruno Vernier -
finally, I got the mathml filter to work. Here are my working notes:

1. changed executable path from /usr/local/bin/Xalan to
/usr/bin/xalan (since I use debian package xalan) ...
looks like this needs its own config variable at the top

2. changed path for location of filter (already at the top, but not as a clearly labelled config option)

3. had to make the 6 include paths in mmltex.xsl relative to current directory ... maybe this is because debian xalan behaves differently from your Xalan

4. cannot use ± this one is not currently in the list of entities you have already included smile

I noticed that mimetex.cgi can be compiled to do xbitmap instead of gif ... this might be the best solution for me until june 2004

Thanks for your great work and sorry i ran out of time to make the patches here and send them to you


General note (for future reference): this filter takes MATHML notation and converts into TeX notation with Xalan (using XSL) and then converts TeX notation into gif or xbitmap with a GPL C program called mimetex.cgi (it does one job well in the unix tradition)
In reply to Zbigniew Fiedorowicz

Re: Please help test the MathML filter

by Zbigniew Fiedorowicz -

To whomever was testing the MathML filter on my site last night:

The reason that your expression cos(pi)=-1 failed to display through my filter, is that whatever software you are using to produce MathML is broken.  It is using the character &#150 to represent the minus sign on the right side of the equation.  This character only displays as a minus sign in the Times New Roman and Arial fonts (not in Courier)  in MS-windows - it is not proper MathML. When I fix the minus sign, your expression does display properly under my filter.

In reply to Zbigniew Fiedorowicz

Re: Please help test the MathML filter

by Zbigniew Fiedorowicz -
I've improved the MathML filter. It now recognizes over 100 additional character entities (math. symbols). Also some error checking and error messages are provided. The changed files mathml.php and entities.xsl are attached. Here's a link to a page on my system which involves processing quite a lot of MathML:
https://webwork2.math.ohio-state.edu/moodle1_2d/mod/forum/discuss.php?d=10&username=guest
Average of ratings: Useful (1)
In reply to Zbigniew Fiedorowicz

Re: Please help test the MathML filter

by Bruno Vernier -
Thanks Zig for your work. I made a couple changes to accomodate debian environments in the attached file

it works fine on my system with the above patch and by removing the relative path for mmltex.xsl

perhaps you could test executing within the filter directory (as per the patch attached), to see if you can also use relative paths for mmltex.xsl and thus avoid the need for people to modify that XSL file.

Also I think the filter is ready for a copyright statement smile (i put in a stub for you)

BTW, some trivia: while testing your filter, I came across at least three variants of the plus and minus entity! pm, PlusMinus and plusmn!!




In reply to Zbigniew Fiedorowicz

Re: Please help test the MathML filter

by Zbigniew Fiedorowicz -
Somebody else posted a bunch of Javascript (which perhaps was meant to output MathML).  This will not work in forum postings, as Moodle does not allow Javascript in forum postings (or any place that students can enter input). Javascript in such areas would pose a serious security threat.