Context unique to each group at a specified level
Recent versions of Mathematica provide the option of having a unique $Context for each cell group, via: Evaluation > Notebook's Default Context > Unique to Each Cell Group This is an appealing concept, but I find it unusable, as my code spans multiple cell groups. I would like a way to specify a unique context for cell groups of a certain level such as every Section , but not a separate context for every Subsection or Subsubsection . A solution will need to affect new cell groups as they are created. You should be able to do this by modifying your notebook's stylesheet. You can use the option