mystmd
mystmd copied to clipboard
Math Macros from Inline Equations
Jupyter currently supports creating math macros like:
$\newcommand{\a}{\alpha}$
$\a$
However, mystmd requires these to be defined in the frontmatter. To be compatible with jupyter-lab and notebooks, we should likely support the existing markdown-math capabilities.
This would involve a transform on the node, interpreting the latex (maybe only if newcommand is found) and pulling out the macros. In our latex parser, we already have all this code and logic actually, so not a huge lift.
Note, these fail in github's renderer, vscode's notebook, but do work in google colab.
See also: jupyter-book/jupyterlab-myst#259