将jupyter ipython笔记本导出为pdf

现场

我正在尝试将ipython笔记本从jupyter导出到pdf,但它只是不想工作。首先,我遇到了一些麻烦pandoc,但是在安装并添加到其中之后,PATH仍然出现我不明白的错误。

nbconvert failed: PDF creating failed, captured latex output:
This is XeTeX, Version 3.14159265-2.6-0.99998 (MiKTeX 2.9.6350 64-bit)
entering extended mode
(notebook.tex
LaTeX2e <2017-04-15>
Babel <3.10> and hyphenation patterns for 75 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size11.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def")
("C:\Program Files\MiKTeX 2.9\tex\latex\lm\t1lmr.fd"))
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\mathpazo.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-cfg\graphics.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-def\xetex.def")))
("C:\Users\Sito\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption.sty"
("C:\Users\Sito\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption3.sty"
))
("C:\Users\Sito\AppData\Roaming\MiKTeX\2.9\tex\latex\adjustbox\adjustbox.s
ty" ("C:\Program Files\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\xkvutils.tex")))
("C:\Users\Sito\AppData\Roaming\MiKTeX\2.9\tex\latex\adjustbox\adjcalc.sty
")
("C:\Users\Sito\AppData\Roaming\MiKTeX\2.9\tex\latex\adjustbox\trimclip.st
y"
======================================================================
starting package maintenance...
installation directory: "C:\Users\Sito\AppData\Roaming\MiKTeX\2.9"
package repository: http://mirror.switch.ch/ftp/mirror/tex/systems/win32/miktex/tm/packages/
visiting repository http://mirror.switch.ch/ftp/mirror/tex/systems/win32/miktex/tm/packages/...
repository type: remote package repository
loading lightweight database...
downloading http://mirror.switch.ch/ftp/mirror/tex/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma...
167630 bytes, 574.39 KB/Sec
lightweight database digest: d071dd32f4cea419134839a73013ff85
going to download 282583 bytes
going to install 5 file(s) (1 package(s))
downloading http://mirror.switch.ch/ftp/mirror/tex/systems/win32/miktex/tm/packages/collectbox.tar.lzma...
282583 bytes, 2603.40 KB/Sec
extracting files from collectbox.tar.lzma...

Unfortunately, the package collectbox could not be installed.Please check the log file:
C:/Users/Sito/AppData/Local/MiKTeX/2.9/miktex/log/xelatex.log
======================================================================

("C:\Users\Sito\AppData\Roaming\MiKTeX\2.9\tex\latex\collectbox\collectbox
.sty")
("C:\Users\Sito\AppData\Roaming\MiKTeX\2.9\tex\latex\adjustbox\tc-xetex.de
f")) ("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\varwidth.sty"))

! LaTeX Error: File `xcolor.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 

l.43     \usepackage
                    {enumerate} % Needed for markdown enumerations to work^^M
No pages of output.
Transcript written on notebook.log.

老实说,我对jupyter还是完全陌生的,并且通常没有编码经验,因此请有人可以向我解释该错误以及解决该问题我需要做什么。

感谢Sito!

泰格·格里菲斯(Tague Griffith)

Jupyter结合使用pandoc和TeX发行版从笔记本生成PDF文件。

您的TeX发行版(MiKTeX)缺少LaTeX xcolor软件包使用MiTeX软件包管理器,这会导致收集盒软件包安装失败。

使用MiKTeX软件包管理器安装xcolor,然后收集框并尝试再次运行转换。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Jupyter和Bokeh:将Jupyter笔记本导出为pdf时,导出散景图的解决方法

Jupyter笔记本Matplotlib数字在导出的pdf中丢失

Mac OSX上的MS OneNote:是否可以将整个笔记本导出为PDF?

将azure ml studio设计器项目导出为jupyter笔记本?

如何在Jupyter Lab的“将笔记本导出为...”菜单上获得“将笔记本导出到Html_toc”选项?

将jupyter笔记本转换为pdf(彩色)

将多个 jupyter 笔记本转换为 pdf

将 jupyter 笔记本中的图形转换为 pdf

如何导出整个Jupyter笔记本?

在IPython / Jupyter笔记本中导出单个单元格

将IPython笔记本从v4(Jupyter)转换回良好的v3

如何将键盘快捷键永久添加到Jupyter(ipython)笔记本?

如何自动将扩展名添加到Jupyter(ipython)笔记本?

如何将Jupyter / IPython笔记本转换为LaTex?

Jupyter - 将当前的 ipynb 文件导出到笔记本中的 html

如何以编程方式保存Jupyter笔记本(iPython笔记本)?

更改IPython / Jupyter笔记本工作目录

IPython / jupyter笔记本中的autoupdate模块

自动化标准的jupyter / ipython笔记本导入

iPython笔记本的默认模板(使用Jupyter)

Jupyter(IPython)笔记本单元中的多个音频对象

在IPython / Jupyter笔记本中显示行号

在IPython / Jupyter笔记本中显示行号

IPython / Jupyter笔记本小部件跨全宽

非交互式运行IPython / Jupyter笔记本

更改级别已记录到IPython / Jupyter笔记本

如何设置ipython jupyter笔记本的单元格?

R未在jupyter中生成图形(IPython笔记本)

在R jupyter笔记本中使用ipython魔术吗?