Mathjax enables enables rendering of embedded latex or mathml in HTML pages.
This plugin adds this functionality to wordpress. The mathjax javascript is
inject on-demand only to those pages which require it. This ensures that
mathjax is not loaded for all pages, which will otherwise slow loading down.
The MathJax javascript can be delivered from your own server, or you can
utilise the [MathJax Content Distribution Network (CDN)]
(http://www.mathjax.org/docs/latest/start.html#mathjax-cdn), which is the preferred
mechanism as it offers increased speed and stability over hosting the Javascript
and configuring the library yourself. Use of the CDN is governed by these
Terms of Service.
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$$ or (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]x[/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.
/wp-content/plugins/
directory/wp-content/plugins/mathjax-latex/MathJax
)All code for this release was submitted by users of
this plugin! Thanks to Jared Wenerd and Paul Schreiber.
/wp-content/plugins/
directory/wp-content/plugins/mathjax-latex/MathJax
)Display mathematical equations within your posts and comments.
Put your plain text mathmatical expressions between [pmath size=xx]…[/pmath] tags. The optional size attribute controls how large the images will be displayed. Useful xx integer values range from 8 to 24. Size defaults to 12 when attribute omitted. Pascal Brachet’s PHP Math Publisher library is included.
Watch the youtube demo Introduction to Math Blogging
To toggle to the math mode within your blog’s content, you must use the [pmath size=xx]…[/pmath] markdown tag. The plugin automatically replaces your math text commands into HTML image tags that look sort of like this:
<img src=”MathFileName.png” style=”vertical-align:-xxpx; display: inline-block ;” alt=”your math text command”/>.
The math commands must be separated by a space character or surrounded by {}.
Examples:
Math elements supported:
/wp-content/plugins/
directory. If you’re uploading it make sure to uploadwpmathpub is based on Pascal Brachet’s phpmathpublisher library.
You can learn more about phpmathpublisher from here: overview
Note: wpmathpub WordPress plugin uses [pmath]your math text[/pmath] to create math graphical equations within posts and comments. While, from Pascal’s demo and test site, you will use <m>your math text</m> to create math equations.
Starting with version 1.0.7, use the wpmathpub plugin status display menu from your blog’s admin site’s “Manage” menu. See screenshot #5 (in the screenshots tab) for details. The status display will:
Starting with version 1.0.7, an enhanced priority scheme was implemented to improve reliability and better cooperation with some high bandwidth video streaming plugins.
At this time, only one plugin is known to play havoc with display of math images from within comments called: Live Comment Preview. Blog posts are not affected. This plugin causes the [pmath] start tag to get out of sync with the [/pmath] end tag.
If you suspect plugin interference, a simple test is to disable all of your plugins except wpmathpub. If wpmathpub works without other plugins, start turning on your plugins one by one to see which one(s) are interfering with [pmath] tag filtering. If you find one, let me know – I may be able to find a solution.
The ‘img’ directory needs write access to create new math images from your blog’s math text. Starting with version 1.0.5, the wpmathpub plugin automatically assigns the correct access rights to the ‘img’ directory on Linux/Unix installations. This auto-assignment feature can be turned off by changing line 55 in wpmathpub.php to read:
define(“AUTOCHMOD”, false);
Below is a sample bash shell session demonstrating how to manually locate the ‘img’ directory, change its mode to include write access, and verify the change was made:
-bash-3.00$ cd wp-content
-bash-3.00$ cd plugins
-bash-3.00$ cd wpmathpub
-bash-3.00$ cd phpmathpublisher
-bash-3.00$ chmod 755 img
-bash-3.00$ stat -c %a img
755
-bash-3.00$ stat -c %A img
drwxr-xr-x
By default, the wpmathpub plugin supports user generated math equations in comments. Starting with wpmathpub plugin version 1.0.6, you can disable the use of [pmath] tags in comments by changing line 58 in wpmathpub.php to read:
define(“ENGAGECOMMENTS”, false);
This setting will not affect the display of math equations in blog posts and pages.
Starting with wpmathpub version 1.0.5 HTML entities are supported.
Starting with wpmathpub version 1.0.5 both blog posts and comments support pmath tags.
You may go to the WordPress wpmathpub support page to ask questions:
WordPress wpmathpub Support Page