IPython display(Math()) in an initial code cell works fine to load my LaTeX macros from a file, and they then remain active throughout the notebook. But I’m having trouble with this macro:
\newcommand{\inv}{^{-1}}
Unlike the other macros in my macro file, this one does not end up available in later cells. However, if I put the same definition
$\newcommand{\inv}{^{-1}}$
in a Markdown cell right after that initial macro-loading code cell, then my \inv command does remain available throughout the rest of the notebook.
(I’m running jupyterlab 4.5.0 with SageMath 10.7.)
Any ideas as to what makes this macro different? Thanks.