anjchang
anjchang

Reputation: 493

How to reduce the vertical white space between ipython notebook cells?

I teach a class using ipython/jupyter notebook on a pubic computer. When the notebook is projected, the text is too small for the students to read. I can increase the font size by pressing Ctrl+ a few times, but then not enough cells fit on the screen.

Is there any way to decrease the white space between ipython notebook cells. Is there a solution that changes just the one notebook, like this one for widening the cell width:

from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))

I don't want to change any customization files, since the machine will be wiped when I logged out.

Upvotes: 2

Views: 4514

Answers (1)

Miguel
Miguel

Reputation: 295

Not exactly what you asked for, but jupyther themes allows easily switching between whole themes, as well as changing font sizes and line heights with a simple switch at the command line, e.g.

jt -t grade3 -T -f roboto -fs 14 -lineh 120

This increases font size to 14 points and reduces line height to 120%, while (I think) keeping vertical separation among cells constant.

Of course, if the machine is wiped at logout you would need to reinstall the package at login :\

Upvotes: 2

Related Questions