# Is there any way to exclude katex section to be loaded by markdown?

When I try to insert inline equation in hugo:
(1+1=2) doesn’t work, and $$1+1=2$$ work, because of markdown renderer, I guess.
It’s not a big problem when I’m writing simple equation, but when it come’s to this:

\begin{align}{}_{n}A_{m}&=\int^{\beta}_\alpha (x-\alpha)^n(\beta-x)^mdx\\&=\frac{n}{m+1}\int^{\beta}_\alpha (x-\alpha)^{n-1}(\beta-x)^{m+1}dx\\&=\frac{n}{m+1}{}_{n-1}A_{m+1} \end{align}


It is well loaded when there ISN’T markdown renderer BEFORE rendering katex. But when markdown renderer work BEFORE rendering katex, it doesn’t work, and I can’t guess quickly what I should rewrite to work this in hugo.

It’s a serious problem for me, because I use two platform to write equations: Ghost&Notion, and Hugo.
In Ghost&Notion(Or latex or anything else), since markdown renderer don’t work BEFORE katex, newline feed is \\(it’s a simple example) and everything is okay.
But in Hugo, since markdown renderer work BEFORE katex, newline feed is \\\\ and it is conflicting with Ghost&Notion.

I’m searching way to exclude namely ‘katex section’, or ‘equation section’ to be rendered by markdown, but since I’m do not well know the structure of hugo, I can’t revise it easily. Wait for some helpful advise from everyone.

Ah, I’ve already know that I can manually exclude my equation section by defining shortcode, such as ‘rawhtml’.
Ex)

{{< rawhtml >}}
\begin{align}{}_{n}A_{m}&=\int^{\beta}_\alpha (x-\alpha)^n(\beta-x)^mdx\\&=\frac{n}{m+1}\int^{\beta}_\alpha (x-\alpha)^{n-1}(\beta-x)^{m+1}dx\\&=\frac{n}{m+1}{}_{n-1}A_{m+1} \end{align}
{{< /rawhtml >}}


But it is not a automated solution, and is very annoying to me since I’m parallelly using both of Ghost&Notion and Hugo blog. I want some automated solution, if possible.

It is very suprising that netlify can make page by pandoc without any manual setting by me!
It wasn’t totally I expected, but it is very happy news to me.

But I guess I can’t use tableOfContents and code highlighting with pandoc(without further setting), which is sad news… I guess I should watch out for solution for those.

I use a renderhook

from index.html

latex
\begin{align}{}_{n}A_{m}&=\int^{\beta}_\alpha (x-\alpha)^n(\beta-x)^mdx\\&=\frac{n}{m+1}\int^{\beta}_\alpha (x-\alpha)^{n-1}(\beta-x)^{m+1}dx\\&=\frac{n}{m+1}{}_{n-1}A_{m+1} \end{align}



and
layouts/_default/_markup/render-codeblock-latex.html

$${{.Inner}}$$

you need a new version of HUGO