latex

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package latex renders a basic subset of LaTeX math as terminal-friendly Unicode text. It is a faithful port of upstream pi's tui/src/latex.ts: renderLatex returns the rendered string and true, or ("", false) when the expression contains unsupported or malformed syntax (pi's `undefined`).

The static lookup tables live in symbols.go, generated from the pinned upstream source by internal/latex/gentables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderLatex

func RenderLatex(source string, opts RenderLatexOptions) (string, bool)

RenderLatex renders a LaTeX math expression to Unicode text. The bool is false (upstream `undefined`) for unsupported or malformed input.

Types

type RenderLatexOptions

type RenderLatexOptions struct {
	// Display stacks fractions and operator limits vertically (default: false).
	Display bool
}

RenderLatexOptions mirrors upstream RenderLatexOptions.

Jump to

Keyboard shortcuts

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