d2latex

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: MPL-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// MaxInputBytes bounds the work and output that a single LaTeX label can
	// cause in the embedded MathJax renderer.
	MaxInputBytes = 4 << 10

	// MaxGroupNestingDepth prevents deeply nested TeX groups from exhausting
	// the Go stack in mathjax-go's recursive group parser.
	MaxGroupNestingDepth = 128
)

Variables

This section is empty.

Functions

func Measure

func Measure(s string) (width, height int, err error)

func Render

func Render(s string) (_ string, err error)

func ValidateInput added in v0.10.0

func ValidateInput(s string) error

ValidateInput applies D2's resource limits to a LaTeX label. Render and Measure both call it so compiler, WASM, and raw render-target paths share the same admission policy.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL