Reputation: 31
While using jupyter notebook, how can I reference equations cross cells? I found a way to referencing, but cannot auto update the displayed number.
$a=b+c \tag{*}\label{eq1}$
The referencing code [1](#mjx-eqn-eq1)
displayed 1
. How can it display what's in \tag{}
automatically?
Upvotes: 3
Views: 2135
Reputation: 195
Since you create a markdown link and you name it 1
, this won't update. In general, Jupyter notebooks utilize MathJax (a subset of LaTeX) to render equations. The official jupyter documentation provides additional information and examples it is said, that:
Equation numbering and referencing will be available in a future version of the Jupyter notebook.
While this statement is quite old, it still seems still to be valid. As far as I can see, there are a couple of options to achieve numbering and referencing. Here is some examples:
In equation \eqref{eq:sample}, we find the value of an
interesting integral:
\begin{equation}
\int_0^\infty \frac{x^3}{e^x-1}\,dx = \frac{\pi^4}{15}
\label{eq:sample} \tag{a}
\end{equation}
Changing the tag will also update the reference. According documentation, using \label
only should result in an automatically numbered equation (as in LaTeX), however that does not work for me. Maybe I have to install another extension to get it working.
Upvotes: 2