Function
src/index.ts:447nerdamer.convertToLaTeX
nerdamer.convertToLaTeX(expression: string | ParserEntity, options?: TeXOptions): stringConverts an expression to TeX 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 intentionally uses the evaluated Converter path. |
Returns
string — TeX markup generated by the shared converter.
