Legacy Documentation

Publicon® (2004)

This is documentation for an obsolete product.
Current products and services

Documentation  / Publicon  / User Guide  / Advanced Features  / Using Style Sheets  / Style Environments  /

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 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 Cell[StyleData["style", "environment"], options].

• The style definition cell: this is the main style definition cell, labeled "Prototype for style: style". The underlying cell expression is Cell[StyleData["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 Cell[StyleData[All, "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 Cell[StyleData["Notebook"], options].

If an option is applied in more than one place, the option that is set in the cell with higher precedence is used. 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 Screen environment. Therefore, the main style definition cell and Cell[StyleData[All, "Screen"], options] define all the options applied to the various cell styles within the Screen environment.

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