adding template rendered callback and mathjax dependency