This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Other Information / Style Sheets / Style Environments  /

How Settings for a Style Are Determined

The settings used for a cell in a particular style are a combination of the following definitions within a style sheet (listed in order of decreasing precedence).

▪ The format type definition cell: this cell sets options to any cells in the notebook that have a specified format, such as TraditionalForm or StandardForm. The format types typically used are listed in the Cell Display As submenu. (The list of all format types is available in the style sheet.) StandardForm, InputForm, and OutputForm expressions use a monospaced font to ensure that the expressions display properly. This font is set in each definition cell for the format type. TraditionalForm cells automatically italicize single letters and use traditional function notation because these options are set in the TraditionalForm style definition. These cells are labeled "Prototype for style formattype". The underlying cell expression is formattype options .

▪ The style environment definition cell: this cell sets options that are applied only to the listed cell style and only in the listed environment. This cell is normally in a closed cell group with the style definition cell. It is labeled "Modification for style style in style environment environment". The underlying cell expression is style environment options .

▪ The style definition cell: this is the main style definition cell, labeled "Prototype for style: style". The underlying cell expression is style options .

▪ The environment definition cell: this cell sets options that are applied to all cell styles in the listed environment. This is an easy way to set options that should apply to all cells when using a particular environment, such as font size or page width. These cells are labeled "Modification for all styles in the style environment environment". The underlying cell expression is environment options .

▪ The notebook definition cell: the options listed here are applied to all cells in the notebook. It is labeled "Prototype for style Notebook". The underlying cell expression is options .

If an option is applied in more than one place, the option that is set in the cell with higher precedence is used. For example, if the style sheet had and , the setting that applies only to Input cells ( is used in Input cells. All other cells will use the background color as set for the entire notebook ( . Only those options that need to be reset should be applied to style environment definition cells. Most options should be set in the style definition cells.

If no cell definition is given for a particular style and a particular environment, then the other definitions of settings are used. For example, in the default style sheet most styles do not define a variation for the "Working" environment. Therefore, the main style definition cell and options define all the options applied to the various cell styles within the Working environment.

Variations for all styles in a given environment are typically defined in a separate section near the top of the style sheet.