About Arbortext Styler > Working with Modules > Overriding Stylesheet Definitions
  
Overriding Stylesheet Definitions
Arbortext Styler enables you to override the formatting of definitions by creating additional versions of the definition higher in the module hierarchy than the default one. Any definition in the hierarchy is automatically overridden by a definition with the same name that is higher in the hierarchy. This enables you to do things such as referencing an existing stylesheet as a module but customizing it by overriding selected definitions.
The processes listed in this section apply to all the available definitions within Arbortext Styler; use the relevant definition list to carry out the creation of overrides:
Elements, contexts, and conditions
The Property Sets list icon - a small black A in the top left corner and a large blue A in the bottom right corner Property sets
The Page Sets list icon - an open book edged in blue Page sets
The Page Types list icon - a blank page with the top right corner turned over Page types
The Page Regions list icon - a page with a red text box at the bottom Page regions
The Generated Contents list icon - a page of horizontal lines Generated Content objects
The Table of Contents list icon - horizontal lines of varying widths on a grey background Tables of contents
The Custom Tables list icon - a black grid on a grey background with a blue box at the top Custom tables
The Cross References list icon - blue rectangles in the top left and bottom right corners, connected by a red arrow Cross references
The Sizes list icon - 3 horizontal lines, a green double ended arrow and a green x, bounded by vertical lines Sizes
The Combined Fonts list icon - a blue A in the bottom right corner and a red katakana character in the top left corner Combined fonts
There are three ways in which you can create an override for an existing definition:
Create a new definition in the root module
Copy and paste the definition into the root module
Copy the definition to the root module
Create a New Definition in the Root Module
1. Open your modularized stylesheet in Arbortext Styler.
2. Use the Insert menu to add a new definition to the relevant list.
3. Enter the name of the child module definition you want to override in the root module.
Arbortext Styler warns you that adding this definition to the root module will override the definition in the child module, asking you if you wish to rename the definition to avoid the override. For example, the error message shown below appears when you create a new author element for the purpose of overriding the existing author element in the Blocks module:
This is an image of the Styler message that asks if you want to proceed with creating the author element since it will have precedence over the existing element named “author” in the “blocks” module
4. Click OK to continue with creating the definition as an override of the existing definition. The display of the definition's description in the relevant list will change to advise that the definition in the module has been overridden The “overridden” precedence icon - a blue square overlaid with a white square by the new version of the definition, which now takes precedence The “overrides” precedence icon - a white square overlaid with a blue square:
The graphic below shows how two versions of the author element are displayed in the Elements list:
This is an image of the Elements list, showing two author elements. The first element is displayed in normal text, has the setting “Unstyled” in the Style column, and the icon indicating that it takes precedence over the other author element in the Precedence column. The second author element is displayed in italic text, has the setting “Block” in the Style column, the icon indicating that it has been overridden by the other author element in the Precedence column and the module name “blocks” in the Modules column
5. Style the definition as desired. This formatting will now be applied whenever the definition is encountered in this particular document.
Copy and Paste the Definition into the Root Module
1. Open your modularized stylesheet in Arbortext Styler.
2. Select the child module definition you want to override in the relevant list.
3. Select Edit > Copy and Edit > Paste to add a copy of the definition to the root module.
Arbortext Styler warns you that pasting this definition to the root module will override the definition in the child module, asking you if you wish to continue with the paste. For example, the error message shown below appears when you paste a copy of the author element for the purpose of overriding the existing author element in the Blocks module:
This is an image of a Styler message asking if you wish to continue with pasting the author element since it will have precedence over an existing author element in the “blocks” module
4. Click OK to continue with the paste process. As shown above, the definition description in the relevant list will change to advise that the element in the module has been overridden The “overridden” precedence icon - a blue square overlaid with a white square by the new version of the definition, which now takes precedence The “overrides” precedence icon - a white square overlaid with a blue square:
5. Modify the copied definition's properties as desired.
Note that this copy process is not permitted for a Size object - use the process detailed in Create a new definition in the root module above to create an override for a Size object.
Copy the Definition to the Root Module
1. Open your modularized stylesheet in Arbortext Styler.
2. Select the child module definition you want to override in the relevant list.
3. Select File > Copy to Module to open the Copy to Module dialog box.
4. Select the root module in the Copy to Module dialog box and select OK to close the dialog box and add the copied definition to the root module.
This is an image of the Copy to Module dialog box, with the name of the root module highlighted
You will see no error message asking if you wish to continue with this action, but once complete the definition's description in the relevant list will change to advise that the definition in the module has been overridden The “overridden” precedence icon - a blue square overlaid with a white square by the new version of the definition, which now takes precedence The “overrides” precedence icon - a white square overlaid with a blue square.
* 
If you want to create overrides for User Formatting Elements (UFE) and Styler Formatting Elements (SFE), you may need to select the View > User Formatting Elements and View > Styler Formatting Elements menu options to ensure these elements are displayed in the Elements list.