What determines how a specific cell-style influences grouping of cells?
For example "Text"
following "Subtitle"
is grouped but not following "Text"
nbtitle = CreateDocument[];
NotebookWrite[nbtitle, Cell["subtitle", "Subtitle"]]
NotebookWrite[nbtitle, Cell["this text gets grouped", "Text"]]
nbtext = CreateDocument[];
NotebookWrite[nbtext, Cell["some text", "Text"]];
NotebookWrite[nbtext, Cell["this text is not grouped", "Text"]];
All I can find in the documentation is:
Within a given notebook, there is always a collection of styles that can be used to determine the appearance and behavior of cells. Typically the styles are named so as to reflect what role cells which have them will play in the notebook.
CellGroupingRules
or inherit it. If it is what you are looking for then I post it as answer (with some examples). $\endgroup$