Math Expressions and Plots

We have just installed a new plug-in that allows users to enter math symbols in order to create good-looking equations in WordPress sites. As you may know, the best way of creating mathematical expressions is by using LaTeX, a popular typesetting system created in the 70′s that is still the golden standard for scientific publications.

This new WordPress plugin is called QuickLaTeX and it is very easy to use (if all you want is typing or copy/pasting your good ‘ol LaTeX commands). All you need to do is to start your post with the expression “latexpage” (between square brackets), and then insert your LaTeX code below.

Here’s an example:

This is a really famous equation:

(1)   \begin{equation*} E=mc^{2} \end{equation*}

If you would like to include inline equations, you can just type them between ‘$’ signs, like this: a^{2}+b^{2}=c^{2}.

If you want to number only some of your equations, use the “displaymath” command instead of the equation command to skip those that should go un-numbered, like this one:

\begin{displaymath} \sin^{2}\theta+\cos^{2}\theta=1 \end{displaymath}

Here are two nice, more sophisticated equations including an infinite sum and an indefinite integral:

(2)   \begin{equation*} \lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k^{2}}=\frac{\pi^{2}}{6} \end{equation*}

(3)   \begin{equation*} \int\frac{d\theta}{1+\theta^2} = \tan^{-1} \theta+ C \end{equation*}

As you can see, the equations are rendered as PNG image files (yes, it’s not MathML, but it’s the next best thing!) Here’s the code that generates the expressions above:

QuickLaTeX can also render graphics on the fly through the pgfplots package. Here’s an example:

Rendered by

Here’s the code that generated the 3-D plot above:

Here’s a quick start guide to QuickLaTeX, featuring some neat examples.

The plugin is already available as of today on our WordPress production system.

Please let us know what you think!