# Rendering mathematical equations with the Pandoc content format

**URL:** <https://discourse.gohugo.io/t/rendering-mathematical-equations-with-the-pandoc-content-format/49572>\
**Category:** support\
**Tags:** typesetting\
**Created:** [May 1, 2024, 10:28am UTC](https://discourse.gohugo.io/t/rendering-mathematical-equations-with-the-pandoc-content-format/49572 "2024-05-01T10:28:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tytyvillus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tytyvillus/32/21961_2.png) [@tytyvillus](https://discourse.gohugo.io/u/tytyvillus)\
**Post date:** [May 1, 2024, 10:28am UTC](https://discourse.gohugo.io/t/rendering-mathematical-equations-with-the-pandoc-content-format/49572/1 "2024-05-01T10:28:08Z")

</div>

@jmooring

I’m having trouble rendering math with pandoc and this is what I stumbled upon. This is why I believe the `-s` flag is necessary.

If it is not necessary, then I apologise for the inconvenience and will try to track down my problem.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 1, 2024, 10:49am UTC](https://discourse.gohugo.io/t/rendering-mathematical-equations-with-the-pandoc-content-format/49572/2 "2024-05-01T10:49:25Z")

</div>

Here’s a quick example:

```plaintext
git clone --single-branch -b hugo-forum-topic-49572 https://github.com/jmooring/hugo-testing hugo-forum-topic-49572
cd hugo-forum-topic-49572
hugo server

```

Files of interest:

- layouts/partials/math.html
- layouts/\_default/baseof.html (lines 28-30)

Add `math = true` to front matter to enable MathJax rendering, or enable it for all pages in your site configuration:

```plaintext
[params]
math = true

```

---

<div class="post-metadata">

**Author:** ![tytyvillus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tytyvillus/32/21961_2.png) [@tytyvillus](https://discourse.gohugo.io/u/tytyvillus)\
**Post date:** [May 1, 2024, 12:51pm UTC](https://discourse.gohugo.io/t/rendering-mathematical-equations-with-the-pandoc-content-format/49572/3 "2024-05-01T12:51:07Z")

</div>

I’ll try this, thank you!

> ![](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/45/4214_2.png "jmooring") | [jmooring](https://discourse.gohugo.io/u/jmooring)  
> May 1 |
> 
> - | - |

Here’s a quick example:

```auto
git clone --single-branch -b hugo-forum-topic-49572 https://github.com/jmooring/hugo-testing hugo-forum-topic-49572
cd hugo-forum-topic-49572
hugo server

```

Files of interest:

- layouts/partials/math.html
- layouts/\_default/baseof.html (lines 28-30)

Add `math = true` to front matter to enable MathJax rendering, or enable it for all pages in your site configuration:

```auto
[params]
  math = true

```
