### Making use of MathJax in Moodle

MathJax is an open-source Javascript display engine for LaTeX and other formats that can represent mathematical notation. The University of Nottingham currently has the MaxJax filter installed in our Moodle VLE to enable mathematical notation to be displayed within module pages.

MathJax can be used to display mathematical notation within Moodle by using the text editor. This is particularly useful for:

- Adding mathematical notation to Moodle quiz question;
- Adding mathematical notation in a Moodle label;
- Adding mathematical notation in a Moodle book resource.

### How to use MathJax in Moodle

The following example will show how to add an equation in a Moodle Label. However, the principle remains the same for quizzes and other resources. If you are able to use the text editor within Moodle then you will be able to add mathematical notation via the equation editor.

1) Within your Moodle site press the cog icon to open up a drop down menu. In the drop down menu press **More**.

Once the** Module administration** page loads press** Filters** from the list.

2) A new page will load, ensure that the **Active?** Column for **MathJax** is set to **Default (On)**. Then press **Save changes **and use the breadcrumb links to go back to the module page.

You will only need to do steps 1 and 2 once for each module. If the MathJax filter is turned on then it will display mathematical notation.

3) In the module page press the **edit**** icon**.

Then press the **Add an activity or resource** link in the area you wish to add your content. In the screenshot below a Label resource has been added.

4) You will be taken into the settings of a Label. Within the text editor you can write some text but when you come to write a mathematical equation click on the calculator icon button to launch the equation editor.

5) The equation editor will launch. This editor is split into 3 sections.

The top section provides you with a list of characters separated by tabs to assist in writing mathematical notation.

The middle section is where you can build your equation by entering TeX syntax. For example:

More information about basic TeX commands can be found here by clicking this link. Below are some simple examples:

Capital Greek letter e.g.\Delta = Δ

Lower case Greek letter e.g. \alpha = α

Superscript (on keyboard as Shift/6) is ^ e.g. x^2 gives x^{2}

Subscript (on keyboard as Shift/-) is _ e.g. x_7 gives x_{7}

Fraction is \frac e.g. \frac {1} {2} will give a half

The final section is the **Equation preview**. If you have written your equation correctly then you will see it displayed how it will look like in Moodle. If it looks incorrect then the equation will not display correctly and you will need to amend it.

6) If you are happy with how your equation looks press **Save equation**. You will be taken back to the text editor and will see your Tex notation.

If you wanted to you could then add another equation within the same text box using the same previous steps.

Once you are happy with your equation press **Save and return** **to module**.

Finally you should see your equation displayed in Moodle.