LaTeX in Moodle


I did a quick search and found nothing, so here goes.

We have a project (called MolCaGeTe) that is working on two solutions:

  1. Create a replacement for Pearson Connect quizzes. We are doing this with a Moodle install here.
  2. Translate an open textbook into Spanish for our students.

I was bugging support (via Twitter with Lauren just now) and then it occurred to me that most of what these crazy chemistry teachers that we are helping can do most (all?) they need via LaTeX and perhaps some extra packages.

Moodle has support to render TeX even without binaries installed but perhaps I should ask about having those available for performance, see TeX notation filter - MoodleDocs

My main extra will be finding/installing for support Chemistry packages like what this example outlined here where he is using the mhchem package:



As usual, thinking out loud and perhaps answering part of my own question. But documenting here might be useful to others here.

Updated documentation here: Chemistry notation using mhchem - MoodleDocs

Looks like this should be possible with no extra support via MathJax or (better for performance I assume) installing the packages on the server.


As a general rule finding solutions that don’t require server-level packages are going to be the best way to ensure compatibility in a Reclaim Hosting shared environment. We’re not adverse to installing software when it makes sense but it requires evaluation, testing, and 90% of stuff doesn’t make the cut. I can’t speak to this use case as I have no personal experience here but just wanted to put out that caveat that potential solutions you weigh should keep that in mind, especially if your solution is a time-sensitive one.


Totally understood and from my background as a systems administrator I agree 100%.

Messing around trying to get the MathJax version working here with this mhchem.