I followed the answer to this question and used the following to get equation numbers in a Jupyter notebook:
%%javascript
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
However, each time I update a markdown cell with an equation in it, the number increases by one or continues from the greatest number already in the notebook.
For example, the first equation might be numbered (3) if the cell was edited two times and it is the only equation in the notebook, or it might be numbered (5) if there are 4 equations in the notebook and the cell was edited once. If I close the notebook and open it again all the numbers are correct.
Is there a way to stop this from happening or to fix it without closing and opening the notebook?