#### WordPress.com supports LaTeX!

I went to the WordPress.com forums to ask for help displaying mathematical formulas. A kind soul responded that WordPress supports , a tool I had heard of, so powerful that it could be used to prepare a dissertation for a Mathematics Ph.D.

Great! Except that I had never used . But armed with the link from the forums and this online reference, I was able to puzzle out what I needed. If you are interested, here are a few nuggets I found.

#### Preliminaries

is a markup language. You use regular text to indicate placement and size of symbols, Greek letters, functions, superscripts, etc.

Within you WordPress post, expressions occur between *$latex* and a closing *$*. These expression delimiters can occur on the same line or on different lines, embedded in text or stand-alone.

When adding expressions to your blog post, you should use the HTML tab of the editor, so that your expressions are not escaped.

You can include optional styling specifications between an ampersand and the trailing *$* For example, to request a size of 4 (really big), for function *f* of *x* you would use *$latex f(x)&s=4$*, which would render as:

#### Examples

Here are some examples of what can do, and how to do it.

…is generated from

$latex x^2 &s=2$

**An inline reference to function **…

is generated from:

An inline reference to function $latex f(x)$...

**The value of is **

is generated from:

The $latex {(n + 1)}^{th}$ value of $latex x$ is $latex x_{n + 1}$

The formula for variance:

is generated from:

$latex \frac{\Sigma(x - \mu)^2}{N} &s=2$

An alternative formula for variance:

is generated from

$latex \frac{\Sigma(x^2)}{N} - \frac{(\Sigma(x))^2}{N^2} &s=2$

#### Summary

- Embed expressions between
*$latex*and*$* - The delimiters
*$latex*and closing*$*can be on the same line or different lines. - Styling parameters for can be specified between an ampersand and the closing
*$*. E.g,*$latex x&s=5$*sets the size to 5 (very large). - Minus sign is hyphen, plus sign is plus sign, super-script is caret, subscript is underscore.
- Braces are used to group, e.g., expressions in a subscript:
*$latex x_{n – 1}$*for . - Greek letters are spelled out and preceded by a back-slash. Initial cap for upper case. E.g.,
*$latex \Sigma$*renders as ; all lower-case for lowercase Greek letter. E.g.,*$latex \pi$*renders as . - Online reference for is here.

Happy typesetting!

So does it also do ñ? Thanks Bob!

LikeLike

Every time I tweak this code, I unescape my references to LaTeX syntax and end up rendering the processed strings rather than the LaTeX source. I’ve repaired that every time I’ve noticed; sorry if you have caught the post in an in-between state. At this point, I think I’m going to try to leave the thing alone.

LikeLike