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.
Click to show internal directories.
Click to hide internal directories.