Documentation
¶
Overview ¶
Package qjskatex is an extension for goldmark (github.com/yuin/goldmark) to perform server-side KaTeX rendering.
Note: the extension holds a sync.Map to cache rendered TeX for performance; it grows without bound.
markdown := goldmark.New( goldmark.WithExtensions(&qjskatex.Extension{}), )
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KindTex = gma.NewNodeKind("TeX")
KindTex indicates that a node is of kind qjskatex.Node.
Functions ¶
func ReportKatexNodes ¶ added in v0.3.0
ReportKatexNodes reports the number of KaTeX nodes seen by parsers using the Goldmark parser Context pc.
Types ¶
type Extension ¶
type Extension struct { // EnableWarnings allows KaTeX to print warnings to standard out. EnableWarnings bool // DisableCache disables the internal cache. DisableCache bool // contains filtered or unexported fields }
Extension extends Goldmark with KaTeX, implementing goldmark.Extender. The configuration cannot be changed after calling Extend, i.e., after passing it into goldmark.New.
Click to show internal directories.
Click to hide internal directories.