April 17th, 2018 LearnDash Tips

Yes, you can use LaTeX for math equation in LearnDash.

One question we often receive is if it is possible to use LaTeX for creating math equations, particularly in a quiz for both the question and possible answer selections.

I am happy to say that this is indeed possible, and it is easier than you think! 🙂

Step 1: Install the free MathJax LaTeX plugin

This is what makes the entire use of latex in LearnDash a reality.

The MathJax plugin makes it possible to render embedded latex or mathml in your LearnDash quizzes.  With MathJax installed, you may embed latex using simple shortcodes. Here is one example:


Step 2: Add this code snippet to your theme’s functions.php file

Copy this code snippet. In it you will find code that you should copy and paste into your theme’s functions. Make sure you take a backup of your site before doing so just in case!

Specifically, this snippet makes it possible to use latex in places like the “incorrect” and “correct” messages of a quiz. If you don’t need that for your quizzes then you can actually skip this step.

Step 3: Install LearnDash and create your quiz!

You can now begin creating a quiz.

When you need to use latex, then just follow the format outlined in Step 1.

Are there any limitations?

While the above steps will get you a long way with using latex in your LearnDash quizzes, there are some limitations.

For instance, latex cannot be used for Fill in the Blank and Assessment question types. It will work for the other options.

The other key limitation is related to the MathJax plugin.

The MathJax javascript needs to be delivered either from your own server, or you can use a CDN (Content Distribution Network) such as CloudFlare. The latter what MathJax recommends as it is considered more reliable compared to hosting the javascript and configuring the library yourself.

In some cases we have heard reports of the latex conversion being delayed. This is because the MathJax plugin has to call a CDN to download some of the javascript.

That’s it!

The above steps have worked well for many LearnDash users and is definitely worth trying if you want to use latex in your quizzes.

If you have questions regarding MathJax or need assistance in its configuration then please contact MathJax Support.

Justin Ferriman photo

About Justin Ferriman

Justin Ferriman started LearnDash, the WordPress LMS trusted by Fortune 500 companies, major universities, training organizations, and entrepreneurs worldwide for creating (and selling) their online courses. Justin's Homepage | Twitter


4 responses

Leave a Comment

I’m using latex to create quizzies and it works quite well.

But when I use latex to create possible answers with fractions it doesn’t work.

For example, I write this in one answer and it doesn’t convert it to latex:
[latex] \frac { 1 }{ 5 } < \frac { 3 }{ 9 } < \frac { 11 }{ 15 } < \frac { 2 }{ 3 }[/latex]

Why? What can I do?

Avatar Marc Gisbert Juárez

It works with LearnDash, just open a ticket and we’ll assist.

Where do I find my theme’s functions.php file and how do I edit it?
(I’m using ASTRA theme according to your recommendation).

Avatar Ori Piletzki

I have copied the snippet in my functions. I am unable to use Tikzpicture library after installing Mathjax Plugin. I want to create maths questions on Geometry. SO i need to create circles and recatngle using Tikzpicture library. please assist.

Comments are closed.

Your course could already be online!

We offer a 15 day money-back guarantee and have a world class community to help you get your course online today!

See LearnDash in action. Online Demo


👋 Meet LearnDash Webinar

Are you trying to decide if LearnDash is the right learning management system to build your online courses? Join us for our next live walkthrough.

Join Our Next Webinar!

LearnDash webinars are designed to teach you how to build, grow, and scale your course-building business. Join our team in one of our next live webinars.