Function Repository Resource:

OpenCellGroups

Source Notebook

Open cell groups in a notebook by style

Contributed by: Richard Hennigan (Wolfram Research)

ResourceFunction["OpenCellGroups"][]

opens the cell groups from a predefined set of styles in the current notebook.

ResourceFunction["OpenCellGroups"][style]

opens the cell groups in the current notebook that match the style specification style.

ResourceFunction["OpenCellGroups"][notebook,style]

opens the cell groups in notebook that match the style specification style.

Details and Options

OpenCellGroups allows you to open only the cell groups in a notebook that have a particular style. For example, this allows you to open all the Section groups while leaving Subsections unchanged.
The style specification can be given as a string, pattern or list of cell styles.

Examples

Basic Examples (2) 

Open an example notebook for testing:

In[1]:=
nb = NotebookPut[
   Import[FindFile["ExampleData/document.nb"]] /. Open -> Closed];
Out[1]=

Open all the Section groups:

In[2]:=
ResourceFunction["OpenCellGroups"][nb, "Section"];
Out[2]=
In[3]:=
NotebookClose[nb];

Scope (2) 

Retrieve the function:

In[4]:=
ResourceFunction["OpenCellGroups"]
Out[4]=

Retrieve the resource:

In[5]:=
ResourceObject["OpenCellGroups"]
Out[5]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.0.0 – 15 August 2018

Related Resources

License Information