How to close initialization cell in Notebook?

你。 提交于 2019-12-08 19:23:17

问题


In my Notebook I have a fairly large initialization cell. How to make it close-able? I mean how can I roll up this cell in one line with ability to unroll it back?


回答1:


The classic solution is to put the initialization cell(s) into a Section (Alt+4) of their own, titled "Initialization." This Section goes either at the start or end of your notebook.

To hide the contents, you close the Section (double click its cell bracket at right of window).




回答2:


I have found the solution. I should create a text cell before my initialization cell, for example here is a nice cell:

Cell[TextData[StyleBox["Initialization cell(s)",
 FontFamily->"Courier New",
 FontSize->14]], "Text",
 CellFrame->True, ShowGroupOpener->True,
 Background->GrayLevel[0.85]]

Then I should select this cell and the next (initialization) cell and then select from the context menu "Group Cells". Now I can roll up this group in one line corresponding to the first text cell by double-clicking its cell bracket at right of window. This is what I searched for. Thanks Andrew Moylan and Brett Champion.




回答3:


Select the cell, then toggle Cell > Cell Properties > Open. The cell bracket will collapse to a few pixels high and be the only visible part of the cell. The same menu item will also make it visible again later.



来源:https://stackoverflow.com/questions/5152551/how-to-close-initialization-cell-in-notebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!