# Mathjax equation doesn't render with jekyll

**URL:** <https://talk.jekyllrb.com/t/mathjax-equation-doesnt-render-with-jekyll/6753>\
**Category:** Help\
**Created:** [November 30, 2021, 1:46pm UTC](https://talk.jekyllrb.com/t/mathjax-equation-doesnt-render-with-jekyll/6753 "2021-11-30T13:46:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sieste](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sieste/32/4164_2.png) [@sieste](https://talk.jekyllrb.com/u/sieste)\
**Post date:** [November 30, 2021, 1:46pm UTC](https://talk.jekyllrb.com/t/mathjax-equation-doesnt-render-with-jekyll/6753/1 "2021-11-30T13:46:26Z")

</div>

In general mathjax and jekyll work together just fine, but I have this one equation that doesn’t want to render and I suspect it has to do with jekyll. The following minimal html file (opened in the browser, without involving jekyll) renders the equation correctly:

```auto
<html><body>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

\begin{equation}
(A)'_{i,j} = A_{j,i}
\end{equation}

```

But the following minimal index.md file, in an otherwise empty directory, served with `jekyll s`, doesn’t render the same equation and only shows the latex source code instead:

```auto
---
---

<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

\begin{equation}
(A)'_{i,j} = A_{j,i}
\end{equation}

```

Can anyone reproduce this issue? If so, any ideas how to resolve this? I think it has to do with the parentheses or the apostrophe, because the equation `A_{i,j} = A_{j,i}` is rendered correctly.

---

<div class="post-metadata">

**Author:** ![Devnoob](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/devnoob/32/4848_2.png) [@Devnoob](https://talk.jekyllrb.com/u/Devnoob)\
**Post date:** [December 1, 2021, 9:31pm UTC](https://talk.jekyllrb.com/t/mathjax-equation-doesnt-render-with-jekyll/6753/2 "2021-12-01T21:31:27Z")

</div>

Enclose all the mathematics markup between `{::nomarkdown}` and `{:/}`. This will prevent kramdown from enclosing the content between `<p>` and `</p>` tags, which seems to be causing the problem.

```auto
{::nomarkdown}  
\begin{equation}
(A)'_{i,j} = A_{j,i}
\end{equation}
{:/}  

```

Hope it helps 🙂
