Re: Modifying Default Stylesheet?
- To: mathgroup at smc.vnet.net
- Subject: [mg103424] Re: [mg103388] Modifying Default Stylesheet?
- From: John Fultz <jfultz at wolfram.com>
- Date: Mon, 21 Sep 2009 05:51:18 -0400 (EDT)
- Reply-to: jfultz at wolfram.com
On Sat, 19 Sep 2009 05:27:38 -0400 (EDT), AES wrote: > I'd like to modify the default stylesheet that will be used for all my > routine Mathematica work, and that will become the default or initial > stylesheet for all new notebooks that I create. > > (This is in version 7 for Mac, and the modifications will be generally > minor changes in text formats and appearance. I'll probably want to > make additional mods to some of these from time to time.) > > My basic question is, can I do this by editing the "Default" stylesheet > that is at the top of the list that appears when you select the Format >>> Stylesheet menu command? (I'd prefer to do this, for simplicity.) > > Or should I do it by creating and installing a new "MyStylesheet" that > will show up added to the bottom of that list? Either way could work, depending upon your preference. Either way, the starting point would be the same. Start in a notebook (an untitled one would be fine) whose stylesheet is Default.nb. Do Format->Edit StyleSheet... Make any initial changes you like, then click the "Install Stylesheet..." and use Default.nb or MyStylesheet.nb for the name, depending upon your preference. If you choose Default.nb, at this point it would be a good idea to restart Mathematica. You can then come back and edit this stylesheet at any time by evaluating the following command: NotebookOpen[ ToFileName[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}, "Default.nb" (* or "MyStylesheet.nb" *)]] > More specifically: > > 1) If I modify the Default stylesheet, will those changes "stick" > through future upgrades, at least in the v7.0, v7.1, v7.2 ... hierarchy? Yes. > And will changes in Default cascade down through all the Article, Book, > etc stylesheets that appear below Default in that list? Or do all of > those, including Default, inherit separately from some level that's > above Default? It will cascade through any stylesheet which inherits from Default.nb. Those stylesheets, of course, might override anything coming from Default.nb, including your changes. > And if I make or add mods to Default, what is the Install process that I > need then go through each time? After you do the install process the first time, you can just edit the file in place. Unfortunately, it's not presently possible to install over an existing stylesheet file when that stylesheet file is in use (i.e. when a notebook is open and using it, which is virtually always true for anything called Default.nb). This will be addressed in a future release. > 2) If I instead create and install a new "MyStylesheet", how do I make > it be the default stylesheet for all newly created notebooks? Change the DefaultStyleDefinitions option in the option inspector. One downside to doing this is that all notebooks you create will, by default, be set to this stylesheet, and it will produce a warning when opened by anybody you send those notebooks to if they don't have a similarly named stylesheet. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc.