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 \LaTeX 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 :

(a+b)^3 = (a+b)^2(a+b)

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

Chart API for webpages

Cool….Great yet Simple..

Embed charts in webpages with one of our simplest APIs yet

We actually built this originally to use internally - we use it on Google Video and Google Finance for example. It seemed like it would be a good thing to open up to other users too. You can find out all about it at on the Google Chart API homepage and there’s a Google Chart API group for questions and support.

Google publishes chart API for web pages

A single HTTP GET request with parameters is all you need. You can even use the URL as the src attribute on an img tag.

Also Read:Programmable Web: Google’s New Chart API

Speed up firefox

HOW TO SPEED UP FIREFOX

Here’s something for broadband people that will really speed up Firefox :

1.Type ‘about:config’ into the address bar and hit enter. Scroll down and look for the following entries: -
network.http.pipelining
network.http.proxy.pipelining
network.http.pipelining.maxrequests

Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.

2. Alter the entries as follows:

Set ‘network.http.pipelining’ to ‘true’ (double click to change)
Set ‘network.http.proxy.pipelining’ to ‘true’ (double click to change)
Set ‘network.http.pipelining.maxrequests’ to some number like 30. This means it will make 30 requests at once. (double click to enter number)

3. Lastly right-click anywhere and select New-> Integer. Name it ‘nglayout.initialpaint.delay’ and set its value to ‘0′. This value is the amount of time the browser waits before it acts on information it recieves.

If you’re using a broadband connection you’ll load pages MUCH faster now!”
Find more firefox tweaks here

Related Posts: