Application Note
Using MathType with Moodle
"Moodle is a free learning management system that enables you to
create powerful, flexible, and engaging online learning experiences."1
You've seen how much easier your life is with Moodle. What if I said you could
take that quiz you wrote last year in Microsoft Word, and you can reuse the
equations in Moodle without having to re-type them? Did you know you can use
MathType equations in a Moodle forum or chat? What about the reverse? You can
copy an equation from a colleague's Moodle course, paste it into MathType, and
use it in PowerPoint. This article will show you how to do all of that, and
more. Let's get started...
This AppNote addresses the following topics:
- Using MathType with Moodle filters, plug-ins, and
other add-ons
- Using MathType equations in Moodle
- Copying Moodle equations to use in MathType
- Creating GIFs with MathType to use in Moodle
- Uploading a MathPage document to Moodle
Getting started
This document assumes you already have a Moodle account. If you have an
account but are new to Moodle, refer to the
Moodle documentation for help in
getting started, and for additional resources that may prove helpful.
Using MathType with Moodle filters, plug-ins, and
other add-ons
If you're using MathType 5 or later (Windows or Macintosh), you can choose
from 3 Moodle filters that will let you copy your MathType equation as either TeX or
MathML, then paste it into Moodle. If you're using MathType 6 for Windows, you
can choose from 4 filters that will let you or your students copy equations
from your Moodle course and paste them into MathType to use as you would any
other MathType equation. The following table summarizes the capabilities of five
Moodle filters (links to more information about the filter will open in a new
window):
Regardless of which filter you choose to use, it must be enabled by an administrator
before following the steps in the next two sections. In this AppNote we'll be
using the TeX filter. Procedures for using MathType with other filters will be
similar, but may differ slightly. A little trial and error will normally be all
you'll need, but if you still have trouble, refer to the filter's documentation
or the Moodle Community
for more help (login required).
Using MathType equations in Moodle
If you have MathType equations in existing documents or presentations and
you'd like to use these in a Moodle course, or if you want to create a new
equation to use in Moodle, follow these steps:
- Open the equation in MathType, or create it if it doesn't already exist.
If you're not familiar with opening MathType except from within Word or
PowerPoint, it's a simple matter. In Windows, click
Start > All Programs > MathType [#] > MathType. On Macintosh OS X, it's
Applications > MathType [#] > MathType.
- Choose an appropriate translator from Preferences > Translators. The
"TeX -- LaTeX 2.09 and later" translator is probably the best choice. Click
OK.

- Select the entire equation by dragging the mouse across it or with the
shortcut Ctrl+A (Macintosh: Command+A). If you want to use only part of the
equation in the MathType workspace, select only the part you want.
- If the equation is to be an "inline equation" (i.e., part of a
sentence), make sure the Inline Equation flag is set in the Format menu.
(In the Format menu, there should be a checkmark to the left of "Inline
Equation".) If the equation is to be a
"display equation" (i.e., in its own paragraph), make sure there is not a
checkmark to the left of Inline Equation.
Note: If you're
using Moodle's built-in TeX Filter, all of your equations must use the TeX display
equation delimiters, so make sure there's not a checkmark next to
"inline equation". Moodle's TeX Filter does not recognize the
TeX delimiters for inline equations, but unless you physically place the
equation in a paragraph of its own, it will appear as an inline
equation.
- Copy the equation or equation fragment with the Edit > Copy command or
the shortcut Ctrl+C (Macintosh: Command+C). If there were no errors during
translation, MathType will display a Status Bar message that looks like
this:

In rare cases, you may get an error message to the effect
that there is "No translation available for [name of symbol]". The most
common instance of this error is after using one of the expanding integral templates, which you
can create in MathType by depressing the Shift key as you choose any integral from the
"Integral templates" palette. If you have used expanding integral templates,
you'll need to replace them with non-expanding integrals before you
translate the equations to LaTeX.

- Click in the Moodle Resource or Activity where you want the
equation to appear, then paste the equation (Windows: Right-click > Paste,
or Ctrl+V. Macintosh: Ctrl-click > Paste, or Command+V). Note:
If you're using the HTML Editor, it's important that you click on the
"Toggle HTML Source" icon 〈 〉, and paste the equation into
the HTML source.

The "built-up" equation won't appear until you click the "Save changes"
button, the "Post to forum" button, or other appropriate button in Moodle.

- Note that this will not work with all Moodle math filters. Refer to the
table above.
Copying Moodle equations to use in MathType
If you have an equation in your own course, or if you or your students find
an equation in another course that you want to use in another document or
presentation outside of Moodle, it's possible to do that by using MathType. Not
all filters have this capability though, and not all versions of MathType. You
must be using MathType 6 in order for this to work.
- The key to making this work is for the equation image in Moodle
to have what's known as "alt text", and for that alt text to be TeX or
LaTeX. In some browsers, you can hover the mouse pointer over an equation,
and the alt text will be visible in a pop-up display:

If you see that the alt text is present, the following steps will allow
you to use the equation in MathType, just as you would any MathType
equation. If you don't see the alt text though, it doesn't mean it
isn't there. It might mean simply that your browser isn't showing it. It's still
worth a try to see if these steps will work.
- Select the equation by dragging the mouse pointer across it:

- Copy the equation to the clipboard either with the Edit > Copy command,
or with the Ctrl+C shortcut (Macintosh: Command+C). Don't use the
right-click (Macintosh: Ctrl+click) contextual menu to choose the "Copy
Image" or "Copy Picture" command, because doing so won't work. If the
contextual menu for your browser has a "Copy" command, you can use this
command if you want.
- Open MathType and paste the equation into the MathType workspace, either
with the Edit > Paste command or with the shortcut. The
equation is now a MathType equation that you can edit and use just like any
other MathType equation.
The procedures above aren't specific to Moodle. In fact, any time you find a
web page that has TeX or LaTeX alt text in the equations, you can use the
equations in MathType by following the steps above. We can't provide an
exhaustive list of such websites here, but these websites will work:
Wikipedia,
PlanetMath, and some
math blogs (such as
The Unapologetic Mathematician,
Terry Tao's Math Blog,
and The Math Less
Traveled).
Creating GIFs with MathType to use in Moodle
MathType allows you to save your equations in various graphics formats, but
the most appropriate of these formats for web use is GIF. The process of
actually creating GIFs from MathType equations is fairly straightforward. If
you're unsure how to do this, refer to the MathType documentation. There are a
few user-changeable
options in MathType's "Web and GIF Preferences" dialog, accessible via the
Preferences menu, but you should normally leave all of these settings at their
default values. Two considerations are anti-aliasing and bitmap resolution.
Anti-aliasing
If you're using "normal-sized" equations, one setting you specifically should not change is the checkbox labeled
"Smooth edges (anti-aliasing)". Turning on this setting will produce equation
images that are fuzzier than they would be without anti-aliasing. The value of
anti-aliasing is in using it with large font sizes, normally 18pt and above.
Here you can see a comparison of normal- and large-sized equations with and without
anti-aliasing:
| |
12pt |
24pt |
without
anti-aliasing |
 |
 |
with
anti-aliasing |
 |
 |
Bitmap resolution
This is another setting that's best left at the default setting under normal
conditions. An exception would be if you're creating a Moodle resource or
activity that you want your students to print for reference, to bring to class,
to complete and turn in, etc. With the equations at the default setting of 96 or
72dpi, the print quality will be poor.
You'll have better results by using a bitmap resolution of 300 or higher. The
tradeoff is that the high-resolution images print better, but their display
quality is much worse. Here
you can see examples of 96 and 384dpi equations as they would appear on-screen;
print them out and compare what they look like when printed:
| 96 dpi |
 |
| 384 dpi |
 |
Tip: If you use a resolution of 384 (Macintosh: 288), you'll be
able to divide height and width by 4 to arrive at the correct size for the image.
A convenient time to adjust the size is after you've uploaded the equation image and while Moodle's Insert Image dialog is
still visible. Note in the Insert Image dialog below, there is LaTeX "alt text".
This step isn't automatic. If you want to include the alt text, you need to
insert it yourself. One of the reasons to use alt text is explained
above, but using alt text is also important for
sight-impaired individuals accessing the page with screen reading software.
The screen reader will either read aloud whatever's in the alt text, or it
will skip over the image.

To summarize: use the default resolution when print quality isn't important, and
increase the resolution to 300 or above when print quality is important. In the
event where both display quality and print quality are important, you should
decide if one is more important and go with that. If they're equally
important, you're probably better off leaving this setting at its default value.
Note that it is possible to have it both ways. In other words, it's
possible to include two separate GIFs -- one that will display on the student's
monitor and one that will be used for printing. Using this technique will
require using CSS, and will require two separate style sheets. Instructions in
how to do this are beyond the scope of this article.
Inserting a GIF when not using the HTML editor
With Moodle items that provide only a text box, or if there are other reasons
you're not using Moodle's HTML editor, you can still use a GIF if you want, but you'll need to insert the
<IMG> tag yourself. This is really much more trouble than
it's worth, and you're better off using the built-in TeX filter, pasting the TeX
into the text box. For this reason, we don't provide instructions here in how to
use GIFs with text boxes in Moodle.
Uploading a MathPage document to Moodle
MathType includes MathPage™ technology that easily converts Microsoft Word
documents into web pages, properly handling mathematical symbols as well as
MathType and Equation Editor equations. See the MathType documentation if you
are unfamiliar with the process of creating a MathPage.
When you create your MathPage, you have a choice of whether to use GIF images
or MathML to display the math. Although either of these methods will work with
Moodle, we recommend the MathML option, and this is the option we'll cover here. If you are not familiar with MathML, refer to our
article MathML for Math
and Science Communication. Please note that your students' browsers are
likely to be MathML-capable, but not all browsers are. Specifically, the Safari
browser is not capable of displaying MathML. In addition, Microsoft Internet
Explorer (IE) is not capable of displaying MathML on its own. In order to
display MathML in IE 6 or later, you'll need a free Design Science product:
MathPlayer. All Mozilla browsers
are MathML-capable without special add-ons. This includes Firefox, Camino, and
SeaMonkey.
There are just a few steps involved in creating a MathPage and uploading it
to Moodle:
- Create the document in Word and when it's complete, save it.
- Click the Publish to MathPage icon in the Publish group on the MathType
tab in Word 2007's Ribbon. In earlier versions of Word, the Publish to
MathPage icon is near the far right of the MathType toolbar, as well as in
Word's MathType menu.

- In the Publish to MathPage dialog, you can leave most of the settings at
their default values. The Title is optional, and is what will show in
the title bar of the browser when the page is displayed. The File Name
section is important, not so much because of the name itself, but because of
the path. This is where the file will be saved on your computer, so it'll be
important when it comes time to find the file and upload it to Moodle. Be
sure not to change the file name extension. In the example below, the
extension is xht, and yours should change to xht after the next step.
The one default value you'll need to change is in the Equations
section. The default is to use images, but you'll want to select MathML
using, and make sure you choose the XHTML+MathML in the drop-down
list. Verify the file name extension is xht, and click OK.

- You can now upload the MathPage to Moodle, either as a Resource or as an
Assignment.
Feedback
If you find this AppNote useful, and would like to see better
integration between MathType and other applications, please send us your comments at
feedback@dessci.com.
Reference
1. Rice, W. H. (2006).
Moodle: E-Learning Course Development. Birmingham, UK: Packt Publishing.
|