moved mathjax handling to client side