Open mpacer opened 7 years ago
My guess is that MathJax either doesn't know or doesn't handle the fact that the previous instance of the equation is gone and there there is a latex error assigning a duplicate label the second time. You will see probably related issues if you enable equation numbering, where the numbers are correct on first load, but each render of a cell increments equation numbers, rather than taking into account their location in the document.
There may be something we can do to tell mathjax explicitly that the equations have been removed, or trigger a more expensive re-process of the entire document on every render (or explicitly).
Just checked and it still seems to be an issue with Notebook 7 / JupyterLab 4:
https://github.com/jupyter/notebook/assets/591645/80fa8f50-b15d-46e6-a1fb-3bf666833d4d
If I open a notebook with the following content
It is first rendered as:
But then if it is rerendered (i.e., going into editing mode and then rerendering the cell) it is then rendered as:
If one refreshes the page it returns to the first state (even with a soft refresh).
@gnestor @takluyver @carreau @minrk Why would there be a difference between the first time something is rendered and the second from a MathJax perspective? I know there is weirdness around this kind of thing for numbering equations, but as long as we aren't running into that I have no idea where to start thinking about solving this bug.