Home

Awesome

Goldmark Katex

Go Reference

Goldmark Katex is a Goldmark extension providing math and equation support through KaTeX.

Usage

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
$$

Example

<table> <tr> <td>
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
$$
</td> <td>

</td> </tr> </table>

More Goldmark Extensions