I am new to hugo.
I have added MathJax in my site using the following code,
{{ if or (and (isset .Site.Params "math") (eq .Site.Params.math true)) (and (isset .Params "math") (eq .Params.math true)) }}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });
</script>
<script async src="{{ .Site.BaseURL }}js/MathJax/MathJax.js?config=TeX-AMS_CHTML"></script>
{{ end }}
Then in my *.md file, I write like this,
$ a = a_{0} \\ a_{15} \\ a_{16} $
$ a = a_{0} $
$ a = a_{0} \\ a_{1} $
$ a = a_0 a_1 a_2 a_3 $
$ a = a_0 \\ a_1 \\ a_2 \\ a_3 $
$ \frac{1}{2}_{2}^{3} $
which gives the following output.
Why the code haven’t compiled?
1.When multiple a_{} notation is used.
2. Why there is no new line when using \
Note: This codes are successfully compiled in the live demo of MathJax site.