5
$\begingroup$

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?

$\endgroup$

2 Answers 2

5
$\begingroup$

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:


Cell[StyleData["Section-5"],

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

 StyleKeyMapping->{
     (*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*)
 
 PageBreakBelow->False,
 LanguageCategory->"NaturalLanguage",
 CounterIncrements->"Subsubsubsubsection",
 CounterAssignments->{{"Item", 0}, {"Subitem", 0}, {"Subsubitem", 0}, {"ItemNumbered", 0}, { "SubitemNumbered", 0}, {"SubsubitemNumbered", 0}}, 
 FontFamily->"Source Sans Pro",
 FontSize->14
]

$\endgroup$
0
1
$\begingroup$

I could not figure out how the tab/backspace thing from Kuba's answer is working. But in Mathematica 13.2 you can click the plus that appears once you click in an empty cell, then choose Other style of text which opens a prompt. In the prompt you still cannot select the Subsubsubsection BUT you can simply type it in there and it will process it accordingly.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.