mathjax issue initializing inside template tag