Is there a simple way to expand multiple cells simultaneously?
At the moment I am primarily interested in fully expanding "in one fell swoop" all the cells in a documentation window, although I can imagine situations in which I'd want to open several cells only one-level deep, so I'm interested in this case as well. Finally, it would also be useful to know how to collapse multiple cells at once.
EDIT: My immediate interest is for ways to do this interactively, rather than programmatically. I.e. keyboard (+ mouse) shortcuts, or (second best), menu commands.
EDIT (15-06-25): I ultimately dealt with the closed cells in the documentation pages by modifying the relevant stylesheet so that these cells are opened automatically whenever I visit one of those pages. The solution is a combination of bill s's answer with this other one, more specifically, the recipe labeled Update 2015, stylesheet approach.
The whole solution boils down simply to inserting the following snippet in the appropriate stylesheet file:
CellDynamicExpression:>Refresh[FrontEndExecute[{
FrontEndToken[
EvaluationNotebook[], "SelectAll"]}]; FrontEndExecute[{
FrontEndToken[
EvaluationNotebook[], "SelectionOpenAllGroups"]}], None],
...but, since it took me quite a while to figure out how to carry out the recipe given in the cited answer, I thought that I would spell out the missing details here.
create (or locate) the file
Reference.nb, as described, and visit it.use
Edit > Find...(Ctrl+F) to locate a cell with contents
Local definitions for style "NotesSection":
NotesSection
click on this cell's bracket to select it;
press Shift+Ctrl+E (alternatively, select
Cell > Show Expression); this reveals an Mathematica expression beginning withCell[...;paste the snippet given above at the appropriate location in the
Cell[...expression, as shown in the cited answer's figure;I repeat steps (3) and (4) above (so that the
Cell[...is no longer visible);I save the notebook (Ctrl+S).
Do not skip step 6; the changes did not take effect until I got out of the Show Expression state, even after saving the notebook.
Ctrl + {) underCell > Grouping. – kjo Sep 20 '13 at 19:34