我想知道如何在Jupyter笔记本中为LaTeX \usepackage{}
。
最佳答案
不确定这是否是唯一的或什至最好的方法,但似乎可行。在与ipynb笔记本文件(“mynotebook.ipynb”)相同的目录中写入模板文件(“mytemplate.tplx”)。 mytemplate.tplx看起来像:
((*- extends 'article.tplx' -*))
((* block packages *))
((( super() )))
\usepackage{amsmath}
\usepackage{newtxtext,newtxmath}
((* endblock packages *))
通过执行以下操作来构建pdf LaTex文件:
jupyter nbconvert mynotebook.ipynb --to latex --template mytemplate.tplx
pdflatex mynotebook.tex
关于latex - Jupyter笔记本:如何为LaTeX\usepackage {},我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40448200/