Sunday, January 17, 2010

Latex on Blogger

Posted by Danny Tarlow
I am playing around with the (very simple) instructions provided here for getting LaTeX ($\LaTeX$) to work on Blogger:

This is a test:
\[ E(\mathbf{x}) = \sum_{i \in \mathcal{V}} \theta_i(x_i) + \sum_{ij \in \mathcal{E}} \theta_{ij}(x_i, x_j) \]

Update: seems to work properly on the post-only page, but not on the blog home page. More to come...

Update 2: I think I was wrong. It looks like there's a bit of randomness to when it works and when it doesn't. I was fooled into thinking it was due to which page I was on. Also, for further reading, Terence Tao has some good discussion--including some of the shortcomings--regarding displaying math on the web.


David Warde-Farley said...

I'm a big fan of jsMath for displaying math on the web, since it abstracts away a lot of the details and offers great flexibility in the way things actually show up on your screen. It will render with actual characters and CSS if you have the computer modern fonts installed, and use image fonts if you don't (user-selectable between low-res screen image fonts and high-res image fonts for printing); it can, for example, use one gigantic PNG bitmap that can be easily cached and then use CSS trickery to index into sub-bitmaps. And, of course, clicking on a jsMath rendered expression will reveal the LaTeX source which can be copied and pasted for further use.

Danny Tarlow said...

Thanks, David. It looks like at least one person has got a little jsMath working in Blogger:

I'll give it a more careful look when I get a chance.

C├ęsar Souza said...

Hi Tarlow,

I didn't know about WatchMath until I've read your blog. For months I've been using the LaTeX Equation Editor by CodeCogs. I personally think it works far better than javascript approaches not only because I can instantly see my formula in the editor but because I can host those images directly in Picasa using Windows Live Writer. This way I avoid having to install yet another script to my blog and also avoid dependency on external domains altogether.

To always have the LaTeX code at hand for a given formula, I copy and paste its code in the ALT tag for the image. Works flawlessly.