change some functions from img to mathjax