This article is for my memorization about converting ipynb to PDF
How to create custom COCO data set for instance segmentation - Tony607/labelme2coco. Files for ipynb, version 0.5.1; Filename, size File type Python version Upload date Hashes; Filename, size ipynb-0.5.1-py3-none-any.whl (6.9 kB) File type Wheel Python version 3.5 Upload date Oct 23, 2017 Hashes View.
I had to report paper work commited with python.
then I used jupyter and I found out nbconvert function.
Online Ipynb Viewer
If you have nbcovert and jupyter, it is easy to convert ipynb to PDF.
the way to convert ipynb to PDF is the following :
jupyter nbconvert –to pdf file_name.ipynb
Another way is using template like this:
jupyter nbconvert –to pdf –template what_you_want_to_use file_name.ipynb
refert to the following of help message of jupyter nbconvert.
as metioned, the process above is under where you installed nbconvert , pandoc and etc.
Ipynb Viewer App
If not, install them below
- nbconvert
pip3 install nbcovert
- Pandoc
sudo apt-get install pandoc
then run it to convert ipynb to PDF if you suceed!
Congradulation! you are done.
BUT if you get error message like me as follows:
just visit the URL, https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.
you will find out how to install TeX, if you are linux user, type in the following
sudo apt-get install texlive-xetex
Then you could convert ipynb to PDF with prompt like two wasy below.
jupyter nbconvert –to pdf file_name.ipynb
The line above is my case that I used.
Another way is using template like this:
jupyter nbconvert –to pdf –template what_you_want_to_use file_name.ipynb
you could convert ipynb to a lots of format in Jupyter on web browser,
File - Download as - PDF via LaTex or etc.
In my case, when I used PDF via I had another error, Korean language problem like this:
The solution of the problem is fixing template, base.tplx like this:
usepackage{kotex}
%usepackage[T1]{fontenc}
After typing in kotex like above, Korean Language problem would be resolved.
The location of base.tplx is under lib/python3.5/site-packages/nbconvert/templates/latex.
depending on when you install python with root(sudo) or –user. The location of base.tplx is different
If root(suod), The python site-packages is under /usr/lib
If –user, The python site-packages is under ~/.local/lib