markdown PDF nbconvert / Jupyter Notebook导出为PDF失败

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown PDF nbconvert / Jupyter Notebook导出为PDF失败相关的知识,希望对你有一定的参考价值。

If you are getting a `xetex-def`-related error when exporting to PDF, it may be caused by the fact `nbconvert` is using `xetex` by default and you don't have the `xetex-def` package properly installed.

One possible workaround is configuring the PDF exporter to use `pdflatex` instead of `xelatex`. You can do so by adding

```python
c.PDFExporter.latex_command = ['pdflatex', '{filename}']
```

to the `jupyter_notebook_config.py` file (enter `jupyter notebook --generate-config` in the commmand line to create the file if it does not exist).

以上是关于markdown PDF nbconvert / Jupyter Notebook导出为PDF失败的主要内容,如果未能解决你的问题,请参考以下文章

带有 ROOT 内核的 nbconvert 在降价中导出无名图

markdown 没有名为'nbconvert.exporters.base的模块

安装 MikTex、pandoc 和 nbconvert 后将 Jupyter Notebook 转换为 PDF 时出错

jupyter notebook 导出PDF报错:nbconvert failed: xelatex not found on PATH

jupyter notebook 导出PDF报错:nbconvert failed: xelatex not found on PATH

Jupyter 笔记本无法转换为 pdf 文件