Section Grouping


Section grouping involves adding comments to your Mathematica code so that it can be divided into a number of different sections which can be opened and closed. This is similar to the way the notebook front end opens and closes groups of cells. The Workbench supports three levels of groups: section, subsection, and subsubsection.

The sections are divided by special comments, which you can enter directly. But the Workbench provides a shortcut to do this, either through a key or through the editor popup. Place the cursor in the location you want to add a section and use the Add Section feature of the editor popup (found under the Grouping subchoice).

Section Grouping

When the section is added, you can change the name; here it is renamed to "Main Functions". You can then close the section by placing the cursor in the left margin and clicking the "-" sign.

Section Grouping

When the section is closed, it shows as in the following. You can open it again either by using the Open All Sections feature of the editor popup (found under the Grouping subchoice) or by clicking the "+" sign.

Section Grouping