markdown-it-texmath icon indicating copy to clipboard operation
markdown-it-texmath copied to clipboard

Add support for persistent macros between renders

Open dahlia opened this issue 6 months ago • 0 comments
trafficstars

This patch adds support for persisting user-defined macros between renders in markdown-it-texmath.

To persist macros, pass an env object to the .render() method:

const macros = { "\\RR": "\\mathbb{R}" };
texmath.render(input, { macros });

Macros defined during rendering will update the macros object, allowing reuse in subsequent renders.

dahlia avatar May 06 '25 03:05 dahlia