Documentation
¶
Overview ¶
Package math is CORE-08's BASELINE math battery: a self-contained goldmark.Option that renders Pandoc/Marp-style `$…$` (inline) and `$$…$$` (block) LaTeX. Common math becomes native MathML via the vendored latex2mathml; heavy constructs the construct-detection predicate flags (detect.go) degrade to a PNG-only raster <img> via go-latex/latex.
No reusable goldmark-integration library exists for this layer (unlike emoji or chroma highlighting), so the $-trigger InlineParser, the custom math AST node, and the NodeRenderer are a genuine from-scratch build, shaped after the bespoke inline parsers in chase/markdown.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var KindMath = ast.NewNodeKind("Math")
KindMath is the NodeKind for mathNode.
Functions ¶
func Option ¶
Option returns the composable goldmark.Option for the math battery, honoring press.Options.MathMode: "" (or "mathml") enables the battery; "off" disables it entirely (a no-op Option that never registers the $-parser, so `$x$` stays literal text). TRD 03-09 folds this into the one-parse engine's pressExtraOpts.
Types ¶
This section is empty.