Equations in Moodle

User guide to creating and using equations in Moodle with latex and a visual equation builder

Working with equations in Moodle

Currently there are two different ways of creating and editing "pretty" equations in Moodle.  The first way is to use the language known as LaTeX, and the second is to use a visual equation editor (Wiris equation editor) to create them.  This document addresses these two ways of creating equations in Moodle.  

Latex equation building

LaTeX is a typesetting system designed for the production of technical and scientific documentation.  Although it can be used for more than just writing equations within Moodle, this document will focus on that part.  To find out more about LaTeX, please visit here.

LaTeX content in Moodle is processed by a Moodle "filter".  This filter converts the LaTeX code into an image that is a "human readable" format.  In Moodle, LaTeX content must start and end with two dollar signs, e.g.:


  • An example of using LaTeX in Moodle is creating a label for a Moodle course that adds text to the topic or week section.  
  • There is no editor that you need to use to enter LaTeX, you simply just add it to what you are editing.  
  • The picture below demonstrates this.  (Note that the LaTeX is encapsulated with two dollar signs on either side)

Latex editor

  • Once entered, you can save what you are working on, such as the label we were working on above.  When displayed on the Moodle page, the Moodle filter will automatically create an image representation of the equation to view.  The image representations are also clickable for students to see the original LaTeX entered.  For an example see the image.


Return to the top

Wiris visual equation editor

The math editor plugin is a 3rd party tool made by Wiris.  We are replacing the dragmath plugin with Wiris because dragmath requires Java to be enabled in the user's browser.  Due to the limitations of mobile browsers and the many recent security issues with Java, it's no longer available in a lot of browsers.  This makes the dragmath tool unusable in many cases.  The Wiris plugin uses HTML5 and javascript so Java is not needed.  (Javascript is different than Java, and will be available in most browsers.)  This plugin appears in any Moodle text area that uses the HTML editor.

  • As an example of how to use this editor we will be creating a Moodle course label resource.  
  • When on the page to add a new label, click on a yellow/orange square root icon in the TinyMCE editor as shown below.  
  • Please be sure to have your pop-up blocker off to use this editor as it opens the editor in a pop-up window.

Wiris editor

  • After clicking on the icon, a pop-up window opens that contains the visual equation editor.  
  • From here you can add any equation using the available pallet of tools provided through the Wiris plugin.  For more information about the capabilities of this tool we encourage you to see the additional resources section which links to the user manual on Wiris's website.  
  • When done creating the equation, simply click the "Accept" button to have the Wiris plugin convert the equation into an image for display.

  • Below you can see that the equation has been added to our label we're creating.  You can then click save to finish the creation of the equation, or, as we'll do here, you can go back into the equation editor to edit a part of the equation.

  • To edit an equation, simply click on the image of the equation you want to edit.  
  • Then click on the wiris editor icon (the yellow/orange square root icon).  
  • Again be sure that your pop-up blocker is off to see the editor.
  • You will then see the editor containing the equation that you want to edit.  
  • After making changes, click "Accept".
  • Again you will see the plugin created an image representation of the equation.
  • Now that we are done editing we can save it. 
  • Back on the Moodle course page we can see the equation that we created as a label in Moodle.  
  • This image also has alt text for people who use a screen reader so that the screen reader can read the equation shown to them

Additional Resources

 Resource Title

 Resource Link

 Wiris introduction  http://www.wiris.com/en/editor/docs/manual
 Wiris basic formulas  http://www.wiris.com/en/editor/docs/manual/basic-formula-edition
 Wiris symbol typesetting  http://www.wiris.com/en/editor/docs/manual/symbol-typesetting
 Wiris matricies  http://www.wiris.com/en/editor/docs/manual/matrices
 Wiris contextual tab
(Varies depending on the part
of the equation being edited)
 Wiris scaling symbols and parenthesis  http://www.wiris.com/en/editor/docs/manual/scaling-symbols-and-parenthesis
Wiris moving the cursor
(and keyboard shortcuts)
 Wiris copy and pasting  http://www.wiris.com/en/editor/docs/manual/copy-paste
 LaTeX documentation  http://latex-project.org/guides/
 LaTeX sample equations  http://www.personal.ceu.hu/tex/cookbook.html

Technical documentation

The Wiris plugin is a 3rd party Moodle module. The UW-Madison Moodle service has purchased a license to use WIRIS on our two production servers, https://courses.moodle.wisc.edu and https://innovate.moodle.wisc.edu.  

This plugin creates mathml formulas that are passed to a server operated by Wiris.   The server returns an image which is then cached on our Moodle sites.  Wiris does support LaTeX to a degree, but due to some limitations, and the already existing LaTeX filter in Moodle, we have disabled the Wiris plugin from processing LaTeX. The TeX notation filter or the recently added MathJax plugin process LaTeX, depending on which is enabled on the course.  (default is the TeX notation filter)

If you have additional questions, please email tls@engr.wisc.edu

Keywords:wiris, math, editor, equation, formula, latex, dragmath, LaTeX   Doc ID:36697
Owner:Michael L.Group:Moodle
Created:2014-01-28 16:52 CDTUpdated:2016-10-10 14:33 CDT
Feedback:  0   2