Function
src/index.ts:538nerdamer.convertToTeX
nerdamer.convertToTeX(expression: string | ParserEntity, options?: TeXOptions): stringConverts 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
| Name | Type | Description |
|---|---|---|
expression | string | ParserEntity | Parser entity or notation string to format. |
options | TeXOptions | Converter 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.
