10

Is it possible to add a cell on the side of another cell, splitting the screen vertically? This seems very useful when comparing two lists of things.

I don't see this options supported out of the box, so I am guessing it would require some extra js?

meto
  • 3,425
  • 10
  • 37
  • 49

5 Answers5

14

This is now possible in JupyterLab. See this example:

...there is a menu item to create a new side-by-side view of that same notebook that will remain synchronized with the other view:

enter image description here

Note that JupyterLab will eventually replace Jupyter Notebook. See this answer.

Jean Monet
  • 2,075
  • 15
  • 25
6

You can right-click a file tab, and select, "New View for Notebook."

enter image description here

etotheipi
  • 771
  • 9
  • 12
6

This functionality has been merged on GitHub and will be in the 3.2 release. Go to View -> Render side by side

enter image description here

joelostblom
  • 43,590
  • 17
  • 150
  • 159
  • Is there a project for an "independant scroll" extension so that there is no empty spaces? When a cell is short but its output tall or the converse. – Louis-Amand Feb 09 '23 at 14:46
3

This is not possible at the moment (April 12th 2016), but there is a ticket in the Jupyter github issues that mentions that "soon" we will be able to open several notebooks in the same browser tab; That would allow for the side by side comparisons you are looking for.

Reblochon Masque
  • 35,405
  • 10
  • 55
  • 80
  • 2
    I think the OP was referring to having multiple windows into the same file. For instance, I am adding documentation cells at the top of my notebook, so I'd like to keep that cell open while I use the search feature to find things I'm documenting. If I could open the same notebook under multiple tabs, that would probably do the trick. – RufusVS Sep 05 '18 at 17:14
  • @RufusVS can't you though? In the file browser mode, click the file you want to view, let it open up, then just click the same file again; then you'll have two browser tabs that you can move to separate side-by-side windows. I'm not sure they synchronize their content (I mean that if you make changes in one I don't think the changes show in the other), but that might be unnecessary for the OP. – CrepeGoat Feb 25 '19 at 17:48
  • @CrepeGoat : I misread the OP. It looks like meto was trying to get a side-by-side view of two cells for comparison, which is different from what I was looking for. (OP did say split "vertically" which I glossed over). I was looking more for a "notebook split-screen editor", which wouldn't work without synchronization between views. Even a "collapse all cells" function might work for me. (only expanding the cells I was working with) – RufusVS Feb 25 '19 at 19:27
  • @RufusVS gotcha. Well from my uninformed perspective, I imagine a synchronous multi-window feature isn’t an outlandish request; go ahead and see if you can pitch it to the dev. team for future work, it’d be a nice addition. – CrepeGoat Feb 26 '19 at 02:09
1

Yes, it is possible. Follow steps below.

  1. Install extensions
>>> pip install jupyter_nbextensions_configurator jupyter_contrib_nbextensions
>>> jupyter contrib nbextension install --user
>>> jupyter nbextensions_configurator enable --user
  1. Enable Splitcell extension

  2. Open Jupyter notebook

  3. Go to nbextensions tab

enter image description here

  1. search for splitcell extension and enable it

enter image description here

  1. Use it via the icon on any notebook thereafter.

enter image description here

And don't forget to check out other awesome extensions. Enjoy.

Rahul
  • 205
  • 2
  • 8