# Writing LaTeX in WordPress

To type a formula in WordPress type $latex < Your LaTex code>$ without the signs < and >.

For example $latex \int_0^1 f(x) \, \mathrm{d} x$ produces $\int_0^1 f(x) \, \mathrm{d} x$.

To display a formula type <p align=”center”> $latex \displaystyle <Your LaTex code>$</p>.

For example <p align=”center”>$latex \displaystyle \sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}.$</p> yields $\displaystyle \sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}.$

For a short introduction to LaTex see for instance here.

Further information on writing formulas in WordPress can be found here. Some information can also be found here. A very useful program which converts latex into WordPress-Latex can be found here, see also here. If you are running into problems with formulae not parsing, see here.

### 7 responses to “Writing LaTeX in WordPress”

1. hirak

very useful thanks..

2. otrejot

Hey thanks, really useful !

3. graydennisc

Excellent! I $\omega \emptyset \mathbb{N} {\partial d} \mathrm e \mathbb{R}$ if it works in comments too. Thanks.

Also, if anyone else was confused, you need to drop the space between $and ‘latex’. I imagine you added the space so that you could show the syntax without it turning into LaTex output. 4. Robert David West Thank you! Hugely helpful. In the example you gave it comes out pretty nice since you have a fraction on either side of the equation, but when that is not the case you get this size difference issue, that comes from using the latex inline functinality:$ $, rather than the one line: $S_a \triangleq \frac{ S \cdot n + f}{n}$ 5. Robert David West I found a work around for this issue: $S_a \triangleq$ $\frac{ S \cdot n + f}{n}$ 6. Robert David West by using a different size for each side of the equation:$ latex S_a \triangleq &s=2  latex \frac{ S \cdot n + f}{n} &s=3