3

I'm trying to export a ipython notebook from jupyter to pdf but it just dosen't want to work. First I had some trouble with pandoc, but after installing that and adding it to PATH I'm still getting a error I don't understand.

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\MiKTeX2円.9\tex\latex\caption\caption.sty"
("C:\Users\Sito\AppData\Roaming\MiKTeX2円.9\tex\latex\caption\caption3.sty"
))
("C:\Users\Sito\AppData\Roaming\MiKTeX2円.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\MiKTeX2円.9\tex\latex\adjustbox\adjcalc.sty
")
("C:\Users\Sito\AppData\Roaming\MiKTeX2円.9\tex\latex\adjustbox\trimclip.st
y"
======================================================================
starting package maintenance...
installation directory: "C:\Users\Sito\AppData\Roaming\MiKTeX2円.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\MiKTeX2円.9\tex\latex\collectbox\collectbox
.sty")
("C:\Users\Sito\AppData\Roaming\MiKTeX2円.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.

To be honest, I'm still completly new to jupyter and in general not really experienced in coding so please can someone explain the error to me and what I need to do to solve the problem.

Thanks Sito!

asked Jul 7, 2017 at 20:28
1
  • Alright, took me a while but in the end i just needed to install all the missing packages from MikTeX Package Manager. Commented Jul 7, 2017 at 21:55

1 Answer 1

1

Jupyter uses a combination of pandoc and a TeX distribution to generate PDF files from notebooks.

Your TeX distribution (MiKTeX) is missing the LaTeX xcolor package. Use the MiTeX package manager which is causing the collectbox package installation to fail.

Use the MiKTeX package manager to install xcolor, then collect box and try running your conversion again.

answered Jul 7, 2017 at 21:56
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the help! It worked out but know I have another question. Is it possible to change the "style" of the output-pdf. I'd love to erase the In[] in ervery line, change the font and especially have the standard latex-font (looks horrible the way it is know..)
Try looking at alternate templates in nbconvert (nbconvert.readthedocs.io) and customizing nbconvert (nbconvert.readthedocs.io/en/latest/customizing.html). Another alternative would be go notebook to latex and then customize the latex after it's generated.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.