For some reason, the SubTitle and SubSubTitle cell formats do not group automatically on my machine any more, and I cannot figure out how to fix that. To be explicit, here is a picture of the problem:

enter image description here

If you notice, only the topmost layer in the hierarchy will automatically group with those below it, until you reach the Section level (level-4 on the default stylesheet). This makes using the notebook interface difficult for deeply nested topics, as there are only an effective 4 levels of grouping available to me.

How can I fix this?


1 Answer 1


In the course of researching this question, I discovered an answer.

Looking at the Option Inspector -> Cell Options -> General Properties for each of the cells shown above, reveals the option: CellGroupingRules. Unfortunately, there is little in terms of documentation for this option.

Upon inspection, CellGroupingRules has the value of {"TitleGrouping", 0}, {"TitleGrouping", 10}, and {"TitleGrouping", 20} for the three title cells, respectively, in order of appearance. The Section cells, down to the SubSubSection have CellGroupingRules = {"SectionGrouping", x} where x goes from 30 to 50 as you descend the hierarchy. So, obviously, the number indicates the level in the hierarchy. A Text cell (7th in the hierarchy) has CellGroupingRules = "NormalGrouping".

Changing CellGroupingRules on SubSubTitle to {"SectionGrouping", 20} appears to do the trick. For whatever reason, "TitleGrouping" implies that sub-titles are not to be included in the grouping.

  • $\begingroup$ I think that TitleGrouping groups with the cell below if the cell is sandwiched with cells with lower hierarchy number. Section grouping just looks at the cell below... Could it be? $\endgroup$
    – Rojo
    Mar 15, 2012 at 3:47
  • $\begingroup$ @Rojo I'm not sure what you're saying. Specifically, in reference to the TitleGrouping. $\endgroup$
    – rcollyer
    Mar 15, 2012 at 3:49
  • $\begingroup$ I mean, the different kinds of grouping specify the grouping rules. For example, I'm guessing OutputGrouping means that it should group with the cell above if it's InputGrouping, and InputGrouping the other way around. SectionGrouping seems to be similar to GroupTogetherNestedGrouping, the most natural way to group: group with the cell below if it has a higher number. Just like GroupTogetherNestedGrouping. I was guessing that TitleGrouping meant "make a new cell group with the cells below if the cells above and below have a higher number". All wild guess $\endgroup$
    – Rojo
    Mar 15, 2012 at 4:00
  • $\begingroup$ @Rojo I thought that's what you meant. So, your speculating that because Title has a lower number than SubTitle, SubTitle won't be grouped because of "TitleGrouping", correct? $\endgroup$
    – rcollyer
    Mar 15, 2012 at 4:02
  • $\begingroup$ I'm speculating that TitleGrouping doesn't group if you go adding cells from lowest to hightest: Title -> SubTitle -> SubsubTitle... It only groups when you jump up again. Title -> Subtitle -> SubsubTitle -HERE-> SubTitle -> SubsubTitle... Because this last SubTitle is between two cells with higher numbers (SubsubTitle) $\endgroup$
    – Rojo
    Mar 15, 2012 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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