Jupyter notebook: How to \usepackage{} in for LaTeX

我想知道如何在Jupyter笔记本中使用usepackage{}作为LaTeX。


Not sure this is the only or even best way of doing it, but it seems to work. Write a template file ("mytemplate.tplx") in the same directory as your ipynb notebook file ("mynotebook.ipynb"). mytemplate.tplx looks like:

((*- extends 'article.tplx' -*))

((* block packages *))
((( super() )))
usepackage{amsmath}
usepackage{newtxtext,newtxmath}
((* endblock packages *))

Build your pdf LaTex file by executing the following:

jupyter nbconvert mynotebook.ipynb --to latex --template mytemplate.tplx
pdflatex mynotebook.tex
链接地址: http://www.djcxy.com/p/37030.html

上一篇: .NETPlatform与.NETStandard

下一篇: Jupyter notebook:如何为LaTeX使用\ usepackage {}