# MathJax-LaTeX

## Description

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

You may embed latex using a variety of different syntaxes. The shortcode
(https://codex.wordpress.org/Shortcode_API) syntax is preferred. So
$E=mc^2$ 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 $x$
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.

## Installation

1. Unzip the downloaded .zip archive to the /wp-content/plugins/ directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. This uses the mathjax
CDN(http://www.mathjax.org/docs/1.1/start.html#mathjax-cdn). Alternatively:
5. Place the Javascript library in the mathjax-latex directory (/wp-content/plugins/mathjax-latex/MathJax)
6. You can configure the plugin to load MathJax from a different URL to the default. See the options page.

## FAQ

Installation Instructions
1. Unzip the downloaded .zip archive to the /wp-content/plugins/ directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. This uses the mathjax
CDN(http://www.mathjax.org/docs/1.1/start.html#mathjax-cdn). Alternatively:
5. Place the Javascript library in the mathjax-latex directory (/wp-content/plugins/mathjax-latex/MathJax)
6. You can configure the plugin to load MathJax from a different URL to the default. See the options page.

## Reviews

### Just Works (TM)

I am not a heavy LaTeX user but I do write about mathematics every now and then, and I find MathJax extremely useful. I have been using it for the last 2 or 3 years – no issues whatsoever. It simply works, both on PC an on mobile. The biggest selling point to me is that it allows for selecting & copying math expressions as text (as opposite to other LaTeX plugins that convert expressions to png). This makes things scalable, performant etc. Good work!

### Great that it's only injected on pages that use it

Up to now I’ve been using the Simple Mathjax plugin, which also works well, but is not able to inject the mathjax dependency selectively.

On my sites I have math only on a very few pages, and MathJax-LaTeX enables me to enable mathjax only on those pages by just adding the [mathjax] shortcode somewhere.

Importantly, remember to disable Jetpack Beautiful Math, else it can interfere with MathJax-LaTeX. (at the time of writing, Jetpack is still turning math into bitmaps, which is not nearly as beautiful as MathJax on capable browsers).

See https://vxlabs.com/2014/06/16/level-sets-the-practical-10-minute-introduction/ for an example.

### Great Plugin

Using the MathJax-LaTeX plugin makes math real simple and beautiful on my site. There may be some tiny “bugs” from time to time, but nothing I could not fix by looking at the docs.mathjax.org.
Using math on your blog never was simpler!