process escapes for mathjax (via #1500)

Signed-off-by: Chris Warrick <kwpolska@gmail.com>