Styles and the Inheritance of Option Settings
| Global | the complete front end and all open notebooks |
| Notebook | the current notebook |
| Style | the style of the current cell |
| Cell | the specific current cell |
| Selection | a selection within a cell |
The hierarchy of levels at which options can be set.
Here is a notebook containing three cells. |
This is what happens when the setting CellFrame->True is made specifically for the third cell. |
This is what happens when the setting CellFrame->True is made globally for the whole notebook. |
This is what happens when the setting is made for the "Section" style. |
In the standard notebook front end, you can check and set options at any level by using the menu item. If you do not set an option at a particular level, then its value will always be inherited from the level above. Thus, for example, if a particular cell does not set the
CellFrame option, then the value used will be inherited from its setting for the style of the cell or for the whole notebook that contains the cell.
As a result, if you set
CellFrame->True at the level of a whole notebook, then all the cells in the notebook will have frames drawn around them—unless the style of a particular cell, or the cell itself, explicitly overrides this setting.
| • Choose the basic default styles for a notebook |
| • Choose the styles for screen and printing style environments |
| • Edit specific styles for the notebook |
Ways to set up styles in a notebook.
Depending on what you intend to use your
Mathematica notebook for, you may want to choose different basic default styles for the notebook. In the standard notebook front end, you can do this by selecting a different stylesheet in the menu or by using the menu item.
| "StandardReport" | styles for everyday work and for reports |
| "NaturalColor" | styles for colorful presentation of everyday work |
| "Outline" | styles for outlining ideas |
| "Notepad" | styles for working with plain text documents |
Some typical choices of basic default styles.
With each choice of basic default styles, the styles that are provided will change. Thus, for example, the
Notepad stylesheet provides a limited number of styles since it is designed to work with plain text documents.
Here is a notebook that uses NaturalColor default styles. |
Options for specifying style environments.
Within a particular set of basic default styles,
Mathematica allows for two different style environments: one for display on the screen, and another for output to a printer. The existence of separate screen and printing style environments allows you to set up styles which are separately optimized both for low-resolution display on a screen, and high-resolution printing.
| "Working" | onscreen working environment |
| "Presentation" | onscreen environment for presentations |
| "Condensed" | onscreen environment for maximum display density |
| "Slideshow" | onscreen environment for displaying slides |
| "Printout" | paper printout environment |
Some typical settings for style environments.
The way that
Mathematica actually sets up the definitions for styles is by using
style definition cells. These cells can either be given in separate
stylesheet notebooks, or can be included in the options of a specific notebook. In either case, you can access style definitions by using the menu item in the standard notebook front end.