You may embed latex using a variety of different syntaxes. The shortcode (https://codex.wordpress.org/Shortcode_API) syntax is preferred. So
[latex]E=mc^2[/latex] will work out of the box. This also forces loading of MathJax.
Additionally, you can use native MathJax syntax —
\(E=mc^2\). However, if this is the only syntax used, the plugin must be explicitly told to load MathJax for the current page. This can be achieved by adding a
[mathjax] shortcode anywhere in the post. For posts with both
[/latex] and $$x$$ syntaxes this is unnecessary.
You can use wp-latex syntax,
$latex E=mc^2$. Parameters can be specified as with wp-latex but will be ignored. This means that MathJax-LaTeX should be a drop-in replacement for wp-latex. Because this conflicts with wp-latex, this behaviour is blocked when wp-latex is present, and must be explicitly enabled in the settings.
You can also specify
[nomathjax] — this will block mathjax on the current page, regardless of other tags.
MathJax-LaTeX is developed on GitHub.
This plugin is copyright Phillip Lord, Newcastle University and is licensed under GPLv2.
- Unzip the downloaded .zip archive to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
Contributors & Developers
“MathJax-LaTeX” is open source software. The following people have contributed to this plugin.Contributors
- Use version 2.7.5 of MathJax JS
- Rename class files, per PHPCS
- Gracefully handle null values in filter_br_tags_on_math. Thanks to Yang Liu.
- Code style changes, per PHPCS 3.3.0 and WPCS 0.14.1
- Use PHP 7 short array syntax
- Code style changes, per PHPCS 3.1.1 and WPCS 0.14
- Update MathJax to 2.7.2
- Update location of MathJax CDN
- Add support for MathJax config via filter
- PHP code cleanup
- Always use https URL for MathJax library
- Updated “tested up to” to 4.3
- Fixed inconsistent version numbers between readme and php file
- Further code clean ups.
- Accessibility Improvements for Admin page
- VIP Coding Standards
- MathML tags enabled in TinyMCE
All code for this release was submitted by users of
this plugin! Thanks to Jared Wenerd and Paul Schreiber.
- Whitelist MathML tags and attributes.
- Sanitization of input and escaping of output.
- Bug fix: custom location was not correctly applied.
- Bug fix: force load was not correctly applied.
- Admin page was open to attack from third party sites which user was logged
in as admin.
- The admin page has been isolated and rewritten.
- All the options have been renamed, which will, unfortunately mean
reconfiguring the plugin. In particular, wp-latex syntax is switched off by
- Documentation update
- Update test-with documentation for WordPress 3.5.1
- Tested against MathJax2.1
- Compatibility with MathJax 1.1. Load a default configuration from the MathJax distribution.
- MathJax.js can be loaded form a configurable URL. Defaults to $PLUGIN/MathJax/MathJax.js