How I add pagebreak in my PDF when printing Jupyter notebook for report ( and you have Mac? )

Wonhee Jung
3 min readJan 26, 2019

There are many way to do this, and I’m about to tell you what I did for my case. Use this posting as FYI. Assuming you are using Jupyter on Mac, do not want to learn LaTex for your report, and just want some simple solution based on WYSIWYG. If you are willing to use LaTeX for your report, use web based services e.g, (www.overleaf.com), instead of classic LaTeX editor running in your local. Those web based LaTeX services allow you to share your work with others and also work together.

I have been working on my UIUC CS498 AML(Applied Machine Learning), and there is week1 homework programming assignment due next week.

My teammate and I solved two programming assignment of week 1, and now it’s time to submit the report. Since we both have been working on Jupyter notebook and Python, we wanted to use a rendered Jupyter notebook page for the report. The problem was, Programming assignment instruction asked to layout the result and numbers very specifically. For example, student need to put accuracy of cross-validation for unprocessed data and o-value elements ignored on Page 1, and code snippets of distribution parameter calculation & Naive Bayes predictions, etc on Page2, etc.

Both MS Word and Apple’s Pages work great for the report in general… until you have to put programming language’s source code in it. All the syntax highlight and codeblock turns to ugly, and … well, it just doesn’t look good.

--

--

Wonhee Jung
Wonhee Jung

Written by Wonhee Jung

Lifelong gamer and learner, loves lifehack. Senior Software Engineer@Blizzard Entertainment. Master’s degree in CS@UIUC, current CS grad student@GeorgiaTech.

No responses yet