The past weekend I was trying to figure out how to convert $\LaTeX$ source to Blogger compatible sources with the support of the powerful MathJax mechanism to display math.

There’s already an excellent tool (latex2wp) that serves the conversion from $\LaTeX$ to WordPress as I noted before (and best advertised by Terry Tao’s WP blog). But there seem to be numerous legitimate reasons for doing similar thing on Blogger, the most notable one is Blogger allows network scripts to run for the blog (check out the concept of content distribution network, or CDN) and the powerful MathJax engine *happens* to provide such CDN service from recently. If you don’t appreciate why the bother to create yet another math display protocol MathJax, just come down here and have a look at the wonderful demos while imagining what would happen to image-based rendering of math at scaling.

A moment’s research revealed the major difference WordPress and blogger (precisely MathJax) are on handling $\LaTeX$ math: the former uses “$1atex …$” format (I intentionally put the number “1” instead of the letter “l” to avoid invoking the WP interpreter) while the latter just directly the $\LaTeX$ code as “$…$“. Another major piece lies at how they handle displaying style (vs. the inline style delimited by “$…$“). WP is to handle the following “<p align=center> $latex \displaystyle …$ </p>\n“, whereas MathJax can handle “$…$ ” directly (“$$…$$” alike are converted to “$…$” with proper numbering). Other minor details are different formats of line breaks and so on.

So I have worked on the latex2wp package directly and made necessary changes as discussed. Some simple tests tell that it’s working fine. Probably you’d like to have a try! (Albeit my great admiration for MathJax and blogger, I have no intention to move to Blogger.com yet since it’ll definitely expend a considerable amount of work. ) Here’s the download link from my dropbox

Latex2Blogger.0.6.2b.tar.gz

1. Anonymous says:

• idmsj says:

You’re more than welcome to do so …

2. ateixeira says:

Excellent! I’ll take a look at your modifications for latex2wp. I also made a few modifications for my blog, but since I’m hardly a specialist in python they had to be very limited.

By the way can you summarize what you have d0ne?

• idmsj says:

In fact Paragraph 3 has by and large summarize that; you can compare my code with the original latex2wp codes, there are minimal modifications.

Btw, I notice your blog is also being held on wordpress.com. Are you going to make it work with MathJax? If so, I’m sorry to say that it’s impossible currently from my research on that – wordpress.com does not allow editing the head part of Html. On the other hand, if you intend to transfer your blog to your own wordpress server, you may want to check out this plugin

http://wordpress.org/extend/plugins/latex/

• ateixeira says:

I don’t intend to transfer my blog from wordpress.com but on the other hand I do have another blog on blogger (http://physicsfromthebottomup.blogspot.com/) where I already use math jax to display my equations together with the latex2WP script (with a few changes so that it can be latex2blogger).

3. 与非 says:

Thank you!

But I want use MathJax in my wordpress.com directly, do you know how to set it?

• Ju Sun says:

According to this, it’s not supported. You can try wordpress hosting with other commercial host providers. But it’s not hard too incorporate mathjax into static pages nowadays, this is also cool

• 与非 says:

If use Octopress, should I built up another website?
For now, I want stay in wordpress.com :)

4. Thanks for every other informative website. The place else may I get that kind
of info written in such an ideal means? I’ve a undertaking that I’m simply now
operating on, and I have been at the glance out for such info.

5. aménagés says:

A design like yours with a few simple adjustements would really make my blog
shine. Please let me know where you got your theme. Thanks a lot

6. Please let me know if you’re looking for a article writer for your blog. You have some really good articles and I think I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some content
Please blast me an e-mail if interested. Many thanks, to you!

7. I’m very little directly into studying, however by some means I obtained to learn numerous content inside your webpage,nice tips on this blog,you’ve done great job on experimenting on using this method..:)

8. I usually do not post in Blogs but your blog forced me to, amazing work,
beautiful. Thank you!