selinap.com

To leave furtively and stealthily.

Home » Blog Tips, LaTeX, WordPress

Display Maths with Wordpress

May 20th, 2008

Displaying Mathematics notation in a browser is not an easy task. One option is by using a plugin such as Design Science MathPlayer™, which enables Microsoft Internet Explorer to display mathematical notation in Web pages. However, the plugin is not so popular, and it does not comes with the browser by default.

Another way to do it is by using a public LaTeX server, using standard LaTeX code. An example of a public LaTeX server is http://l.wordpress.com/latex.php?latex=. As an example, typing this

http://l.wordpress.com/latex.php?latex=\int_{-\infty }^{\infty }e^{-x^{2}}\;dx=\sqrt{\pi }

in the browser address bar, will display

.

One way to use it is by using the img tag of HTML. For example,

<img src="http://l.wordpress.com/latex.php?latex=
\int_{-\infty }^{\infty }e^{-x^{2}}\;dx=\sqrt{\pi }" alt="" />

However, it is a messy and error prone job to do it this way.

Fortunately, there is an alternative, for Wordpress user. A PhD student at Center for Advanced Study and Institute for Theoretical Computer Science, Tsinghua University, Zhiqiang Zhang had created a plugin for Wordpress, called Latex for Wordpress. This plugin uses LaTeX code to generate images. Although the plugin uses the Wordpress public LaTeX server, a local LaTeX service such as MimeTex is preferable, in case the public server is down. Some Web hosting support MimeTeX by default.

With this plugin, adding Maths notation is as easy as adding the LaTeX code. For example, for displaying an inline math equation, use

$$\int_{-\infty }^{\infty }e^{-x^{2}}\;dx=\sqrt{\pi }!$$

and, for the math mode, use

$$!\int_{-\infty }^{\infty }e^{-x^{2}}\;dx=\sqrt{\pi }!$$.

Notice that there is an exclamation mark “!”, just after the second dollar sign.

Download Link: http://wordpress.org/extend/plugins/latex/

Note: If you have trouble in writing the LaTeX code, use TeXaide.

Related Articles:

Popular Articles:

Spread/Promote this article.

Digg | Del.icio.us | Stumble | Y! MyWeb | Y! Buzz | Fave It! | Reddit

Subscribe for free.

 Subscribe to Selinap.com feed right now!

 Get Updates by Email

Tags: , , ,

3 Responses to “Display Maths with Wordpress”

  1. Ajay says:

    that’s a real good plugin

  2. pylover says:

    wow!, this plug-in is awesome!.TQ

  3. hanep says:

    great post. i’ve been searching for this kind of method. i’m noob in programming. huhu..

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">


© Copyright 2008 - 2009 selinap.com
Entries (RSS) and Comments (RSS).