【发布时间】:2018-11-23 15:56:43
【问题描述】:
当我想将 Jupyter notebook 保存为 pdf 文件时,我收到以下错误:
nbconvert failed: PDF creating failed, captured latex output:
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018/W32TeX) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
! Undefined control sequence.
<*> .\notebook
.tex
?
! Emergency stop.
<*> .\notebook
.tex
No pages of output.
Transcript written on ?.
【问题讨论】:
-
你应该使用
./notebook.tex,而不是.\notebook.tex。 -
错误是由 Jupyter notebook 造成的。我刚刚在 Jupyter 中编写了一些 Python 代码,当我想将笔记本保存为 pdf 文件时,它会显示错误
-
@Werner 通知
! Undefined control sequence,后跟有问题的命令,在本例中为\notebook,是LaTeX 告诉用户他们没有定义被调用的命令的方式。 Jupyter 在运行 LaTeX 以创建 PDF 时显然会尝试调用所述命令,但失败了。这是因为 Jupyter 的作者没有包含生成 PDF 所需的这个基本的特定于 Jupter 的命令。可能是疏忽。 -
或者 TeXLive 或 MikTeX 中包含了一个与 Jupyter 相关的包,但 @xuan 尚未安装?
-
@TheSodesa:我明白;我对 LaTeX 有一些经验。不过,这似乎是一个错字……
标签: jupyter-notebook tex tex-live