package svg

Import Path
	github.com/d2lang/mathjax-go/internal/svg (on go.dev)

Dependency Relation
	imports 11 packages, and imported by one package


Package-Level Type Names (total 6)
/* sort by: | */
Attribute is one ordered XML attribute. Name string Value string
Element is an SVG element. Attribute and style insertion order is retained because LiteAdaptor serialization order is part of the frozen D2 oracle. Attributes []Attribute Children []Node Styles []Style Tag string Append appends children. Prepend inserts children before the existing children. RemoveAttr removes an attribute, retaining the order of all others. SetAttr adds or replaces an attribute without changing its position. SetStyle adds or replaces a CSS declaration without changing its position. String serializes e exactly once without indentation or a trailing newline. StylesAfterAttributes makes the serialized style attribute follow the ordinary attributes. LiteAdaptor preserves the order in which properties and attributes are installed, and a few MathJax wrappers (notably mtext's explicit-font path) install their style after standardSVGnode has added data-mml-node. *Element : Node *Element : expvar.Var *Element : fmt.Stringer func NewElement(tag string, children ...Node) *Element func (*Element).Append(children ...Node) *Element func (*Element).Prepend(children ...Node) *Element func (*Element).SetAttr(name, value string) *Element func (*Element).SetStyle(name, value string) *Element func (*Element).StylesAfterAttributes() *Element
Node is a deterministic in-memory SVG node. *Element Text func NewElement(tag string, children ...Node) *Element func (*Element).Append(children ...Node) *Element func (*Element).Prepend(children ...Node) *Element
Style is one ordered CSS declaration. Name string Value string
Text is escaped XML character data. Text : Node
Typesetter is the stateless MathJax 3.2.2 SVG output stage. Typeset lays out root and returns D2's bare SVG element. *Typesetter : github.com/d2lang/mathjax-go/internal/pipeline.Typesetter func NewTypesetter() *Typesetter
Package-Level Functions (total 2)
NewElement creates an element and appends children in order.
NewTypesetter constructs an SVG typesetter.