Making mathjax and footnotes work