MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Flow around sections and subsections!

  • To: mathgroup at
  • Subject: [mg93731] Flow around sections and subsections!
  • From: "David Park" <djmpark at>
  • Date: Mon, 24 Nov 2008 04:13:54 -0500 (EST)

The WRI developers have done a very nice thing in Version 7 with respect to
notebook structure and formatting. That is the ability to have sections and
subsections that text and input/out cells can 'flow around'. You can have an
exposition in a Section and then introduce a Subsection that can be opened
and closed, and then continue on with the exposition in the Section.
Previously, it was difficult to do this and after a Subsection was
introduced all new cells following it would automatically go into the
Subsection. I was never able to figure out how to overcome this without
defining new cell types to fit all section levels.


In Version 7 WRI has introduced new methods, or at least have shown us how
to easily use them.  The key is the TextCells menu in the 'Writing and
Formatting' section of the Writing Assistant or Classroom Assistant
palettes. There we find a Standalone Text Cell and a Section Standalone Text
Cell. If you put a Section Standalone Text Cell after a Subsection it will
be at the Section level. And everything (Input/Output cells and ordinary
Text cells) you enter after that will also be at the Section level. So the
Section Standalone Text Cell acts as a marker of the end of the previous
Subsection and as a guard to prevent any subsequent cells from going into
the Subsection.


The real item that does the trick is the presence of the cell option:


CellGroupingRules->{"GroupTogetherGrouping", 31} 


in the Text cell. You can also make this work at other levels just by
setting 31 to 41, 51 etc., for other subsection levels. It is also possible
to introduce this into Input cells to break off from the Subsection, but
this also destroys the Input/Output grouping for that particular Input cell
so it is better to use a Text cell to continuing around a subsection.


This is all very nice because it is a way to have side discussions in a
notebook that are at the right place but don't interrupt the normal


Now, if only there was a way to put a single frame around an entire
Subsection grouping (and not around the individual cells in the grouping.)
It is, however, possible to Insert (from the Menu) horizontal lines at the
beginning and end of the Subsection content and this helps separate it from
the surrounding material when the Subsection is open.



David Park

djmpark at


  • Prev by Date: Re: financial chart with volumes
  • Next by Date: Re: Displaying the solution step by step in Wolfram Mathematica
  • Previous by thread: How to animate a (scrolling) ListPlot in a procedural Mathematica program?
  • Next by thread: Re: Flow around sections and subsections!