Message Boards Message Boards

0
|
9611 Views
|
6 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Changing the Notebook Stylesheet

Posted 8 years ago

Hi: I try to understand Stylesheet setup.

Issue #1: When Mathematica is launched with new Notebook the Default stylesheet is checked ( I access this by clicking Format/Stylesheet). The Input Font is set to Bold. I would like to change this to Regular. By selecting Format/Edit Stylesheet I see the message "Inheriting base definitions from stylesheet Default.nb". I make the changes to the Input Font but I see no way to save the changes made to update Default.nb.

Issue #2: A workaround for Issue #1 is to select Format/Edit Stylesheet and make the desired Font changes. Then click Install Stylesheet. Enter a new Install name and click ok. This changes the Notebook Stylesheet and makes an entry of the new Install name in the Format/Stylesheet selection list. However, a change to the Font name is ignored and the Font name reverts to Courier New. So selecting this new Install name in the Format/Stysesheet listis an extra step when opening a new Notebook.

Thoughts about this would be appreciated...

POSTED BY: John Steigerwalt
6 Replies

You can't edit or change the Default.nb, or at least you shouldn't. It's part of the Wolfram Mathematica Installation and probably protected.. You can edit the stylesheet initially attached to your working notebook. Then install it under a different name, SteigerwaitDefault.nb say.

I'm not sure what's going wrong with issue#2. I just edited the Input style to Verdana Regular (which Mathematica changed to Plain) and it was recognized in the stylesheet and in the notebook. But I tried Lucida Calligraphy and that was recognized in the stylesheet but not in the notebook. When I added FontFamily -> "Lucida Calligraphy" to the underlying options in the notebook cell it did recognize the font. So here I think you did find a bug. Some fonts work and some don't.

Once you attach a stylesheet to a notebook it will automatically be used. But new notebooks will use the WRI Default.nb. I think you can change that by using the Option Inspector. Select Global Preferences. Then look in Global Options, File Locations, DefaultStyleDefinitions and change "Default.nb" to your preferred stylesheet. I think you have to click on the little gray square and then go to the installed stylesheet.

It seems to me that it should be fairly easy to change the settings of Default.nb used as the Stylesheet for new Notebook sessions. But apparently it is more of a big deal to do this than I anticipated. As you state the Option Inspector seems to be a good place to do this. Attached is a screen sheet of Option Inspector, not quite the same as you indicated. Unfortunately, searching the menu is rather cumbersome in that the menu window is very small and cannot be expanded. I went through the entire menu but was unable to locate DefaultStyleDefinitions. But maybe I am missing something very obvious. The initial step of attaching a customized Stylesheet (created with Menu/EditStylesheet/Install Stylesheet and accessed by Menu/Stylesheet) to each new Notebook is no big deal. Just didn't want to do that extra step if it could easily be avoided. Again, thank you for your efforts...

Attachments:
POSTED BY: John Steigerwalt

The process of editing stylesheets is a bit cumbersome at first, if it is helpful there is a tutorial that guides you through the process in the documentation at http://reference.wolfram.com/language/tutorial/WorkingWithStylesheets.html.

POSTED BY: Kyle Keane

You can't edit or change the Default.nb, or at least you shouldn't. It's part of the Wolfram Mathematica Installation and probably protected.. You can edit the stylesheet initially attached to your working notebook. Then install it under a different name, SteigerwaitDefault.nb say.

I'm not sure what's going wrong with issue#2. I just edited the Input style to Verdana Regular (which Mathematica changed to Plain) and it was recognized in the stylesheet and in the notebook. But I tried Lucida Calligraphy and that was recognized in the stylesheet but not in the notebook. When I added FontFamily -> "Lucida Calligraphy" to the underlying options in the notebook cell it did recognize the font. So here I think you did find a bug. Some fonts work and some don't.

Once you attach a stylesheet to a notebook it will automatically be used. But new notebooks will use the WRI Default.nb. I think you can change that by using the Option Inspector. Select Global Preferences. Then look in Global Options, File Locations, DefaultStyleDefinitions and change "Default.nb" to your preferred stylesheet. I think you have to click on the little gray square and then go to the installed stylesheet.

Thanks for the ideas... However, my conclusions: Issue #1: There is no way to edit the file Default.nb that is used for the default StyleSheet for a new Notebook. I use Menu/Format/EditStylesheet to create a new Stylesheet (this inherits from Stylesheet Default.db and includes edits) and save it using Install Stylesheet. Then rename this new Stylesheet to Default.nb and copy into FrontEnd\Stylesheets\ folder. Mathematica then will not launch after this change.

Issue#2: There is some bug in Menu/Format/EditStylesheet so that it refuses to recognize the edited Fonts and reverts back to Courier New. The other edited parameters, Face, Size, Background Color etc. are recognized.

POSTED BY: John Steigerwalt

Use Menu, Format, Edit Stylesheet and make your change. But I think you want the Face to be Plain, not Regular. This change should alter the look of the entry in the Stylesheet and also in the notebook. If you just want to attach the style to the specific notebook you can close the stylesheet at that point.

If you want to Save the stylesheet for general use in other notebooks, then use Install. This will install the notebook in your

$UserBaseDirectory/Mathematica/SystemFiles/FrontEnd/StyleSheets 

folder. It will appear on your Format, Stylesheet menu.

But the stylesheet will still be attached to your notebook. Now use the Stylesheet menu to specify the new installed stylesheet.

If you are sending your notebook to someone then you will also have to send the stylesheet (and tell them where to put it) or you will have to attach it again to your notebook.

If you are also going to have other things, such as a package, and are working on some specific application, then you might want to create an application. These also have a place for stylesheets and can include notebooks so you could just zip up the application and send it to another person. The notebooks would automatically use the stylesheet and you wouldn't have to give any special instructions. I describe how to build an application and stylesheets at my web site. A Mathematical Style. Few people seem interested in this however.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract