So, i've been trying to save a jupyter notebook as PDF but i just can't figure out how to do this. The first thing i try is from the file menu just download as PDF, but doing that results in:
nbconvert failed: PDF creating failed
the next thing i try is try to do the conversion from the Command Prompt like this
$ ipython nbconvert --to latex --post PDF MyNotebook.ipynb
but again, this results in an error message
ImportError: No module named 'PDF'
and if i try
$ ipython nbconvert --to latex MyNotebook.ipynb
this results in
IPython.nbconvert.utils.pandoc.PandocMissing: Pandoc wasn't found: Please check that pandoc is installed
if i try to install pandoc (pip install pandoc
), this gives me
ImportError: No module named 'ConfigParser'
and this is where i get stuck because i just don't know what else to do. Anyone have idea how to fix whatever is wrong?
The Jupyter Notebook has an option to export the notebook to many formats. It can be accessed by clicking File -> Download as -> PDF via LaTeX (or PDF via HTML - not visible in the screenshot).
Create a notebook and the click "File -> Download As". Click the new menu entry called "PDF via HTML". Your notebook will be converted to a PDF on the fly and then downloaded.
Saving your edits is simple. There is a disk icon in the upper left of the Jupyter tool bar. Click the save icon and your notebook edits are saved.
To export, select the Export action on the main toolbar. You'll then be presented with a dropdown of file format options. Note: For PDF export, you must have TeX installed. If you don't, you will be notified that you need to install it when you select the PDF option.
To make it work, I installed latex, typical latex extra, and pandoc.
With ubuntu:
sudo apt-get install texlive texlive-latex-extra pandoc
it takes some times: several 100 Mb to download. I read somewhere that you can use --no-install-recommends
for texlive and extra to reduce to the dl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With