Help us shape the future of Go! Take the 2026 Go Developer Survey

mathjax

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindInlineMath = ast.NewNodeKind("InlineMath")
View Source
var KindMathBlock = ast.NewNodeKind("MathBLock")
View Source
var MathJax = &mathjax{
	inlineStartDelim: `\(`,
	inlineEndDelim:   `\)`,
	blockStartDelim:  `\[`,
	blockEndDelim:    `\]`,
}

Functions

func NewInlineMathParser

func NewInlineMathParser() parser.InlineParser

func NewInlineMathRenderer

func NewInlineMathRenderer(start, end string) renderer.NodeRenderer

func NewMathBlockRenderer

func NewMathBlockRenderer(start, end string) renderer.NodeRenderer

func NewMathCodeBlockTransformer

func NewMathCodeBlockTransformer() parser.ASTTransformer

func NewMathJax

func NewMathJax(opts ...Option) *mathjax

func NewMathJaxBlockParser

func NewMathJaxBlockParser() parser.BlockParser

Types

type InlineMath

type InlineMath struct {
	ast.BaseInline
}

func NewInlineMath

func NewInlineMath() *InlineMath

func (*InlineMath) Dump

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

func (*InlineMath) Inline

func (n *InlineMath) Inline()

func (*InlineMath) IsBlank

func (n *InlineMath) IsBlank(source []byte) bool

func (*InlineMath) Kind

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

type InlineMathRenderer

type InlineMathRenderer struct {
	// contains filtered or unexported fields
}

func (*InlineMathRenderer) RegisterFuncs

type MathBlock

type MathBlock struct {
	ast.BaseBlock
}

func NewMathBlock

func NewMathBlock() *MathBlock

func (*MathBlock) Dump

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

func (*MathBlock) IsRaw

func (n *MathBlock) IsRaw() bool

func (*MathBlock) Kind

func (n *MathBlock) Kind() ast.NodeKind

type MathBlockRenderer

type MathBlockRenderer struct {
	// contains filtered or unexported fields
}

func (*MathBlockRenderer) RegisterFuncs

type Option

type Option interface {
	SetOption(e *mathjax)
}

func WithBlockDelim

func WithBlockDelim(start string, end string) Option

func WithInlineDelim

func WithInlineDelim(start string, end string) Option

Jump to

Keyboard shortcuts

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