2
$\begingroup$

I have used the Option Inspector to set CellGrouping to Manual for the current, selected Notebook. Nonetheless, the following does not group these two cells together:

CellPrint[CellGroup[{TextCell["hello"], TextCell["goodbye"]}]] 

Also, adding the second argument to CellGroup[] to specify which cell should be open, does not work.

Please note that both of these work if I create the cells in a new Notebook, created with CellGrouping -> Manual.

I saw the same behavior with Cell[CellGroupData[...]].

What am I missing?

$\endgroup$
1

1 Answer 1

2
$\begingroup$

Unfortunately there are many issues related to cell groups structure: SE / Cell @ CellGroupData in Cells family

And my rules of thumb, unfortunately, are:

  • only use CellGroup+TextCell+ExpressionCell and friends, which are a higher level equivalents of CellGroupData and Cell, for small snippets rather than serious work. Why? I don't know, maybe I just can't handle them but writing your code in a low level form works:

    NotebookWrite[EvaluationNotebook[], Cell@CellGroupData[{Cell["hello"], Cell["goodbye"]}] ] 
  • don't expect much from Manual CellGrouping with respect to other related options. Same reason.

You want more details? You can as WRI Support.

$\endgroup$
1
  • $\begingroup$ Kuba, thank you. Here is the parallel question at Wolfram. $\endgroup$ Commented Mar 16, 2018 at 13:52

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.