For a hosted math Mimetex is a proven open source solution (<a href="http://www.forkosh.com/mimetex.html" rel="nofollow">http://www.forkosh.com/mimetex.html</a>).<p>Mimetex is a web-based program that generates LaTeX images (math) on the fly, if you use it like this: <img src="<a href="http://www.forkosh.dreamhost.com/mimetex.cgi?c=\sqrt{a^2+b^2}"" rel="nofollow">http://www.forkosh.dreamhost.com/mimetex.cgi?c=\sqrt{a^2+b^2...</a> alt="" border=0 align=middle>.<p>To do a plugin that does [tex]\sqrt{a^2+b^2}[\tex] is simple (PHP).<p><pre><code> $text = preg_replace('/\[tex\](.*?)\[\/tex\]/ie',
"'<img src=\"/cgi-bin/mimetex.cgi?'.rawurlencode('$1').'\"
align=\"middle\" />'", $text);
</code></pre>
To do something like this with JavaScript is also trivial.<p>Mimetex is great beause A) you don't need to have a full TeX installation on your server, the program generates it internally B) you don't need to worry about scalability - mimetex can be compiled with caching enables, which makes it the same as static images