markdown-it-texmath
markdown-it-texmath copied to clipboard
Add support for persistent macros between renders
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.