Ever since the born of LearnPress, we received a large amount of questions about how to add Latex formulas to LearnPress and WordPress. As LearnPress grows larger, the number of inquiries increases everyday due to the increasing number of large institutions, schools and universities using LearnPress as their main LMS. Indeed, implementing Latex in WordPress can be done very quick and simple using a lightweight WordPress plugin. Once you install the plugin, you can implement Latex into your site and your LearnPress courses’ content right away. In this article, we will dig deeper and provide a step by step tutorial of how to make that happen.
The plugin we will use in this tutorial is called MathJax-LaTeX.
There are currently 4000 sites using Mathjax as their Latex processor and the plugin has accumulated a number of good reviews and a reputation of quick response and quick update. The latest version has been updated in only around a month ago and the plugin is compatible with the latest version of WordPress. For that reason, we can verify that Mathjax can be a good, stable plugin for our long-term use.
You can download Mathjax and read about its information directly on the plugin’s main page here.
How to install Mathjax:
- Go to your WordPress dashboard
- Go to Plugins > Add new and search for Latex. You will see mathjax right on top of the search query. Or you could just search for mathjax.
- Install and activate the plugin
- That’s it. Mathjax is installed and activated on your site. Now it’s time to use it.
How to use LaTeX with Mathjax
Just place your latex code wherever you want.
For example, you can use this code to display the famous equation of the theory of relativity
or you can also use native mathjax syntax $$E=mc^2$$ or (E=mc^2).
If you want to use both of these syntax types, you can place the shortcode [mathjax] into your article and you’re free to use any syntax type you want.
Finally, you can use the shortcode [nomathjax] to disable mathjax for certain pages.
Below are some examples of LateX displayed on Eduma using MathJax
Latex on LearnPress’s Course Description Page
Latex on LearnPress’s Lesson
Latex on LearnPress’s Quiz