我想知道如何在Jupyter Notebook中为LaTeX使用\usepackage{}
。
我想知道如何在Jupyter Notebook中为LaTeX使用\usepackage{}
。
不确定这是唯一的或者最好的方法,但是它似乎能够工作。在与ipynb笔记本文件(“mynotebook.ipynb”)相同的目录下编写模板文件(“mytemplate.tplx”)。mytemplate.tplx 文件应该如下:
((*- extends 'article.tplx' -*))
((* block packages *))
((( super() )))
\usepackage{amsmath}
\usepackage{newtxtext,newtxmath}
((* endblock packages *))
jupyter nbconvert mynotebook.ipynb --to latex --template mytemplate.tplx
pdflatex mynotebook.tex
jupyter nbconvert --to latex
来运行此解决方案,该命令用于导出.tex文件。 - Michael Delgado