Math notation issues

Math notation issues

by Marc Grober -
Number of replies: 3
Wanted to mention that there are ongoing issues with math notation in Moodle that are easily resolved but unaddressed. One has to do with the Tex filter throwing errors http://tracker.moodle.org/browse/MDLSITE-720 and another is issues with super/subscript http://tracker.moodle.org/browse/MDLSITE-681.

I continue to hope that someone will a) create a Moodle.org Math theme that is a copy of the current Moodle 2 theme with asciimathml reference added and b) add dragmath to moodle.org forum editor.
Average of ratings: -
In reply to Marc Grober

long division and polynomial division tex notation

by Marc Grober -
Speaking of Math Notation issues....

I note at
http://moodle.org/mod/forum/discuss.php?d=122388&parent=536833
that Moodle tex does not support long and polynomial division

I have not found any discussion of this issue but wanted to broach the matter here before I created a tracker item.....
In reply to Marc Grober

Re: long division and polynomial division tex notation

by Mauno Korpelainen -

Marc,

it's not actually missing support for long or polynomial division - in your example code \def is in the list of blacklisted tex tags - see function tex_sanitize_formula($texexp) in filter/tex/lib.php and

$tex_blacklist = array(
        'include','command','loop','repeat','open','toks','output',
        'input','catcode','name','^^',
        '\def','\edef','\gdef','\xdef',
        '\every','\errhelp','\errorstopmode','\scrollmode','\nonstopmode',
        '\batchmode','\read','\write','csname','\newhelp','\uppercase',
        '\lowercase','\relax','\aftergroup',
        '\afterassignment','\expandafter','\noexpand','\special',
        '\let', '\futurelet','\else','\fi','\chardef','\makeatletter','\afterground',
       '\noexpand','\line','\mathcode','\item','\section','\mbox','\declarerobustcommand'
    );

This is necessary here for security reasons... not meaning that all of these TeX tags are vulnerable but allowing free use of them may cause some "unexpected issues".