from the document body up into the preamble and deleting the unneeded \( and \). I can then save the tex file and compile to get a correct display in the PDF document. A workaround that complex isn’t much of a workaround.
I have tried putting the new command up in a RawNBConvert cell at the top of the notebook without the leading and trailing $ marks. That gets the new command into the tex file at the top of the document body, right after \maketitle. But to get it to work in the notebook I have to also define it in a markdown cell, and then LaTex throws an error at the second occurrence saying Command \partials already defined.
Searching finds many versions of this question being asked, yours among them, and sadly no working answers. Is there a trick I’m missing, or is this a true bug that has existed for years with no fix? Did you ever get something that works?
Apparently you only issue the \newcommand and \require statements once, Otherwise you get a LaTeX compile error.
So we have tricks that work in Jupyter notebook and Jupyter lab. They are unfortunately not the same tricks, so you cannot edit the same ipynb in both tools and get the same results. This sounds like a work-around (which is good) but not a full solution.
Is there a good place to document this so other folks will not have to dig it out in bits and pieces?
Do you mean something above didn’t work? But something else below did? Everything in your post was ‘following’ that line so it was unclear.
In other words, which one is ‘this’ that did work and the one or more that didn’t?