Integrating Mathematical Equations with TeX in Moodle

Including mathematical formulae and equations in running text can be very laborious and frustrating with conventional word processing programs. In Moodle, this problem can be elegantly solved thanks to the TeX-compatible equation editor.

TeX (pronounced “Tech”) is the name of a text typesetting system developed at Stanford University since 1977, which is used today primarily in conjunction with the software package LaTeX (pronounced “Latech”).

The main difference between TeX and so-called What-you-see-is-what-you-get word processing programs, such as Microsoft Word, is that in TeX the desired formatting is built directly into the continuous text with the help of special commands (so-called “markup”). With the help of this markup, the text passages that are to be formatted differently can be marked. In a second processing step, the actual text layout is generated based on these markups.

The great advantage offered by mark-up with TeX is the significantly higher precision of text design that can be achieved with the help of mark-up. The underlying principle of TeX-based programmes is therefore also described as What-you-see-is-what-you-ask-for.

In mathematics and the natural sciences in particular, the formulary markings possible in TeX make it much easier to produce documents.

Some examples of how TeX notation of mathematical equations works can also be found on the website of the free online LaTeX editor Overleaf.

Using the Moodle Equation Editor

The text editor “TinyMCE” available in Moodle allows equations and special characters to be included directly in Moodle using the mark-up language TeX. The use of the graphical formula editor is also still possible.

Open the equation editor in the text editor via the calculator symbol (“Equation editor”, see picture “Open equation editor”).

Opening Equation Editor
Opening Equation Editor

You can now type or copy the desired equations in TeX format into the free text field below the formula selection. The integrated preview also shows you what the layout of the TeX notation will look like after clicking the Save equation button.

In the example below, the TeX notation “/frac{x+y}2” in the free text field of the equation editor is automatically converted into the appropriate formula format (see equation preview).

Entering TeX formulas in the equation editor
Entering TeX formulas in the equation editor