Function Repository Resource:

InsertCellGroupCloser

Source Notebook

Insert a group closer button at the end of a cell group to collapse it

Contributed by: Jayanta Phadikar, Kunal Khadke

ResourceFunction["InsertCellGroupCloser"][]

inserts a group closer for the Section cell group.

ResourceFunction["InsertCellGroupCloser"][cellstyle]

inserts a group closer for the specified cellstyle.

Details and Options

A group closer at the end of a cell group is helpful when there is a significant amount of contents inside the group. Instead of going all the way up, you can simply click on the button at the end to close the group.
Options for ResourceFunction["InsertCellGroupCloser"] include:
"ArrowColor"Whitearrow color for group closer
"ArrowFontSize"14arrow font size for group closer
ImageSize{20, 20}imagesize for group closer
BackgroundRGBColor[1, 0.4, 0.2]background for group closer
"CellBackground"Nonebackground for group closer cell
AlignmentRightgroup closer alignment within the cell

Examples

Basic Examples (3) 

Insert a group closer for the "Examples" section:

In[1]:=
ResourceFunction["InsertCellGroupCloser"][];

Click on the group closer in the above cell and see that "Examples" section collapses:

Insert the group closer for other cell styles such as the "Basic Examples" subsection:

In[2]:=
ResourceFunction["InsertCellGroupCloser"]["Subsection"];

Options (6) 

ArrowColor (1) 

Change arrow color for the group closer:

In[3]:=
ResourceFunction["InsertCellGroupCloser"]["ArrowColor" -> Black];

ArrowFontSize (1) 

Change arrow font size for the group closer:

In[4]:=
ResourceFunction["InsertCellGroupCloser"]["ArrowFontSize" -> 20, ImageSize -> {25, Scaled[1]}];

ImageSize (1) 

Change ImageSize for the group closer:

In[5]:=
ResourceFunction["InsertCellGroupCloser"][
  ImageSize -> {25, Scaled[1]}];

Background (1) 

Change Background for the group closer:

In[6]:=
ResourceFunction["InsertCellGroupCloser"][Background -> Darker[Red]];

CellBackground (1) 

Change "CellBackground" for the group closer cell:

In[7]:=
ResourceFunction["InsertCellGroupCloser"]["CellBackground" -> Cyan];

Alignment (1) 

Change the group closer Alignment within the cell. Alignment can be set as Left, Right and Center:

In[8]:=
ResourceFunction["InsertCellGroupCloser"][Alignment -> Center];

Publisher

Kunal Khadke

Version History

  • 1.0.0 – 04 October 2021

Related Resources

License Information