Issue: When using a non-modified hugo template with KaTeX, the math equations do not render properly.
How to replicate the issue: KaTeX can be imported following this guide. The latest KaTex npm can be found on jsdelivr
A full list of features of KaTeX can be seen from the official website (Supported Functions · KaTeX) and they render properly.
The markdown below:
---
title: "My First Post"
date: 2022-10-17T22:45:36+11:00
draft: false
math: true
---
This is a post about latex.
An equation:
$$\int_{-\infty}^{\infty} e^{-x^2} dx$$. <!-- works -->
inline example: $\sum_{i = 0}^N 2i = y$ <!-- works -->
One overbrace:
$${a}^{b} - \overbrace{c}^{d}$$ <!-- works-->
Two overbraces:
$$\underbrace{a}_{b} - \underbrace{c}_{d}$$ <!--does not work -->
None of these below works properly:
$$
\begin{aligned}
equation &= 16 \\
other &= 26 + 13
\end{aligned}
$$
$$
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}
$$
Produces the following:
Neither matrices nor aligned environments work properly. Is this because of Goldmark rendering?
I’m using the binario template (can’t post links as a new user sorry) and am happy to share any other files when requested.
Thank you for your answers in advance.