Goldmark Katex is a Goldmark extension providing math and equation support through KaTeX.
goldmark.New(goldmark.WithExtensions(&Extender{})).Convert(src, dst)
Wrap inline math with a pair of single $
:
$A$
Wrap block math with a pair of double $
:
$$
A = \pi \times r^2
$$
Given the radius $r$ of a circle, the area $A$ is:
$$
A = \pi \times r^2
$$
And the circumference $C$ is:
$$
C = 2 \pi r
$$ |