Issue
So, I have a ipython notebook consisting of several 100 cells. A couple of consecutive cells logically belong to one particular functionality or milestone of the notebook. These logical divisions are separated by a cell containing a heading (in markdown). I can collapse individual cells. Is it possible to collapse multiple cells together , such that only the header cell is visible and when I uncollapse it, I see all the cells under that header?
For visualization
Cell 1 : Heading 1
Cell 2 : functionality x
Cell 3 : functionality y
Cell 4 : Heading 2
Cell 5 : functionality A
Cell 6 : functionality B
I want to connect cell 2, cell 3 to cell 1 and cell 5, cell 6 to cell 4.
So that when I collapse it. It looks like this :
Cell 1 : Heading 1
...
Cell 4 : Heading 2
Currently, I am achieving this by collapsing each and every individual cell under a heading which is soon becoming tiresome. I am looking for any plug in , script , anything that can help me achieve this.
Solution
Yes, JupyterLab 3.1 supports collapsing multiple cells at once. There is a small arrow that shows up when hovering over markdown cells with headings:
Alternatively, you could turn on syncCollapseState
(Advanced Settings Editor -> Table of Contents) and use the Table of Contents to collapse multiple cells at once, as demonstrated in the documentation, here.
Though I need to warn you that this functionality is brand new and there are some rough edges (for example, moving cells may behave strange for now), though improvements are being worked on!
Answered By - krassowski
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.