我正在尝试将Jupyter Notebook转换为pdf,但它向我抛出了这个错误:
nbconvert.exporters.pdf.LatexFailed: PDF creating failed, captured latex output:
Failed to run "xelatex notebook.tex -quiet" command:
notebook.tex:411: Missing $ inserted
notebook.tex:411: Extra }, or forgotten
notebook.tex:412: Missing $ inserted如果我把这个LaTex从我的笔记本里拿出来,它就会起作用:
$ y=\frac{1}{2}x+3 $我对LaTex不是很熟悉,但是它可以在.ipynb文件中正确显示,所以我假设这个语法没有问题。这是nbconvert的问题吗?谢谢!
发布于 2021-04-16 09:38:39
在尝试了一下之后,我已经解决了这个问题。这是LaTeX语法的一个问题。我希望jupyter notebooks能够在单元格显示错误的地方显示错误,但它没有。正确的语法与上面相同,只是美元符号之间没有空格。将该行代码更改为:
$y=\frac{1}{2}x+3$nbconvert已成功制作PDF。
https://stackoverflow.com/questions/67116112
复制相似问题