https://github.com/furqansoftware/goldmark-katex
Goldmark extension for math and equations
https://github.com/furqansoftware/goldmark-katex
goldmark goldmark-extension katex
Last synced: 3 months ago
JSON representation
Goldmark extension for math and equations
- Host: GitHub
- URL: https://github.com/furqansoftware/goldmark-katex
- Owner: FurqanSoftware
- License: mit
- Created: 2022-12-23T04:50:08.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-07-27T18:26:17.000Z (3 months ago)
- Last Synced: 2025-07-27T20:40:06.942Z (3 months ago)
- Topics: goldmark, goldmark-extension, katex
- Language: Go
- Homepage:
- Size: 165 KB
- Stars: 8
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Goldmark Katex
[](https://pkg.go.dev/github.com/FurqanSoftware/goldmark-katex)
Goldmark Katex is a [Goldmark](https://github.com/yuin/goldmark) extension providing math and equation support through [KaTeX](https://katex.org/).
## Usage
``` go
goldmark.New(goldmark.WithExtensions(&Extender{})).Convert(src, dst)
```Wrap inline math with a pair of single `$`:
```markdown
$A$
```Wrap block math with a pair of double `$`:
```markdown
$$
A = \pi \times r^2
$$
```## Example
```markdown
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
$$
```
## More Goldmark Extensions
- [D2](https://github.com/FurqanSoftware/goldmark-d2): diagram support through [D2](https://d2lang.com/)