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:

$E=mc^2$

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 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

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:
$\frac { 1 }{ 5 } < \frac { 3 }{ 9 } < \frac { 11 }{ 15 } < \frac { 2 }{ 3 }$

Why? What can I do?

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).

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.

You might also like...

May 28th, 2019

June 29th, 2022

June 23rd, 2022

June 16th, 2022

How To Price An Online Course

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

YOU’RE INVITED TO OUR NEXT:

👋 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.