We know in a notebook there are Sections, Subsections and Subsubsections. I wonder is there a way to construct something like Subsubsubsection and Subsubsubsub...subsection?

I ask this because when I do research, I write code and notes in one notebook. The contains in my notebook file accumulates day by day and makes it large and complex. Once I need to expand one of my subsubsection, I found that there is no deeper section layers so I have to lay out the added contain unorganized. I wonder is there a way to solve this?


The Default.nb styles define them up to "Subsubsubsubsection" so you have two more levels to go.

They are not included in the Format>Style menu but you can use shortcuts. Hit Tab/Backspace to navigate down/up in section level. (coursor needs to be a the beginning of the cell).

If you need more you can define/edit a custom stylesheet and add there style analogous to:


 CellMargins->{{66, Inherited}, {2, 10}}, (*edit 66 if you need more indentation*)

     (*remember to edit Subsubsubsubsection if you want `Tab` to move to Section-5*)
   "Backspace" -> "Subsubsubsubsection"        
 , KeyEvent["Tab", Modifiers -> {Shift}] -> "Section-6" (*if defined*)

 CellGroupingRules->{"SectionGrouping", 70+10}, (*increment 10 for each deeper level*)

 FontColor->RGBColor[0.5, 0.01`, 0.], (*whatever you want*)

 MenuSortingValue->None, (*make it a number if you want it to appear in Format>Style menu*)
 CounterAssignments->{{"Item", 0}, {"Subitem", 0}, {"Subsubitem", 0}, {"ItemNumbered", 0}, { "SubitemNumbered", 0}, {"SubsubitemNumbered", 0}}, 
 FontFamily->"Source Sans Pro",


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.