Wednesday, January 7, 2009

Enter latex directly in your blog

There are many ways of showing Latex formulas in blog. Of those, maybe the simpliest one is to use the CodeCogs site like this:
<img src="http://www.codecogs.com/eq.latex?\tiny \int_{-\infty }^{\infty }x^2 e^{-x^{2}}\;dx = ?}" /&gt; would appear as
and another similar way:
<img src="http://www.forkosh.dreamhost.com/mathtex.cgi?c=\sqrt{a^2+b^2}" title="c=\sqrt{a^2+b^2}" alt="c=\sqrt{a^2+b^2}" style="vertical-align:-2pt;" /&gt; looks like
c=\sqrt{a^2+b^2}

replacing "http://www.forkosh.dreamhost.com/mathtex.cgi" with "http://www.sitmo.com/gg/latex/latex2png.2.php" also works.