# How to configure and use pandoc

**URL:** <https://discourse.gohugo.io/t/how-to-configure-and-use-pandoc/33140>\
**Category:** support\
**Tags:** typesetting\
**Created:** [May 29, 2021, 11:40am UTC](https://discourse.gohugo.io/t/how-to-configure-and-use-pandoc/33140 "2021-05-29T11:40:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xcchxxxt](https://avatars.discourse-cdn.com/v4/letter/x/e68b1a/32.png) [@xcchxxxt](https://discourse.gohugo.io/u/xcchxxxt)\
**Post date:** [May 29, 2021, 11:40am UTC](https://discourse.gohugo.io/t/how-to-configure-and-use-pandoc/33140/1 "2021-05-29T11:40:19Z")

</div>

Hello hugo community.

I’m unable to configure hugo to use pandoc as external helper. I went through the docs and only could find information about AsciiDoc.

My config.toml file:

```auto
baseURL = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "harbor"
[markup]
	defaultMarkdownHandler = "pandoc"

```

And my contents are in `content/posts/cont1.pdc` file. When running the server locally math equations and code blocks are not rendered properly. The code blocks have no syntax highlighting and math equations are rendered as `\(a\)`

Contents of the cont1.pdc are

```auto
---
title: "Cont2"
date: 2021-05-29T14:06:49+05:30
draft: true
---

This in my site, put page 2

Testing math $a$

```

What am I doing wrong?

Output of hugo env

```auto
hugo v0.83.1+extended linux/amd64 BuildDate=unknown
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.16.3"

```

---

<div class="post-metadata">

**Author:** ![xcchxxxt](https://avatars.discourse-cdn.com/v4/letter/x/e68b1a/32.png) [@xcchxxxt](https://discourse.gohugo.io/u/xcchxxxt)\
**Post date:** [May 29, 2021, 3:26pm UTC](https://discourse.gohugo.io/t/how-to-configure-and-use-pandoc/33140/2 "2021-05-29T15:26:58Z")

</div>

I seem to have found an issue.

The issue is with mathjax. When I use pandoc from terminal to convert a .md file to .html wiht `--mathjax` flag, same thing happens. I will dig into it some more.

---

<div class="post-metadata">

**Author:** ![xcchxxxt](https://avatars.discourse-cdn.com/v4/letter/x/e68b1a/32.png) [@xcchxxxt](https://discourse.gohugo.io/u/xcchxxxt)\
**Post date:** [May 29, 2021, 3:49pm UTC](https://discourse.gohugo.io/t/how-to-configure-and-use-pandoc/33140/3 "2021-05-29T15:49:52Z")

</div>

Found the issue. The `-s` or `--standalone` flag needs to be supplied before the `--mathjax` flag, else this issue will appear. I don’t know if the it supplied or not. Will have to look into that.

---

<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:38am UTC](https://discourse.gohugo.io/t/how-to-configure-and-use-pandoc/33140/4 "2024-05-01T10:38:10Z")

</div>

Split this topic on May 1, 2024, 10:38am UTC

A post was split to a new topic: [Rendering mathematical equations with the Pandoc content format](https://discourse.gohugo.io/t/rendering-mathematical-equations-with-the-pandoc-content-format/49572)
