Generated by
sema docfrom the compiler’s authoritative native-signature registry.
latex (native)
Section titled “latex (native)”Bounded console LaTeX math rendering via the pinned txm 0.1.4 layout engine — bring it in with import latex; both members are pure.
rendering
Section titled “rendering”latex.render(source) -> str
Section titled “latex.render(source) -> str”Render a LaTeX math expression to a newline-terminated multi-line Unicode block with the pinned txm 0.1.4 layout engine.
- domain: UTF-8 LaTeX math source up to 4,096 bytes inside the pinned txm 0.1.4 grammar (fractions, roots, sums, integrals, limits, binomials, matrix/pmatrix/bmatrix, sub/superscripts, Greek and operator glyphs); parse or render failures are a typed LatexError carrying the renderer’s message; rendered output is bounded at 64 KiB
- shape: scalar
- returns:
str - example:
latex.render("E = mc^2")
latex.of(value) -> str
Section titled “latex.of(value) -> str”Serialize a Sema value to LaTeX math source (\frac for rationals and quotients, pmatrix for vectors/matrices, x^{n}/\sqrt/\sin for symbolic equation bodies); latex.render(latex.of(x)) is the pretty-print path.
- domain: exact int, canonical rational, finite float, complex scalar, numeric list/tuple (row vector or equal-length rows), rank-1/2 f64/complex Tensor, or an equation value lowered to its symbolic Sym form; output is bounded at 4,096 bytes and every unsupported kind is a typed LatexError naming the kind
- shape: scalar
- returns:
str - example:
latex.of(QQ(1, 2))