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.