<!-- Sema documentation — latex
     Sema is a new AI-native, neurosymbolic programming language most models
     have not been trained on. Full corpus: https://sema.49.12.246.95.sslip.io/llms-full.txt
     Install language support: https://sema.49.12.246.95.sslip.io/install-skill/ -->

# latex

> Native bounded LaTeX rendering operations.

> Generated by `sema doc` from the compiler's authoritative native-signature registry.

# 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

## `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`

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))`
