Dragmath

Dragmath

by Wen Jie -
Number of replies: 7
hi, im having issue using dragmath. upon adding the math equation, i get strange characters. does it got to do with xmlrpc?? my php did not have xmlrpc installed.
Average of ratings: -
In reply to Wen Jie

Re: Dragmath

by Ian Wild -
Picture of Plugin developers
Hi Wen,

What strange characters are you getting? Do you mean DragMath is generating strange characters or when Moodle tries to convert DragMath's output to math notation it displays strange characters instead of math?

By the way: xmlrpc is used in Moodle networking ('rpc' stands for remote procedure call).

Cheers,

Ian.
In reply to Wen Jie

Re: Dragmath

by Marc Grober -
While DragMath uses xml files for its conversion tables, it does not use xmlrpc, which as Ian mentions is only used for Moodle networking.

There are a number of places that you could be speaking of (i.e. strange characters in the DragMath interface, as inserted in your editor, or as seen after you save in the editor and display. If you could zip up a set of three screen captures at each stage that would be helpful.

Also, display can be effected by a number of different variables depending how you are doing display and in what format you are inserting the constructed equation. For example, if you are using DragMath to insert asciimathml vs MoodleTex, as asciimathml will try and render using MathML which relies on local fonts. Check your browser as well to determine how it is encoding (i.e. UTF-8?)

This is another reason why it would be helpful to have the4se math display and construction technology available in Moodle docs and forums..... please vote to support those efforts, as well as the initiative to put these in Moodle core!
In reply to Marc Grober

Re: Dragmath

by Wen Jie -
hi, pls see attachment. input.gif is when we key in the formula and output.gif is the result after inserting.

according to the installation documentation (http://docs.moodle.org/en/DragMath_equation_editor ), it is suppose to look that way (out.gif). but i would like it to make it look just as it is in input.gif after inserting.

-installation of asciimathml is done
-enabled Tex notation and algebra notation from moodle.

tks


In reply to Wen Jie

Re: Dragmath

by Mauno Korpelainen -

That's exactly what it should look like. Those doubledollars are needed for tex filter to render equations and you should just make sure that tex itself is working on your site (some distribution of latex is installed and correct paths set up to tex filter administration or executable mimetex file has correct permissions to produce gif image from the code that TeX filter translates). If you want to add equations using asciimathml try delimiters `...` and asciimathml will convert the equation to mathml or image fallback.

Htmlarea can't render TeX WYSIWYG.

In reply to Wen Jie

Re: Dragmath

by Mauno Korpelainen -

You could also disable algebra filter. If your site does not render any TeX start debugging for example from http://moodle.org/mod/forum/discuss.php?d=113071

There are a few possible reasons why TeX filter does not always render images.

AsciiMathML is using javascript to produce either MathML for browsers that support MathML or image fallback for those browsers that do not support MathML - if you have a script that has image fallback and if that script has correct renderer path for those images - for example some public mimetex server. You should not use AsciiMathML as filter - the old files had some conflicts with other code - the better way is to add to your theme meta.php for example tags like

<script type="text/javascript" src="<?php echo $CFG->httpswwwroot ?>/lib/editor/common/AsciiMathML.js"></script>
<script type="text/javascript">
var AMTcgiloc = "http://someserver/cgi-bin/mimetex.cgi";
</script>

supposing you have a script called AsciiMathML.js (name can be different) in folder lib/editor/common/AsciiMathML.js and http://someserver/cgi-bin/mimetex.cgi is used to render image fallback.

In reply to Mauno Korpelainen

Re: Dragmath

by Wen Jie -
thanks alot guys. your help was really useful. managed to solve the problem. =)
In reply to Wen Jie

Re: Dragmath

by Marc Grober -
Wen,

Please note that I posted a new dragmath zip that includes the ability to eliminate the implied dot in multiplication.

Also remember that dragmath can export in a number of different formats.... you can export in MoodleTex (the previous default) which produces Tex delimited by dollar signs, in asciimath (which produces asciimath notation delimited by backticks) as well as others and is extensible using the xml files along the lines of the xml files that are included in the distribution.

You can also edit the existing xml files. for example, if you wanted to use dragmath tpo produce equations tagged with <math>...</math> or amath...endamath you can change the existing tokens (for example, you can create a new xml file with different tokens, and then add that xml file to the list of files in the dragmath config file.....)