UNPKG

latex-math

Version:

Parses LaTeX math strings—typically extracted from Markdown—and converts them into an abstract syntax tree (AST).

7 lines (6 loc) 251 B
import type * as Ast from "@unified-latex/unified-latex-types"; /** * Parse `str` into an AST. Parsing starts in math mode and a list of * nodes is returned (instead of a "root" node). */ export declare function parseMath(str: string): Ast.Node[];