DragMath equation editor: Difference between revisions
John Isner (talk | contribs) |
John Isner (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
===Introduction=== | ===Introduction=== | ||
DragMath is an applet-based WYSIWYG equation editor created by Christoper Sangwin and Alexander Billingsley at the University of Birmingham as part of the [http://www.stack.bham.ac.uk STACK project]. DragMath allows students to build mathematical expressions in a traditional two-dimensional way using a graphical drag-and-drop interface. DragMath can output the finished expression in any of several computer-oriented linear syntaxes, including LaTeX. Since Moodle already supports LaTeX (with the TeX filter) LaTeX was used as the "bridge" for Moodle integration. | |||
DragMath | You can see a demo of the DragMath editor [http://web.mat.bham.ac.uk/C.J.Sangwin/dragmath/ here]. The DragMath interface is highly intuitive and anyone can be using it productively after a few minutes of trial-and-error. If you have questions about the editor, there is a short manual [http://web.mat.bham.ac.uk/C.J.Sangwin/dragmath/doc/index.html here]. | ||
===Integrating the DragMath editor with Moodle=== | |||
The DragMath editor does not come supplied with Moodle. You (or your administrator) will have to install it. | |||
DragMath is integrated with | DragMath is integrated with Moodle through a new button on the HTML editor toolbar. This way, the DragMath editor is available most everywhere that you or your students are called upon to enter text. | ||
Suppose that you're | Suppose that you're entering in the HTML editor and you reach a point where you want to insert a mathematical expression. Push the DragMath button to launch DragMath editor in a small popup window. Create the math expression in DragMath and click the "Insert button" when you're done. The editor will disappear and the LaTeX markup (with $$ delimiters added at both ends) will be inserted into your text at the current cursor position. | ||
===Installing Dragmath=== | ===Installing Dragmath=== | ||
Line 15: | Line 17: | ||
===Install the DragMath package=== | ===Install the DragMath package=== | ||
Download the latest DragMath zip file from [http://sourceforge.net/projects/dragmath sourceforge] and unzip it in the $CFG->dirroot/lib/editor/htmlarea/popups directory (where $CFG->dirroot is your "moodle" directory as defined in config.php). This will create a new directory under popups called DragMath containing all the necessary DragMath components. | Download the latest DragMath zip file from [http://sourceforge.net/projects/dragmath sourceforge] and unzip it in the <code>$CFG->dirroot/lib/editor/htmlarea/popups</code> directory (where <code>$CFG->dirroot<code> is your "moodle" directory as defined in config.php). This will create a new directory under <code>popups</code> called <code>DragMath</code> containing all the necessary DragMath components. | ||
===Install the DragMath Integration package=== | ===Install the DragMath Integration package=== | ||
Note: this will REPLACE the smiley button on the HTML editor toolbar with the DragMath editor button. It was done this way so as to keep the installation as simple as possible. If want to retain your smiley button, consult the postings in the [http://moodle.org/mod/forum/discuss.php?d=78683 Mathematical Tools forum] | Note: this will REPLACE the smiley button on the HTML editor toolbar with the DragMath editor button. It was done this way so as to keep the installation as simple as possible. If want to retain your smiley button, consult the postings in the [http://moodle.org/mod/forum/discuss.php?d=78683 Mathematical Tools forum] | ||
Download the latest DragMath integration package from the[http://moodle.org/mod/data/view.php?id=6009 modules and plugins database]. In the zip archive, you will find two files. | Download the latest DragMath integration package from the [http://moodle.org/mod/data/view.php?id=6009 modules and plugins database]. In the zip archive, you will find two files. | ||
* dlg_ins_smile.php -- Copy this file to | * <code>dlg_ins_smile.php</code> -- Copy this file to your <code>$CFG->dirroot/lib/editor/htmlarea/popups</code> directory, overwriting the existing file (you may want to make a copy of the original file before overwriting it) | ||
* icon_smile.gif -- Copy this file to | * <code>icon_smile.gif</code> -- Copy this file to your <code>$CFG->dirroot/lib/editor/htmlarea/images</code> directory, overwriting the existing file (you may want to make a copy of the original file before overwriting it) | ||
You must also change two lines in the file $CFG->dirroot/lib/editor/htmlarea/dialog.js | You must also change two lines in the file <code>$CFG->dirroot/lib/editor/htmlarea/dialog.js</code> | ||
* around line 34 you will see the line: | * around line 34 you will see the line: | ||
: case "dlg_ins_smile": x = 330; y = 320; break; | : <code>case "dlg_ins_smile": x = 330; y = 320; break;</code> | ||
Change this line to | Change this line to | ||
: case "dlg_ins_smile": x = 540; y = 340; break; | : <code>case "dlg_ins_smile": x = 540; y = 340; break;</code> | ||
* around line 47, you will see a line that begins | * around line 47, you will see a line that begins | ||
: var dlg = window.open(url, "ha_dialog", "toolbar=no, menubar=no, ... | : <code>var dlg = window.open(url, "ha_dialog", "toolbar=no, menubar=no, ...</code> | ||
Modify this line, changing | Modify this line, changing | ||
: resizable=no | : <code>resizable=no</code> | ||
to | to | ||
: resizable=yes | : <code>resizable=yes</code> | ||
Revision as of 04:57, 29 August 2007
Introduction
DragMath is an applet-based WYSIWYG equation editor created by Christoper Sangwin and Alexander Billingsley at the University of Birmingham as part of the STACK project. DragMath allows students to build mathematical expressions in a traditional two-dimensional way using a graphical drag-and-drop interface. DragMath can output the finished expression in any of several computer-oriented linear syntaxes, including LaTeX. Since Moodle already supports LaTeX (with the TeX filter) LaTeX was used as the "bridge" for Moodle integration.
You can see a demo of the DragMath editor here. The DragMath interface is highly intuitive and anyone can be using it productively after a few minutes of trial-and-error. If you have questions about the editor, there is a short manual here.
Integrating the DragMath editor with Moodle
The DragMath editor does not come supplied with Moodle. You (or your administrator) will have to install it.
DragMath is integrated with Moodle through a new button on the HTML editor toolbar. This way, the DragMath editor is available most everywhere that you or your students are called upon to enter text.
Suppose that you're entering in the HTML editor and you reach a point where you want to insert a mathematical expression. Push the DragMath button to launch DragMath editor in a small popup window. Create the math expression in DragMath and click the "Insert button" when you're done. The editor will disappear and the LaTeX markup (with $$ delimiters added at both ends) will be inserted into your text at the current cursor position.
Installing Dragmath
You install DragMath in two steps
- install the DragMath package
- install the DragMath Integration package
Install the DragMath package
Download the latest DragMath zip file from sourceforge and unzip it in the $CFG->dirroot/lib/editor/htmlarea/popups
directory (where $CFG->dirroot
is your "moodle" directory as defined in config.php). This will create a new directory under
popups
called DragMath
containing all the necessary DragMath components.
Install the DragMath Integration package
Note: this will REPLACE the smiley button on the HTML editor toolbar with the DragMath editor button. It was done this way so as to keep the installation as simple as possible. If want to retain your smiley button, consult the postings in the Mathematical Tools forum
Download the latest DragMath integration package from the modules and plugins database. In the zip archive, you will find two files.
dlg_ins_smile.php
-- Copy this file to your $CFG->dirroot/lib/editor/htmlarea/popups
directory, overwriting the existing file (you may want to make a copy of the original file before overwriting it)
icon_smile.gif
-- Copy this file to your $CFG->dirroot/lib/editor/htmlarea/images
directory, overwriting the existing file (you may want to make a copy of the original file before overwriting it)
You must also change two lines in the file $CFG->dirroot/lib/editor/htmlarea/dialog.js
- around line 34 you will see the line:
case "dlg_ins_smile": x = 330; y = 320; break;
Change this line to
case "dlg_ins_smile": x = 540; y = 340; break;
- around line 47, you will see a line that begins
var dlg = window.open(url, "ha_dialog", "toolbar=no, menubar=no, ...
Modify this line, changing
resizable=no
to
resizable=yes