# Latex Problem

**URL:** <https://discourse.gohugo.io/t/latex-problem/7643>\
**Category:** support\
**Tags:** typesetting\
**Created:** [July 30, 2017, 6:52pm UTC](https://discourse.gohugo.io/t/latex-problem/7643 "2017-07-30T18:52:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbmaruf](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sbmaruf/32/3772_2.png) [@sbmaruf](https://discourse.gohugo.io/u/sbmaruf)\
**Post date:** [July 30, 2017, 6:52pm UTC](https://discourse.gohugo.io/t/latex-problem/7643/1 "2017-07-30T18:52:52Z")

</div>

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 \

![1](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/a/a93b363f1dc09ba865df86454dbe97ec273a9c23.png)

Note: This codes are successfully compiled in the live demo of MathJax site.

---

<div class="post-metadata">

**Author:** ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)\
**Post date:** [August 1, 2017, 2:56am UTC](https://discourse.gohugo.io/t/latex-problem/7643/2 "2017-08-01T02:56:14Z")

</div>

I’m not especially familiar with Mathjax, but have you read the docs and the “Issues with Markdown” page section:

> **[Supported Content Formats](https://gohugo.io/content-management/formats/#mathjax-with-hugo)**
>
> Markdown and Emacs Org-Mode have native support, and additional formats (e.g. Asciidoc) come via external helpers.
