Mathematical Equations in Moodle

When there are mathematical formula to be presented on a VLE page what are the options available?

You could upload an image of the equation with appropriate alternative text description. However, this is not ideal. So what other options are there for Moodle users?


Moodle has a MathJax filter.   MathJax  is a JavaScript display engine for mathematics that works in all browsers according to the MathJax  website. You can read more about Moodle MathJax Documentation in Moodle Docs.


MathJax is enabled by default. However, should there be a need to change settings the site administration can be done through  Administration > Site administration > Plugins > Filters > Manage filters.

How can you insert a formula with MathJax?

If you are using TinyMCE  text editor there may be some settings that you have to change please refer to the Moodle MathJax Documentation.  You can check and change your text editor preference  by  going to preferences.

Moodle menu to select preferences

From Preferences menu select Editor preferences.

Now you can select which text editor you want to work with from the drop-down list.

  • Atto HTML editor
  • TinyMCE HTML editor
  • Plain text area

Because there was the caution about TinyMCE editor I use Atto HTML editor.

In your Atto HTML editor to type a formula:

  1. Click on the Show/hide advanced buttons
  2.  Go to Equation editor
Atto editor showing show/hide advanced buttons and equation editor buttons
Screenshot of Atto editor

Equation editor requires a bit of getting used to. It has four tabs: Operators, Arrows, Greek symbols and Advance. Because I was entering fractions I used the Advanced tab mostly.

Let me show you an example of entering a  half. I select  a divided by b plus c  and then replace the values of a and b plus c with 1 and 2 respectively to get half.

Equation editor

When you insert this to the web page it shows as  \( \frac{1}{2} \) but it will be displayed as half by the clever MathJax filter.

If you want to display a more complex formula, you can use the building blocks in the Advanced tab to build this. Once you have created quite a few formula you will  even be able to type in the formula without using the equation editor!

In formula we need superscripts and subscripts. Use underscore to create subscript and ^ for superscript.

In this video you can see how a MathJax formula will be read out to a screen  reader user.