notebook
notebook copied to clipboard
notebook renders equations with labels correctly on first execution, but not on reexecution
trafficstars
If I open a notebook with the following content
## Important Part
It is well known <cite data-cite="Atr03">(?)</cite> that Spice grows on the planet Dune. Test
some maths, for example $e^{\pi i} + 3 \delta$. Or maybe an
equation on a separate line:
$$g(x) = \int_0^\infty f(x) dx$$
or on multiple, aligned lines:
\begin{eqnarray} \\
g(x) &=& \int_0^\infty f(x) dx \\
&=& \ldots
\end{eqnarray}
The area of a circle and volume of a sphere are given as
\begin{equation} \label{circarea}
A(r) = \pi r^2.
\end{equation}
\begin{equation} \label{spherevol}
V(r) = \frac{4}{3} \pi r^3
\end{equation}
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.