I recently introduced my WildCats package in the Meta Thread What third-party packages do you use? and @Szabolcs promptly observed that:
"I noticed that there are many cell groups in the documentation that are collapsed. The documentation browser doesn't display cell brackets so it's a little difficult to expand them (I used the Ctrl-' shortcut)."

Indeed I like to close all section groups in the tutorial pages so - upon opening the doc window - the user can immediately see the summarized full contents of the (often long) tutorial. This is much better than having to scroll through a long doc page in search of the relevant piece of information.

But then the question is: how do we open these closed section groups, given that documentation pages do not display (section) cell brackets?

One solution, although not very user-friendly, was already suggested by Szabolcs: use the Ctrl-' shortcut.

But there are better ones! and since they do not seem to be very well-known, I thought of posting this question and my suggested solution


I have two solutions. The first is specific to the Doc pages, the second one is more general and is my preferred one.

1st solution. Take any doc page. For ex. type "Plot" and then press F1. You will get the "Plot" doc page. As you see the In-out pairs are bracketed, but the higher-order structures, like "Plot" or "Basic Examples" or "Scope" are not....or so it seems. Now: move your mouse near the right hand side of the window, close to the scrollbar and, low and behold, all the missing bracket structure magically appears! If you move your mouse away from the scrollbar, the bracket structure disappears again. This, shall we call it feature?, is something that can be controlled at notebook level with the option inspector, so you can put it into your notebooks too and enjoy the puzzled look of your users. Just go to the option inspector and select your notebook, then Cell options/Display options/Show Cell Bracket and then Automatic.

2nd (and preferred) solution. First ask yourself honestly: do you like MMA cell brackets? I don't. I never did. They are thin and close together, difficult to click on in a hurry. Fortunately we have GroupOpeners, the little grey triangles on the left side of the cells. They are much easier to click on, and I like the way they change when you press them. MMA does not display them by default, but if you go to the menu Edit/Preferences.../Interface tab and select "Show open/close icon for cell groups", all the notebooks that you load , from now to the eternity, will display GroupOpeners. So now even my closed documentation sections can be easily opened. Since I set this preference long ago in my MMA, I did not realize that other users might have trouble reading my documentation. Again, this preference may be set at notebook level using the option inspector.

  • $\begingroup$ You can also create group openers that work (i.e. open the group) when you click on the group parent. For example click on a section and the section group opens. This has been incorporated into stylesheets that I have seen from time to time over the years (though do not have one handy right now). $\endgroup$ – Mike Honeychurch Jun 15 '12 at 3:35
  • $\begingroup$ @MikeHoneychurch Indeed! you just have to look at the Doc pages for examples of this behaviour. There is also a WholeCellGroupOpener option in the inspector which renders all cells un editable, but you can open close any group simply by clicking on it. Good for read-only stuff. $\endgroup$ – magma Jun 15 '12 at 10:14
  • $\begingroup$ I wasn't thinking of WholeCellGroupOpener ...for me that is something to be used with caution. $\endgroup$ – Mike Honeychurch Jun 15 '12 at 22:46

I start by putting the cursor anywhere in the documentation, then use Ctrl+. to extend the scope of the selection until it includes all of the cell groups that I want to open/close, then use Ctrl+{ or Ctrl+} to open/close them all. I find that using Ctrl+. is quicker than trying to select the outmost cell bracket, especially on pages that do not automatically display the cell brackets when you hover over where they should be.

  • $\begingroup$ I do much the same, but with Ctrl-a instead of Ctrl-. $\endgroup$ – Brett Champion Jun 15 '12 at 14:01
  • $\begingroup$ @BrettChampion Ctrl-A selects everything in a notebook. Isn't this a bit extreme in some cases? You end up opening/closing all cells in a notebook. $\endgroup$ – magma Jun 16 '12 at 8:25
  • $\begingroup$ @magma Opening/closing all the cell groups usually works for me, especially since I'm tend to hit Ctrl-. too many times and select more than needed anyway. $\endgroup$ – Brett Champion Jun 16 '12 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.