I just said what I said and it was wrong
Or was taken wrong

Last month, I got an email from reader and occasional commenter Alan Schmitt who told me that my posts with equations didn’t display well in Instapaper. The problem was that an equation like1

[\Phi(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^x e^{-\xi^2/2} d\xi]

would appear in Instapaper as

[math]

which, while true, isn’t very informative.

I dashed off a quick reply with a promise to look into fixing it. The promise was delayed by, you know, things and stuff, but the fix—to the extent I can make one—is finally in place. The version of PHP Markdown Extra Math (PHPMEM) in the GitHub repository has the changes.

as the placeholder. It’s certainly not as good as the rendered equation, but it’s somewhat readable if you speak LaTeX. Simpler equations, like [E = mc^2], are easily readable in their raw LaTeX form: [E = mc^2].

It makes perfect sense that the placeholder text appears in Instapaper instead of the rendered equation. Instapaper’s mission is to strip away a page’s extra fluff and display the text content in a pleasing way. MathJax, being written in JavaScript, is taken to be part of the fluff.

Which is unfortunate, because the formatting of an equation really is part of its content—reading it as LaTeX code just isn’t the same. And pages with equations often require longer reading time and more thoughtful consideration, which is what Instapaper is all about.

I’ve emailed Marco Arment about this and asked if there was a way he could get Instapaper to handle MathJax. It strikes me as being quite difficult. Not only would Instapaper have to incorporate MathJax itself, it would also have to read the site’s MathJax configuration file to understand how the equation code is to be interpreted.

I’m not holding my breath, but I am holding out hope. Marco is an extraordinarily smart programmer.

In case you’ve forgotten your statistics, this is the standard normal cumulative distribution function, one of those nasty integrals that can’t be done analytically. ↩︎