我正在尝试在 Jupyter 笔记本中格式化数学方程。具体来说,我想在有序列表中添加嵌入文本中的数学方程,类似于 egin{enumerate} 在 Latex 中的工作方式。据我了解,我应该使用 html 进行格式化,但在 MathJax 中编写数学。
这是我尝试过的示例。
<ol type="a">
<li> It should look something like this $b= \begin{pmatrix} 2\\ 2\\ -1 \end{pmatrix}$<\li>
<li> and be able to start an equation in between as well
$$
A= \begin{pmatrix}\epsilon & 1\\ 1 & 1\end{pmatrix}
$$
</ol>
您只需要使用结合两件事的降价单元:
不需要您已包含的 HTML。
您可以通过 Jupyter
.ipynb
文件中的 Markdown 单元中的以下文本来实现您的既定目标:
1. It should look something like this $b= \begin{pmatrix} 2\\ 2\\ -1 \end{pmatrix}$
1. and be able to start an equation in between as well:
$$
A= \begin{pmatrix}\epsilon & 1\\ 1 & 1\end{pmatrix}
$$
幸运的是,使用居中方程不会中断编号,因此您甚至可以继续添加到列表中。我发现使用其他一些格式会将内容踢出并且不继续编号。然而,现在这有效:
1. It should look something like this $b= \begin{pmatrix} 2\\ 2\\ -1 \end{pmatrix}$
1. and be able to start an equation in between as well:
$$
A= \begin{pmatrix}\epsilon & 1\\ 1 & 1\end{pmatrix}
$$
1. It will even continue the numbering correctly after that $b= \begin{pmatrix} 201\\ 84\\ -19 \end{pmatrix}$