将 jupyter ipython notebook 导出为 pdf
exporting jupyter ipython notebook to 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.9\tex\latex\caption\caption.sty"
("C:\Users\Sito\AppData\Roaming\MiKTeX.9\tex\latex\caption\caption3.sty"
))
("C:\Users\Sito\AppData\Roaming\MiKTeX.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.9\tex\latex\adjustbox\adjcalc.sty
")
("C:\Users\Sito\AppData\Roaming\MiKTeX.9\tex\latex\adjustbox\trimclip.st
y"
======================================================================
starting package maintenance...
installation directory: "C:\Users\Sito\AppData\Roaming\MiKTeX.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.9\tex\latex\collectbox\collectbox
.sty")
("C:\Users\Sito\AppData\Roaming\MiKTeX.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 还是个新手,一般来说在编码方面没有真正的经验,所以请有人向我解释错误以及我需要做些什么来解决这个问题。
谢谢司徒!
Jupyter 结合使用 pandoc
和 TeX 发行版从笔记本生成 PDF 文件。
您的 TeX 发行版 (MiKTeX) 缺少 LaTeX xcolor package. Use the MiTeX package manager 导致 collectbox 包安装失败。
使用 MiKTeX 包管理器安装 xcolor,然后收集框并再次尝试 运行 您的转换。
我正在尝试将 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.9\tex\latex\caption\caption.sty"
("C:\Users\Sito\AppData\Roaming\MiKTeX.9\tex\latex\caption\caption3.sty"
))
("C:\Users\Sito\AppData\Roaming\MiKTeX.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.9\tex\latex\adjustbox\adjcalc.sty
")
("C:\Users\Sito\AppData\Roaming\MiKTeX.9\tex\latex\adjustbox\trimclip.st
y"
======================================================================
starting package maintenance...
installation directory: "C:\Users\Sito\AppData\Roaming\MiKTeX.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.9\tex\latex\collectbox\collectbox
.sty")
("C:\Users\Sito\AppData\Roaming\MiKTeX.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 还是个新手,一般来说在编码方面没有真正的经验,所以请有人向我解释错误以及我需要做些什么来解决这个问题。
谢谢司徒!
Jupyter 结合使用 pandoc
和 TeX 发行版从笔记本生成 PDF 文件。
您的 TeX 发行版 (MiKTeX) 缺少 LaTeX xcolor package. Use the MiTeX package manager 导致 collectbox 包安装失败。
使用 MiKTeX 包管理器安装 xcolor,然后收集框并再次尝试 运行 您的转换。