Using LaTeX in LearnDash
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 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.