TeX and DragMath

TeX and DragMath

by James Walker -
Number of replies: 7
I installed DragMath but I am not getting the DragMath icon in the editor toolbar. When I look at the Tex filter notation I see the following

Path of latex binaryfilter_tex_pathlatex
Default: /usr/bin/latex
Path of dvips binaryfilter_tex_pathdvips

Default: /usr/bin/dvips
Path of convert binaryfilter_tex_pathconvert
Default: /usr/bin/convert

The path of latex and the path of dvips are not working. I believe that to get DragMath to work Tex has to be working.
How do I get Tex to install correctly?


Attachment TeX.gif
Average of ratings: -
In reply to James Walker

Re: TeX and DragMath

by Mauno Korpelainen -

Hi James,

in moodle 1.9 Dragmath does not require enabled and functional TeX filter - usually the missing icon is caused by cache and when you refresh your browser icon pops up to editor toolbar. If not files might be in wrong place or some other script or error in code might prevent icon to appear. In moodle 2.0 Dragmath will be by default disabled unless TeX filter is on.

Did you download the latest version from http://moodle.org/mod/data/view.php?d=13&rid=1454&filter=1 ?

(read also documentation in http://docs.moodle.org/en/DragMath_equation_editor )

Mathematics Tools forum http://moodle.org/mod/forum/view.php?id=752 has some similar cases and if you find the those binaries (correct paths for latex and dvips executables depending on your distribution of Latex and operating system) TeX might start working - otherwise moodle will try to use mimetex (executable) from folder filter/tex.

Check first that there are no SPACES after

/usr/bin/latex

and

/usr/bin/dvips

In reply to Mauno Korpelainen

Re: TeX and DragMath

by James Walker -
Thanks for the quick reply. I installed the latest DragMath in the Moodle root folder and unziped all the files are seem to have been placed in lib/DragMath. I printed out the unzip info and one line says
replace lib/editor/htmlarea/dialog.js [y]es, [n]o, [A]ll, [N]one, [r]emane: NULL (assuming [N]one
I have two Moodle accounts on a hosted server one I installed myself and is using 1.9 the other I used CPanel Fantastico to installed 1.9.4. I have tried to get DragMath working on both and no luck so far. I am building a geometry course I hope to be using in the fall in a high school and DragMath looks like it would be very useful.
In reply to James Walker

Re: TeX and DragMath

by Mauno Korpelainen -

It sounds like files from lib/editor folder were not replaced with the files from this package - if your unzip command has default value [N]one selected. Unzip command should overwrite all existing files (or you should choose [A] if it is asked )..

In moodle 1.9 core files lib/editor/htmlarea/htmlarea.php and lib/editor/htmlarea/dialog.js should be replaced with the modified files of Dragmath package and if you upgrade moodle you will need to upgrade DragMath as well or these files will get overwritten.

In reply to Mauno Korpelainen

Re: TeX and DragMath

by James Walker -
Dragmath is working now. I FTPed the image files and made sure to over write. Only one problem remains. I get an error message Missing data in language file. This does not seem to interfere with DragMath working. I FTPed the language files still get the error message.

Thanks again for you help.
In reply to James Walker

Re: TeX and DragMath

by Mauno Korpelainen -

There seems to be a tiny "bug" in lib/editor/htmlarea/popups/dlg_ins_dragmath.php and line 25:

    if (!file_exists("$CFG->dirroot/lib/dragmath/applet/lang/$drlang.xml")) {
        $drlang = 'en';
    }

should be

    if (!file_exists("$CFG->dirroot/lib/DragMath/applet/lang/$drlang.xml")) {
        $drlang = 'en';
    }

because Dragmath is in folder named DragMath and not dragmath.

Marc, can you fix this to your latest files?

In reply to Mauno Korpelainen

Re: TeX and DragMath

by Marc Grober -
Lol; I thought I caught all caps issues but this one got away... Will get it fixed and apologies for any frustrations. There a few links to alter so it will be fixed by this weekend
In reply to James Walker

Re: TeX and DragMath

by Marc Grober -
Looks like you had a previous version installed. Did you answer all so that all files were overwritten with current version?

As Mauno mentioned, dragmath is a tool to render text expressions for equations; it will with with or without Tex as it's function is just to create the text expression.

You must fix your latex install if you want to use Tex to display Tex text expressions, or install asciimath or jsmath.