篇首语:本文由小常识网(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失败的主要内容,如果未能解决你的问题,请参考以下文章