How to show latex formulas on your blog/webpage/wordpress

For most people who are familiar with latex, we are addicted to the grammar of latex's mathematical formulas. However, although we can do well in PDF files, we can do little on traditional media like web pages (html) or our blog.

Fortunately, as the demand of it, some talent people provide the powerful tool. Like wikipedia, you can see the pictures  of these formulas directly and if you copy and paste them, you may get the latex code in your latex editor. Specifically, if you are using Lyx like me, you can see the formula as soon as you paste it in the mathematical environment like "equation". How cool it is!

But the fact is, what can we do on our blog? After searching for a while, I have found several solutions and tried one by one.

  • the best way is to install latex service on your servers. According to here, you can download  LatexRender. Then for those who are wordpress users, you can use the plugin WP LaTeX. Done!
  • But for those who are using third-part server like me, it is impossible to install latex service. From HERE: we can use John Forkosh's , can insert "real math images in html documents”. You only need to add latex code behind mathtex.cgi? and then you will get the image.
  • But don't you feel that it is inconvenient? You must enter the link by keyboard every time. Fortunately we have a wordpress plugin Latex for WordPess ( MimeTex for wordpress & bbPress,from here ). After the installation, it will automatically convert latex codes into gif images and cache them on your blog.

Note: Maybe you will fail to open your web pages after installing latex for wordpress. Then you may try to edit the plugin:

find this line:

class mimetex {

and then replace the following two lines with

var $server = “http://www.bytea.net/cgi-bin/mimetex.cgi?formdata=”;
var $img_format = “gif”;

Thanks for http://www.bytea.net/ and its public cgi.

Leave a Reply

Your email address will not be published. Required fields are marked *