math

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindDisplayMath = gast.NewNodeKind("DisplayMath")

KindDisplayMath is the NodeKind for DisplayMath.

View Source
var KindInlineMath = gast.NewNodeKind("InlineMath")

KindInlineMath is the NodeKind for InlineMath.

Functions

func NewBlockParser

func NewBlockParser() parser.BlockParser

NewBlockParser returns a new display math block parser.

func NewInlineParser

func NewInlineParser() parser.InlineParser

NewInlineParser returns a new inline math parser.

func NewRenderer

func NewRenderer() renderer.NodeRenderer

NewRenderer returns a new math renderer.

Types

type DisplayMath

type DisplayMath struct {
	gast.BaseBlock
	Expression string
}

DisplayMath is a block AST node for $$...$$ math expressions.

func (*DisplayMath) Dump

func (n *DisplayMath) Dump(source []byte, level int)

Dump implements ast.Node.Dump.

func (*DisplayMath) Kind

func (n *DisplayMath) Kind() gast.NodeKind

Kind implements ast.Node.Kind.

type Extension

type Extension struct{}

Extension is a goldmark extension that adds math expression support. Inline: $expression$ -> <span class="sarde-math math-inline"> Display: $$expression$$ -> <div class="sarde-math math-display">

func (*Extension) Extend

func (e *Extension) Extend(m goldmark.Markdown)

Extend implements goldmark.Extender.

type InlineMath

type InlineMath struct {
	gast.BaseInline
	Expression string
}

InlineMath is an inline AST node for $...$ math expressions.

func (*InlineMath) Dump

func (n *InlineMath) Dump(source []byte, level int)

Dump implements ast.Node.Dump.

func (*InlineMath) Kind

func (n *InlineMath) Kind() gast.NodeKind

Kind implements ast.Node.Kind.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL