Используйте CellGroup, чтобы открыть или закрыть определенные ячейки - см. http://reference.wolfram.com/mathematica/ref/CellGroup.html
CreateDocument[{
TextCell["Title", "Title"],
TextCell["Subtitle", "Subtitle"],
CellGroup[{
TextCell["Section 1", "Section"],
TextCell["Section 1.1", "Subsection"],
TextCell["Section 1.2", "Subsection"],
TextCell["Section 1.3", "Subsection"]
}, Closed],
TextCell["Section 2", "Section"],
TextCell["Section 2.1", "Subsection"],
TextCell["Section 2.2", "Subsection"],
TextCell["Section 2.3", "Subsection"],
TextCell["Section 3", "Section"],
TextCell["Section 2.1", "Subsection"],
TextCell["Section 2.2", "Subsection"],
TextCell["Section 2.3", "Subsection"]}]
Или вы можете обернуть всю коллекцию TextCells в одну высокоуровневую CellGroup и поиграть с необязательным вторым аргументом CellGroup. Например, это откроет только первые три группы ячеек:
CreateDocument[{
CellGroup[{
TextCell["Title", "Title"],
TextCell["Subtitle", "Subtitle"],
TextCell["Section 1", "Section"],
TextCell["Section 1.1", "Subsection"],
TextCell["Section 1.2", "Subsection"],
TextCell["Section 1.3", "Subsection"],
TextCell["Section 2", "Section"],
TextCell["Section 2.1", "Subsection"],
TextCell["Section 2.2", "Subsection"],
TextCell["Section 2.3", "Subsection"],
TextCell["Section 3", "Section"],
TextCell["Section 2.1", "Subsection"],
TextCell["Section 2.2", "Subsection"],
TextCell["Section 2.3", "Subsection"]
}, {1, 2, 3}]
}]