Source File
texatom.go
Belonging Package
github.com/d2lang/mathjax-go/internal/svg
// Copyright 2017-2022 The MathJax Consortium// SPDX-License-Identifier: Apache-2.0// This file is a Go translation and modification of MathJax 3.2.2.package svgimport ()func ( *wrapper) ( *layout.BBox) {.computeChildrenBBox()if len(.children) != 0 {if := .children[0].bbox.IC; != 0 {.IC =}}if effectiveTeXClass(.node) == mml.TeXClassVCenter {:= (.H+.D)/2 + .renderer.params.Axis - .H.H +=.D -=}}func ( *wrapper) ( *Element) {:= .standardSVG().addChildren():= effectiveTeXClass(.node)if >= mml.TeXClassOrd && int() < len(mml.TeXClassNames) {.SetAttr("data-mjx-texclass", mml.TeXClassNames[])}if == mml.TeXClassVCenter && len(.children) != 0 {:= .children[0].getBBox():= (.H+.D)/2 + .renderer.params.Axis - .H.SetAttr("transform", "translate(0 "+fixed()+")")}}
![]() |
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. |