Latex on WordPress.com

I saw the recent announcement that wordpress.com now supports native latex equations. The posted examples are pretty sweet, and the syntax is just fine: <latex stuff>.

I thought to myself, “boy, I sure would like to have that on my blog. I bet it’s just a wordpress plugin.” That’s apparently not the case for wordpress.com. I don’t know what they’re using. However, I did find the LatexRender plugin by Steve Mayer. Even better though, I found Gunnlauger’s installation script over at Fugato. Why all wordpress plugins don’t have some automated install mechanism, I’ll never guess. Downloading zips and extracting them really sucks, but this script is handy.

Let’s test the results by typesetting some of Euler’s work:

[tex]\displaystyle e^{{\it i}\theta}[/tex] [tex]\displaystyle =[/tex] [tex]\displaystyle cos \theta + i sin \theta[/tex]
[tex]\displaystyle e[/tex] [tex]\displaystyle =[/tex] [tex]\displaystyle \sum\limits_{n=0}^\infty {\frac{1}{n!}}[/tex]
[tex]\displaystyle =[/tex] [tex]\displaystyle \lim\limits_{n\to\infty} {\left(\frac{1}{0!} + \frac{1}{1!} + \frac{1}{2!} + \cdots + \frac{1}{n!} \right)}[/tex]
[tex]\displaystyle J[/tex] [tex]\displaystyle =[/tex] [tex]\displaystyle \int_{a}^{b} F\left(t, f(t), f^{\prime}(t)\right) d{\sl t}[/tex]

Pretty slick, I have to say. It’s not perfect though; because of the lack of a good standard for typesetting math on the web, these things still have to be done with images. MathML is pretty neat and I think it’s probably the future, but not every browser treats it the same (or at all, for that matter). It’s just not ready yet. Also, not every [tex]\LaTeX[/tex] technique will work. For the above, I tried using the “tabular” environment, but it didn’t come out right because the ampersands got converted to character codes – I eventually had to use tables to get the spacing I wanted.

Anyway, all in all, this plugin is pretty cool. It even adds a ‘tex’ button to the post editing page.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>