modify the mathjax function