jupyter导出中文pdf


参考 https://nbconvert.readthedocs.io/en/latest/customizing.html

使用jupyter导出pdf时,中文会不显示,这是因为nbconvert的默认模板不支持中文字符,需要对该模板进行修改。

首先,使用

jupyter --path

依次查看其中data的目录列表,看有没有../share/jupyter/nbconvert路径,若有,则进入到

../share/jupyter/nbconvert/templates/latex/

找到index.tex.j2, 修改documentclassctex

\documentclass[11pt]{ctex}

然后重新导出即可。


文章作者: Hiper
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Hiper !
  目录