Since moving my blog to Django and Wagtail, I have been adding new features to it on a regular basis. The most recent addition is the new ability to typeset mathematical equations and formulas. To be fair, all the heavy lifting is courtesy of the MathJax project. These guys did an amazing job - they implemented, in JavaScript, support for LaTeX syntax. Quite astonishing, if you ask me. Very easy to use, assuming you know LaTeX. Works in any modern browser, including on mobile, i.e. Android or iPhone. See for yourself:

$$\LaTeX \, \text{equations for the masses!}$$ \begin{align*} ax^2 + bx + c= 0 & \quad\text{Remember the good old school days?} \\ E=mc^2 & \quad\text{Looks familiar, doesn't it?} \\ \int_e^\pi\! \cos{\sqrt[3.2]{\log_{2\pi}x_1}} \,\mathrm{d}x_1 & \quad \text{Something a bit fancier} \end{align*}

More complicated layouts can be typeset as well, of course, all free of charge (other than the CPU cycles of the viewer's computer):

$$\left\langle \begin{matrix} 1 & 2 & 3\\ a & b & c \\ t^x & t^y & t^z \\ \sqrt{-1} & \sqrt{-7\times e} & \sqrt{-20/\pi} \end{matrix} \right\rangle$$

I remember, that some time ago displaying neatly set mathematical equations in a browser seemed like an impossible dream to achieve. There were next to zero built in support for math, and alternative solutions meant using pictures most of the time. How quickly, and, occasionally, positively, things change nowadays!

By the way, this is how math looks like in a mobile browser:

Categories: None |