Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
MathJax-LaTeX icon

MathJax-LaTeX

v1.3.13
by knowledgeblog · 4.7 (9 reviews)

This plugin enables MathJax (http://www.mathjax.org) functionality for WordPress (http://www.wordpress.org).

10K+ active installs Updated Jan 14, 2025 Tested to 6.7.2 Requires PHP 7.0.0
Try Demo Download
Pre-installed Ready in ~10s No card

About MathJax-LaTeX

This plugin adds MathJax functionality to WordPress, allowing you to render embedded LaTeX or MathML in your HTML pages. MathJax is loaded only on the pages where it is needed, preventing slow loading. You can choose to deliver MathJax from your own server or use the Cloudflare CDN for faster and more stable performance.

Frequently asked questions

What does the MathJax-LaTeX plugin do?
The MathJax-LaTeX plugin enables rendering of embedded LaTeX or MathML in HTML pages for WordPress. It injects MathJax JavaScript on-demand only to pages that require it, preventing unnecessary loading and improving speed.
How can I embed LaTeX using this plugin?
You can embed LaTeX using the preferred shortcode syntax, such as [latex]E=mc^2[/latex]. This method automatically forces the loading of MathJax. Native MathJax syntax like $$E=mc^2$$ is also supported, but may require a [mathjax] shortcode if it's the only syntax used.
Can I use this plugin with wp-latex?
MathJax-LaTeX aims to be a drop-in replacement for wp-latex, supporting the $latex E=mc^2$ syntax. However, this behavior is blocked if wp-latex is present and must be explicitly enabled in the settings.

Changelog

1.3.13

  1. PHP code style fixes

1.3.12

  1. Use version 2.7.9 of MathJax JS
  2. Add code comments to all variables, functions and parameters.

1.3.11

  1. Use version 2.7.5 of MathJax JS

1.3.10

  1. Rename class files, per PHPCS
  2. Gracefully handle null values in filter_br_tags_on_math. Thanks to Yang Liu.

1.3.9

  1. Code style changes, per PHPCS 3.3.0 and WPCS 0.14.1
  2. Use PHP 7 short array syntax

1.3.8

  1. Code style changes, per PHPCS 3.1.1 and WPCS 0.14

1.3.7

  1. Update MathJax to 2.7.2

1.3.6

  1. Update location of MathJax CDN

1.3.5

  1. Add support for MathJax config via filter

1.3.4

  1. PHP code cleanup
  2. Always use https URL for MathJax library
  3. Updated “tested up to” to 4.3

1.3.3

  1. Fixed inconsistent version numbers between readme and php file

1.3.2

  1. Further code clean ups.

1.3.1

  1. Accessibility Improvements for Admin page
  2. VIP Coding Standards
  3. MathML tags enabled in TinyMCE

All code for this release was submitted by users of
this plugin! Thanks to Jared Wenerd and Paul Schreiber.

1.3.0

  1. Whitelist MathML tags and attributes.
  2. Sanitization of input and escaping of output.

1.2.1

  1. Bug fix: custom location was not correctly applied.
  2. Bug fix: force load was not correctly applied.

1.2

  1. Admin page was open to attack from third party sites which user was logged
    in as admin.
  2. The admin page has been isolated and rewritten.
  3. All the options have been renamed, which will, unfortunately mean
    reconfiguring the plugin. In particular, wp-latex syntax is switched off by
    default.

1.1

  1. Documentation update
  2. Update test-with documentation for WordPress 3.5.1
  3. Tested against MathJax2.1

1.0

  1. Compatibility with MathJax 1.1. Load a default configuration from the MathJax distribution.
  2. Use the MathJax Content Distribution Network to deliver the javascript library. Offers improved performance and stability.

0.2

  1. MathJax.js can be loaded form a configurable URL. Defaults to $PLUGIN/MathJax/MathJax.js

Try other plugins

Classic Editor icon

Classic Editor

4.9 · 9M+ installs

Enables the previous "classic" editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports all…

WordPress Importer icon

WordPress Importer

3.1 · 3M+ installs

Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.

Classic Widgets icon

Classic Widgets

4.9 · 2M+ installs

Enables the previous "classic" widgets settings screens in Appearance - Widgets and the Customizer. Disables the block editor…