Latex on wordpress blog
Some time back I came to know that wordpress blogs hosted at wordpress.com supports latex. But no such default functionality for self hosted wordpress blogs. But there are plugins (latexrender, wp-latex) which can facilitate similar things.
But for these to work you will need to install latex on your hosting account. (I have intalled latex on my hostmonster account some time back.).
For installing latexrender wordpress plugin you can find guidelines here
One more thing to remember while setting $latexrender_path_http in latex.php give full http path to latexrender folder like $latexrender_path_http = "http://your blog addr/latexrender";
Now you are set to go. To include
in your posting, use the following:
[tex] your latex code here [/tex] For example:
[tex] (a+b)^3 = (a+b)^2(a+b) [/tex]
produces :
But after setting up latexrender plugin, the png image was still not generated. Error that I got was:
I can’t find the format file ‘latex.fmt’!
But when I tried similar command (latex sample.tex) from shell prompt, It was working fine.
So I thought that problem is in calling latex from php file using exec. So when I copied the latex.fmt file to directory containing .tex file it started working fine. May be some problem in setting environment variable.
You can look for latex.fmt file using :
find -name latex.fmt
For latexrender you can copy latex.fmt file to latexrender/tmp/ folder inside your wordpress installation.
I’m still working on how to set environment variable in php so that I don’t have to copy latex.fmt again and again.
But for now I gave got working latex on my blog
. Now I can write math equations in my blog posts.
You can try latex formulas in comment too.
And if you want to publish LaTeX equation in WordPress blog without installing any software, try jsTeXrender: http://yourequations.com/. Thanks Doug for the tip.
Related Posts:
Latex Beamer
Installing latex on hostmonster
Wordpress plugins you should install
Few months back I have shifted my blog to self hosted wordpress blog at this location. I have passed few months trying new things on this blog like themes, plugins and its been fun playing with it. During this time I have tried several plugins, so wanted to share some of the plugins that I liked the most:
- Aksimet: filters spam comments and tracksbacks. You don’t want your post to be filled with useless comments.
- Wordpress.com Stats: Its a light weight plugin but still provides detailed representation of important statistics
- Google Sitemap Generator: Generates sitemap for your wordpress blog which is by Ask.com, Google, YAHOO and MSN Search.
- Get Recent Comments: Display the most recent comments or trackbacks with your own formatting in the sidebar.
- FeedBurner FeedSmith: It redirects your wordpress feeds to feedburner so that you can easily track your subscribers.
- Plugin Central: Automatically installs and updates WordPress plugins.
- Wordpress Data backup: Its a necessary plugin to backup your blog. I still haven’t restoring posts from backup though.
For some specific users plugins like wp-latex, are also useful. It generates PNG images from inline $\LaTeX$ code in your posts and comments. I have installed latex on my hosting service( hostmonster) and still working on making simliar plugins(LatexRender) to work.
You can find many more such list on web if you do a google search. But Lorelle has a nice compilation of list of favorite wordpress plugins.
New Webpage :)
Hi everybody….
As I have graduated from IIT bombay completing my B.tech in computer science, so my webpage there wont be available for long. So I have taken a new web domain : http://www.aburad.com with hostmonster till now services are good for what I paid. Right now i have just shifted my iitb page there, but soon will be posting new stuff…so watch out !!
And I have also shifted my blog from http://burad.blogspot.com to self hosted wordpress blog: http://aburad.com/blog. Please update your bookmarks and feeds.

Add to del.icio.us Network
Google Reader Shared Items
Twitter Feed
Flickr Photos