Saturday, January 21, 2012

Typesetting math

This post is really just a note to myself about something I need to investigate more. The problem I'd like to solve is how to format mathematical equations for the web. You can see the caveman approach on most of my posts here, like this one.

I just make a table in html

<div style="overflow-x: scroll;">
<table bgcolor="#ffffb0" border="0" padding="4">
<tbody>
<tr><td><pre style="font-family: monaco;">

I like the background color, and vary it depending on whether the content is code or output from a program.

It might be nice to have something prettier. So, looking around, I happened across MathJax, and also this post which explains how to use it on Blogger.

Here's a screenshot of the example:

The method used in the post is to load the script from the mathjax server, but I think what I'm probably supposed to do is direct people to resource on my (nonexistent) server. OTOH, they link to the post on the mathjax site.

What I'll probably do is just look into how to use LateX and then post screenshots.

Any thoughts?