LaTeX

On 7 July 2008, in Nuisances, by stacy

I used to have a site that used LaTeX to render equations.  This worked pretty well, except that I didn’t have LaTeX installed on the server.  It turns out that you can do pretty well without it.

There’s an excellent program called mimeTeX that renders math without a TeX installation. I used it with Drupal and DruTeX. Now I’m not using Drupal… so I need to find another way to display math.  Oh, mimeTeX still works, but you have to explicitly encode the link.  I’m way too lazy to do that.

[equation]

Update: I’ve been experimenting with using [ tex ]…[ /tex ] from the mimeTex plugin to WordPress. It’s working now, but I needed to do two things to make it work.

  • Create a cache folder under my wp-content folder.
  • Modify the plugin to point to my local installation of mimetex.cgi.

I also had to go into the cache folder and delete all the files that were created during the process, so I could see the effect of the changes. But now it works!

Here’s an example of an equation array. Note that you need to use & to insert the required ampersand delimiters.

[tex]\begin{eqnarray}
\overset{*}{\triangleright}\!(uvx) & = & \triangleright\!(\overset{*}{\triangleright}\!(uv)x) \\
& = & \triangleright\!(\overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)v)x) \\
& = & \overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)vx)
\end{eqnarray}[/tex]

[ tex ]\begin{eqnarray}
 \overset{*}{\triangleright}\!(uvx) & = & \triangleright\!(\overset{*}{\triangleright}\!(uv)x) \\
 & = & \triangleright\!(\overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)v)x) \\
 & = & \overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)vx)
 \end{eqnarray}[ /tex ]

So… shouldn’t everyone just install LaTeX by default? Shouldn’t all CMS ship with some math solution? Of course! :-)

Share
Tagged with:  

One Response to LaTeX

  1. karlraimundpopper says:

    Thanks! I’ve been trying to get [tex] to work for a while. I didn’t realize I had to clean out the *%&^ cache!

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">