San*_*ero 5 python latex jupyter jupyter-notebook
我开始在 jupyter notebook 上使用 python,问题是打印出来的和标准的 LaTeX 我的单元格不一样:
%%latex
\begin{center}
$(a+b)^{2} = a^{2}+2ab+b^{2}$
\end{center}
Run Code Online (Sandbox Code Playgroud)
来自jupyter 文档:
支持的 Latex 子集取决于客户端的实现。在 Jupyter Notebook 中,这个魔法仅渲染 MathJax 定义的 Latex 子 集。
您可以使用 markdown 来显示您的公式:使用 single$表示乳胶,或使用 double$$将其居中。您需要将单元格格式设置为markdown而不是代码
您的细胞将成为以下两条线之一:
$$(a+b)^{2} = a^{2}+2ab+b^{2}$$
$(a+b)^{2} = a^{2}+2ab+b^{2}$
Run Code Online (Sandbox Code Playgroud)
您必须运行单元格才能显示 Markdown。