Re: Stylesheet Question
- To: mathgroup at smc.vnet.net
- Subject: [mg81199] Re: Stylesheet Question
- From: David Reiss <dbreiss at gmail.com>
- Date: Sat, 15 Sep 2007 04:13:25 -0400 (EDT)
- References: <fcdfl8$prt$1@smc.vnet.net>
A couple of quick answers. There are two issues at play in what you are observing (and so you are right that it is two questions!). There ia a Notebook option, DefaultNewCellStyle, that specifies what CellStyle a new cell will be. ?DefaultNewCellStyle DefaultNewCellStyle is a notebook option which specifies the default style to use for new cells created in the notebook. If you want to change the style that new cells in a notebook will be just execute something like, SetOptions[EvaluationNotebook[], DefaultNewCellStyle -> "Text"] in the notebook. Of course this can be set at the level of the stye sheet so that any notebook that uses that style sheet will have a particular DefaultNewCellStyle. I use this option to define a button in a palette in A WorkLife FrameWork that toggles amongst several styles. IF you are writing a report, for example, you want that notebook to have DefaultNewCellStyle -> "Text", at least while you are doing a lot of writing. The second issue has to do with what happens when you are typing in a cell and then hit a charriage return. Generally this causes you to just go to a new line in that cell. But you can also set an option that, when you hit a carriage return, will cause the notebook to create a new cell of a particular type. Thisis what you are observing for the JournalArticle style sheet. This is the case for Title Author and Section cells. This makes sense because when you start typing a JournalArticle you will want the top matter to have a particular form. And when you start a new section you will want the next cell to have a particular form, and so on. Here is the style definition for the Title cell in the XXXX stylesheet. From this you can see the options at work: Cell[StyleData["Title"], DefaultNewCellStyle->"Author", DefaultReturnCreatedCellStyle->"Subtitle", MenuPosition->1100] But, if you place your insertion point between cells in a JournalArticle you will, once you start to type, create a Text cell. If you want this to be different, then, for example, execute SetOptions[EvaluationNotebook[], DefaultNewCellStyle -> "Input"] in that notebook and it will override the default "Text" cell setting for that style sheet. I hope that this helps... --David A WorkLife FrameWork E x t e n d i n g MATHEMATICA's=AE Reach...=99 http://scientificarts.com/worklife On Sep 14, 4:10 am, "Kevin J. McCann" <Kevin.McC... at umbc.edu> wrote: > In the JournalArticle Stylesheet it seems that the cell styles run > something like: Title,Author,Section,Text. That is, in a new nb the > first cell is by default Title, after that is typed in the next is > Author, and so on. > > Two questions (maybe the same), what parameters determine this, and how > can I make my own stylesheet with the same cell types, but the default > is always Input? > > Thanks, > > Kevin