Writing Latex in wordpress

I am very happy with the LaTex support provided by WordPress. To type an in-line formula in WordPress, one can simply type $ latex your-latex-code-here… $ (you need to remove the space between $ and latex to make it work).

So, for example,

$ latex \int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x $

will produce

\int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x

In order to display a formula type equation, simply add <p align=”center”>. For example

<p align="center"> $ latex \int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x $ </P>


 \int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x

In addition to these two formats, you can also change the size of the LaTeX by specifying an s parameter after the \LaTeX code.

s option can go from -4 to 4 (0 is the default). For example

$ latex \LaTex&s=4$ will give you \LaTeX

Also when you insert an in-line LaTex elements, it is normally vertically aligned way too high. The result may relate to which theme you use but the vertical alignment can be manually adjusted. For example,

The formula looks like this before any adjustment \int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x , while after using this code in HTML editor <span style="vertical-align:-25%;"> your-latex-code-here </span>, the formula become this \int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x

You can change the percentage as you like, depending on which theme you use.

One last thing is about the LaTex syntax. Since there are already a lot of articles online teaching you how to write LaTex code, I only recommends two websites (link and link) which include almost everything you need in order to write a LaTex formula.