LoginSignup
7
5

More than 3 years have passed since last update.

[Jupyter Notebook]Markdown の数式に数式番号を振って、参照する

Last updated at Posted at 2020-11-01

はじめに

Jupyter NotebookのMarkdownで数式番号を振って、参照する方法を記します。数式の書き方は、よく忘れるので、備忘録です。qiitaの数式入力ではうまくいかないのであしからず。

数式番号の振り方

調べる限り、Jupyter NotebookのMarkdownで、数式番号を自動で振る機能はないようです。\labelと\tagを使って数式番号を振ります。参照は、文中の$(\ref{label_symbol})$で\labelの記号を記入します。注意点は、同じコードブロック内でしか機能しません。

$$数式$$を使う

$$
\frac{\partial u}{\partial t} = \alpha \nabla ^2 u \label{a}\tag{1}
$$
$(\ref{a})$は熱拡散方程式です。

numbering1.png

\begin{equation}数式\end{equation}を使う

\begin{equation}
\frac{\partial u}{\partial t} = \alpha \nabla ^2 u \label{b}\tag{2}
\end{equation}
$(\ref{b})$も熱拡散方程式です。

numbering2.png

7
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5