This wordpress plugin is yet another simple plugin to load the MathJax scripts at the bottom of all of your pages. It uses a very all-inclusive mathjax configuration by default, with $’s and $$’s the default delimeters for in-line and displayed equations.
A preference pane is added to the “Settings” group where you can choose whether to use MathJax version 2 or 3, change the MathJax server location (CDN) and the MathJax configuration settings. (See the mathjax documentation for details on the options available.)
You can also specify a LaTeX “preamble” of newcommands which will be loaded in a hidden element near the top of each page.
Fork this plugin on GitHub.
I will preface this review with the statement that I am not a math expert and that I do not personally write LaTeX, though I do understand some basics about the syntax, so take this review with a grain of salt.
This is my preferred MathJax plugin. I’ve tried 2 other plugins that can render LaTeX (1 KaTeX, 1 MathJax) and here are some reasons I prefer this one:
Custom config: I’m able to provide custom configuration of the window.MathJax object which is very helpful, allowing me to configure custom macros, which I needed to do in order to support dark mode for some of the colourized syntax my client uses.
Custom CDN: I’m able to configure the CDN that the plugin pulls from. I experienced a performance issue on one of my client’s pages. Unfortunately this plugin caused the tab to crash on one of my client’s pages (a page with a lot of LaTeX). I was able to debug the issue and see that it was coming from font loading. I don’t know enough about MathJax and LaTeX to understand why the font loading was triggered on this one specific page and not others, but I did see it was related to the font loading. Choosing a Cloudflare URL without fonts instead of the default jsDelivr one with fonts was the workaround I used. I’d provide the specific CDN URLs here but the review guidelines say no URLs allowed. Non-developers would likely have trouble debugging this issue, so it might be helpful if the developer chooses to use a version without fonts by default, or surface the performance risks in the configuration. I’m also not sure what will break by omitting the fonts but LaTeX content seem to be working fine for the time being after providing a custom CDN URL.
Supported everywhere: This plugin supports native MathJax syntax anywhere on the site, not just in post and page bodies, and doesn’t require the use of shortcodes. My client uses MathJax in menu links and in page titles so it’s super helpful that this plugin isn’t restricted to post and page content.
Out of the 3 MathJax and LaTeX plugins I tried, this one seems to be my preferred version for the time being.
The plugin is great, but it’s not compatible with WP6.7, I used math symbols in $xxx$ format in the text, and it still shows $xxx$, no change, it only shows the formula correctly when I use math symbols in $$xxx$$!
Still need to wait for the update
This plugin has been very useful for our website. It simply works, and it works well. We have been able to add some customization (for example to number the equations) without problem. I highly recommended it if you want to have MathJax in your wordpress site!
Works as expected on 5.4.2!
Really like this plugin. It’s quick and very easy to use; the best Latex plugin I’ve tried.
I initially had a problem where I only wanted to load the Mathjax on certain pages, and I found the solution was to install a separate plugin which lets you toggle all of your other plugins on and off on each page/post. ‘Plugin Load Filter’ worked for me, but it might not be useful to everyone though.
I would say that this is the best plugin that renders MathJax! I would recommend it to anyone who needs to use LateX on their website.
Read all 14 reviews
“Simple Mathjax” is open source software. The following people have contributed to this plugin.
Contributors
2.1.1
The custom config no longer has the HTML escaping filter applied.
2.1.0
Added support for MathJax 4.
2.0.1
Bumped the default CDN URL for MathJax 2 to use 2.7.8.
2.0
MathJax 3 support, and the default config makes MathJax ignore the new block editor.
1.1
update latest mathjax version, load mathjax in footer instead of header
1.0
send default url to new cdn
0.5
minor code cleanup, allow mathjax in admin screens
0.4
use safe mode (prevents evil scripts) by default
0.3
use wp_enqueue_script to allow others to use mathjax as a dependency (christianp). removed disqus compatibility due to reports of it no longer working.
0.2
added disqus compatibility. enclosed the preamble in a hidden span to
cover a small space created by mathjax v.2
0.1
improved loading of the LaTeX preamble so that it appears just
below the body tag, rather than in the header
0.0
initial release