package svg
Import Path
github.com/d2lang/mathjax-go/internal/svg (on go.dev)
Dependency Relation
imports 11 packages, and imported by one package
Involved Source Files
Package svg implements MathJax 3.2.2's SVG output jax.
link.go
maction.go
math_minwidth.go
menclose.go
menclose_notation.go
menclose_shapes.go
merror.go
mfenced.go
mfrac.go
mglyph.go
mmultiscripts.go
mo.go
mpadded.go
mphantom.go
ms.go
msqrt.go
msubsup.go
mtable.go
mtd.go
mtr.go
munderover.go
Copyright 2017-2022 The MathJax Consortium
SPDX-License-Identifier: Apache-2.0
semantics.go
stretch.go
style.go
texatom.go
texclass.go
typesetter.go
wrapper.go
Package-Level Type Names (total 6)
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
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.
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |