Beautiful formulas in Urubu with MathJax
I love formulas, and I would use them more in my documents -- if only they were easier to enter. If you can relate to that, I have good news: at least in websites like those managed by Urubu, a great solution is now available.
MathJax supports a number of input formats, but the most interesting one is AsciiMath. AsciiMath is to formulas what Markdown is to HTML: an intuitive, human-friendly input language with almost zero overhead. For example, the following input:
`I = int_0^1 (h-l)(qx^p + (1-q)x) + l` `\ \ = (h-l)(q/(p+1) + (1-q)/2) + l`
is rendered in the browser as follows:
`I = int_0^1 (h-l)(qx^p + (1-q)x) + l`
`\ \ = (h-l)(q/(p+1) + (1-q)/2) + l`
Put this in the
<head> section of your base template, let template
inheritance peform its magic, and now you can use AsciiMath formulas in any
page in your Urubu website source.
There is one small caveat: the backtick delimiter
` used by AsciiMath is
also a Markdown delimiter. One solution is to customize the AsciiMath
delimiters, but I have not yet bothered to do so. Instead I use the Markdown
feature that text between block-level HTML tags is not processed. So I simply
put my formulas inside a
<p>...</p> pair. Works fine!