Hi there! I didn’t update my website (ataias.com.br) for about 4 months, nor did I update go and hugo. Yesterday I updated them while I was creating some topics and then I noticed mathjax stopped working. Another thing I did was adding enableEmoji = true
in the config.toml
of the template (hugo-hikari), but I tried to remove it once and MathJax didn’t come back to life.
When I configured MathJax, I just used the standard recommendation at https://gohugo.io/tutorials/mathjax/ . I think I added a couple things for other needs as time passed. What looks to me is that MathJax is simply not running, but I don’t know why. I am not sure which files are important to show in that case, but one important is my footer.html
, that I present below.
<footer>
{{ with .Site.Params.copyright }}
<small>{{ . | markdownify }}</small>
{{ end }}
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: { equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"] }
}
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function() {
// Fix <code> tags after MathJax finishes running. This is a
// hack to overcome a shortcoming of Markdown. Discussion at
// https://github.com/mojombo/jekyll/issues/199
var all = MathJax.Hub.getAllJax(), i;
for(i = 0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
// Autonumbering by mathjax
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
</script>
</footer>