6
$\begingroup$

In various sections in my notebook I'd like the default cell type to be different, if possible, how can I specify this?

$\endgroup$
0
5
$\begingroup$

Contrary to my understanding of Kuba's comments below the question DefaultNewCellStyle is a supported option for individual Cells. For example you can create a Notebook with three Chapters, each with a different default cell style:

CreateDocument[{
  Cell["New cells are Input", "Chapter", DefaultNewCellStyle -> "Input"],
  Cell["New cells are Text", "Chapter", DefaultNewCellStyle -> "Text"],
  Cell["New cells are Code", "Chapter", DefaultNewCellStyle -> "Code"]
}]

Now creating cells under each section merely by typing at the insertion point (horizontal line):

enter image description here

You can set the Option using the Option Inspector or programmatically as above.

$\endgroup$
2
  • 1
    $\begingroup$ I forgot for a minute to not trust documentation and this is what happens. $\endgroup$
    – Kuba
    May 14 '15 at 9:40
  • $\begingroup$ @Kuba touché! :^) $\endgroup$
    – Mr.Wizard
    May 14 '15 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.