Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteMathML ¶
WriteMathML serializes m as W3C MathML 2.0 (PHP Writer\MathML).
func WriteOMath ¶ added in v0.8.0
WriteOMath serializes m as an inline m:oMath (no oMathPara wrapper).
Types ¶
type Delimiter ¶ added in v0.8.0
type Delimiter struct {
Beg string
End string
Content Element
// contains filtered or unexported fields
}
Delimiter is m:d (matched fences).
func NewDelimiter ¶ added in v0.8.0
type Element ¶
type Element interface {
// contains filtered or unexported methods
}
Element is a node in an Office Math expression tree.
type Fraction ¶
type Fraction struct {
Numerator Element
Denominator Element
// contains filtered or unexported fields
}
Fraction is m:f (numerator / denominator).
func NewFraction ¶
type Group ¶
type Group struct {
Elements []Element
// contains filtered or unexported fields
}
Group is a sequence of child elements.
type Identifier ¶
type Identifier struct {
Value string
// contains filtered or unexported fields
}
Identifier is an OMML identifier (variable name).
func NewIdentifier ¶
func NewIdentifier(v string) *Identifier
type Math ¶
type Math struct {
Group
}
Math is an Office Math container (PHPOffice Math\Math).
func ParseLaTeX ¶ added in v0.8.0
ParseLaTeX converts a basic TeX math string into an Office Math tree. Supported constructs: identifiers, numbers, operators, {groups}, \frac{a}{b}, \sqrt{x}, x^{n}, x_{n}, and a small set of named symbols.
func ReadMathML ¶
ReadMathML parses a MathML document into a Math tree (PHP Reader\MathML).
type Numeric ¶
type Numeric struct {
Value string
// contains filtered or unexported fields
}
Numeric is a numeric literal.
func NewNumeric ¶
type Operator ¶
type Operator struct {
Value string
// contains filtered or unexported fields
}
Operator is a math operator such as +, −, =.
func NewOperator ¶
type Semantics ¶
Semantics wraps a MathML semantics node.
func NewSemantics ¶
func NewSemantics() *Semantics
func (*Semantics) AddAnnotation ¶
AddAnnotation stores a MathML annotation by encoding (PHP Semantics::addAnnotation).
func (*Semantics) Annotation ¶
Annotation returns the annotation for encoding, or "".
type Superscript ¶
Superscript is m:sSup.
func NewSuperscript ¶
func NewSuperscript(base, sup Element) *Superscript