Source File
merror.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 svg// errorToSVG ports SVGmerror.toSVG. In addition to its content, merror// carries a yellow background rectangle and exposes the TeX parser's message// through data-mjx-error.func ( *wrapper) ( *Element) {:= .standardSVG()if := stringAttributeExplicit(.node, "data-mjx-error"); != "" {.SetAttr("data-mjx-error", )}:= .getBBox().Append(NewElement("rect").SetAttr("data-background", "true").SetAttr("width", fixed(.W)).SetAttr("height", fixed(.H+.D)).SetAttr("y", fixed(-.D)))if := stringAttribute(.node, "title", ""); != "" {.Append(NewElement("title", Text()))}.addChildren()}
![]() |
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. |