# Easiest Way to Use ShowGroupOpener in Mathematica

I currently edit manually the cell contents of a notebook (Ctrl+Shift+A or Cmd+Shift+A) to "recycle" cells containing the ShowGroupOpener option. Is there an easier way to create documents hiding contents under that type of icon?

• It is not clear to me what you mean by "recycle" cell with ShowGroupOpener. For the second part of your question do you want all grouped cells in your notebook that have a ShowGroupOpener to be closed by default (or via some straight forward method)? Jan 19 '12 at 11:05
• Ruben, I am not sure what exactly your question is, but are you aware that you can generate a cell that will show the group opener as follows? CellPrint[Cell["", "Section", ShowGroupOpener -> True]] Jan 19 '12 at 13:36
• Ruben and @JOwen, you can also do the same for the entire notebook using SetOptions[EvaluationNotebook[], {"ShowGroupOpener" -> True}] or SetOptions[EvaluationNotebook[], ShowGroupOpener-> True]
– kglr
Jan 19 '12 at 13:44

## 1 Answer

Unless you want group openers for all groups -- which you probably don't, since that would put one at the very top level for the entire notebook -- then you can edit the notebook's style sheet, select the kind of cell (Section, Subsection, e.g.) for which you want the group opener, and then use the Option Inspector on that cell in the style sheet to include ShowGroupOpener.

You could do this either for a particular notebook by using the menu command Format > Edit StyleSheet or you could make a copy of a standard style sheet, modify that, and then select it as the style sheet for whatever notebooks you choose. (I'd advise against directly modifying any of the Wolfram-supplied style sheets.)

I can give a more detailed explanation if you like.

• Hi Murray. Thanks a lot for the explanation. That was actually what I was looking for. By the way, do you know of any tutorial about how to properly create styles and long documents using Mathematica? Jan 27 '12 at 2:58
• How do you add ShowGroupOpener to an Output cell? I can only apply it to an Input Cell. Sometimes I want to hide the input. Jul 18 '14 at 15:44
• Apply the ShowGroupOpener option to the (evaluated) Input cell. Then double-click the Output cell; that will close the group, leaving just the Output cell visible. But the GroupOpener will now appear on that Output cell. When you open the group, the GroupOpener will instead appear on the Input cell. Jul 19 '14 at 17:11
• @murray, when I do that and double-click on the output cell, the GroupOpener does not show. It only shows on the Input cell when the group is opened. However, if I apply the ShowGroupOpener option the output cell, the GroupOpener shows on the output cell when the group is closed (which is the most important thing that I wanted here), but it does not show when the group is closed, which is unlike the case when you apply the ShowGroupOpener option to the input cell and have the group opened. I would like the GroupOpener to show both when closed and open as is the case for the Input. Jul 20 '14 at 20:31
• @Ben Allgeier: Which version of Mathematica are you using? I'm using 10. Jul 21 '14 at 0:26