Function

nerdamer.convertToTeX

src/index.ts:538
nerdamer.convertToTeX(expression: string | ParserEntity, options?: TeXOptions): string

Converts an expression to TeX math markup without requiring the caller to construct a converter. String input follows the legacy source-preserving path before symbolic normalization; entity input keeps ordinary structured Converter behavior.

Parameters

NameTypeDescription
expressionstring | ParserEntityParser entity or notation string to format.
optionsTeXOptionsConverter formatting options. The legacy 'decimal', 'decimals', and decimals: true spellings are normalized to the 2.0 decimal: true option. Decimal conversion uses the evaluated Converter path.

Returns

string — TeX math markup generated by the shared converter.