This patch enables users to define page level and global katex macro, so that they don't have to type long but frequent math expression over and over again.
$$
\gdef \greetings#1{\text{Welcome to my site, #1!}}
\gdef \degree{^\circ}
$$
$$\greetings{World}$$
A $90 \degree$ counter-clockwise rotation.
The null space of a matrix is $\Null(A) = \{\vec{x}\in \R^n : A\vec{x}=\vec{0}\}$
A cyclic subgroup is $\cycl{g} = \{ g^k | k \in \Z \}$.
This patch enables users to define page level and global katex macro, so that they don't have to type long but frequent math expression over and over again.
Example:
Global macros in
pagic.config.ts
Some additional macros in
index.md
result: