UNPKG

latex-math

Version:

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

17 lines (16 loc) 644 B
import type * as Ast from "@unified-latex/unified-latex-types"; /** * Parse `str` to an AST with minimal processing. E.g., macro * arguments are not attached to macros, etc. when parsed with this * function. */ export declare function parseMinimal(str: string): Ast.Root; /** * Parse `str` to an AST with minimal processing. E.g., macro * arguments are not attached to macros, etc. when parsed with this * function. * * The parsing assumes a math-mode context, so, for example, `^` and `_` are * parsed as macros (even though arguments are not attached to them). */ export declare function parseMathMinimal(str: string): Ast.Node[];