Has anyone figured out how to use a LaTeX package (like cancel) in a markdown cell?

So the trick of adding hidden macros at the top of the document is useful, and works on someone else’s system. A how to document is probably in order. I’m just keeping a text file of the macros I frequently use and pasting it into the top cell of each new notebook. That works but isn’t exactly ideal. I would like to tell JN to load the macros when creating a new notebook without the manual copy and paste. That might be something like a template.

The trick does not work in JupyterLab. The typeset equations displayed in JL do not correctly display the macros.

In JN the trick exports correctly to LaTeX but not to HTML. I haven’t tried the other download options.