Message Boards Message Boards

[✓] Open/close cell groups in a presentation?

GROUPS:

Dear Community,

A newbie question: I've seen many times in Mathematica presentations that a neat, horizontal double chevron is used to open up and close parts of the notebook during presentations. This is very handy to present or hide information in a presentation. How this is done? I tried to search for the help, but got no acceptable results.

tx for the kind answer in advance best regards Andras

POSTED BY: Andras Gilicz
Answer
2 months ago

As a start at an answer, you want to use the Option Inspector to enable the ShowGroupOpener option for the Selected Notebook.

To use the Option Inspector, from the main Mathematica menu select Format > Option Inspector. In the new Option Inspector window that pops up, you see 3 fields across the top. In the leftmost field, select "Selected Notebook" instead of the default "Selection"; leave the middle field as is, "by category"; in the right field type "group opener". In the resulting tree of options shown below that, check the ShowGroupOpener option. See also

https://mathematica.stackexchange.com/questions/265/easiest-way-to-use-showgroupopener-in-mathematica/293#293.

However, I no longer remember how to change what symbol is used for the GroupOpener. This may involve editing the Stylesheet being used, but offhand I don't see how.

POSTED BY: Murray Eisenberg
Answer
2 months ago

Dear Murray,

Thank you very much. I'll try this.

best regards

Andras

POSTED BY: Andras Gilicz
Answer
2 months ago

I mean this. I've found a good example on youtube:

https://www.youtube.com/watch?v=lczqhcnVQ8c

After 50s its visible how easy it is to show and hide content in a presentation. How this is done?

Any help is gratefully appreciated.

best regards

Andras

POSTED BY: Andras Gilicz
Answer
2 months ago

That screen-shot video seems to be using precisely the GroupOpener that I described in my earlier response.

POSTED BY: Murray Eisenberg
Answer
2 months ago

@Murray: works perfect, thank you very much.

best regards Andras

POSTED BY: Andras Gilicz
Answer
2 months ago

The Presentations Mathematica application, which I've developed over the years, has several features that address these issues. One is:

HiddenNotebookData[datasymbol, dataname, datavalues] will store the datavalues in a skeleton structure displaying dataname but hiding the datavalues. It then generates an Input Set statement with the data symbol on the lhs and the skeleton structure on the rhs.

This allows large expressions or datasets to be included in a notebook, usually in an initialization section, without being explicitly displayed. One can pass the hidden data to various routines and also directly look at it by evaluating the data symbol that stores it.

A second feature is the:

EvaluateBelowButton generates a Button to evaluate the cell following the one containing the button.

Sometimes one will have an Input/Output pair where the form of the Input statement is relevant to the discussion in the notebook. Other times the Input statement will be more like "boilerplate" and only the Output is relevant to the notebook discussion. This might be especially so in the case of detailed custom graphics or dynamic presentations. In this case the Input can be semi-permanently closed (by selecting its bracket and using Alt+CPO or from the Cell/Cell Properties/Open menu item). The problem with this is that a reader may miss it because the closed cell is quite thin. The EvaluateBelowButton can be placed in a Text cell just above the closed cell. It displays as Eval with a little arrow pointing down, and has a Tooltip explaining its purpose. It can be pasted in directly from the Presentations palette. In this way a notebook looks more like a regular paper and still the specifications can be written directly at the place they are used.

Having a good stylesheet also helps a notebook have a nice presentation to the reader. In my opinion the standard Default notebook has a number of poor features. The relevant one here is that the Section and sub-section cells don't have cell openers. So you have to add them by hand. There are OpenAllSubgroups and CloseAllSubgroups operations on the Cell menu. The problem with these is that they also open/close Input/Output groups and if you were to pass an evaluated notebook to a reader you generally don't want them all closed - nor do you want everything open. The solution is to create a custom stylesheet with cell openers on the Section and sub-section cells and nowhere else. All my stylesheets have this and some have a docked cell that includes a Show/Hide button that opens and closes the thin closed cells I mentioned above.

How to make stylesheets and how to organize your work so as to develop, preserve and communicate it is discussed in the essay at my web site: A Mathematica Style. If you are interested in the Presentations application you would have to contact me.

POSTED BY: David J M Park Jr
Answer
2 months ago

Thank you very much for your comment. I've sent you a contacting e-mail directly.

best regards

Andras

POSTED BY: Andras Gilicz
Answer
2 months ago

Group Abstract Group Abstract