About Arbortext Styler > Working with Modules > Adding New Definitions to a Module
Adding New Definitions to a Module
One of the maintenance tasks associated with modularized stylesheets is adding new definitions to one of the modules in the module hierarchy. Arbortext Styler enables you to accomplish this in two ways - adding the definition either to the module itself or to the modularized stylesheet.
The processes listed here apply to all the available definitions within Arbortext Styler; use the relevant definition list to carry out the modifications:
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
Note that these examples will create a new element definition.
Add the Definition to the Module
The advantage of this approach is that the individual module opens faster in Arbortext Styler than the complete modularized stylesheet. The disadvantage is that you cannot preview your changes, as the complete stylesheet is not available.
1. In Arbortext Editor, open a document.
2. Select Styler > Open Stylesheet to open the Open Stylesheet dialog box.
3. In the Available Stylesheets list, select the module you want to modify - use the Add button to browse your filesystem for the module if it does not currently appear in the list.
4. Click OK to close the dialog box and open the module in Arbortext Styler. Note that the module opens on the Elements list by default - if the module does not contain any elements navigate to the relevant list to find the definitions you wish to modify.
When electing to open a standalone module you may see an error advising that the module references missing definitions. It may be the case that definitions in the module you are opening reference objects in another module and, since the module is being opened independently of the modular stylesheet or module that contains those definitions, the connections cannot be made. For example, if the objects in your module contain references to property sets in their definition, the link to the property sets will not be resolved and the error will appear. Use the Tools > Validate Stylesheet menu option to confirm that this is the case if you encounter the error.
5. In Arbortext Styler, use the Insert > Element to add a new element to the Elements list.
6. Name and style the new element as desired and save the module.
Add the Definition in the Modularized Stylesheet
The advantage of this approach is that you can meaningfully preview your changes. The disadvantage is that it takes longer to open the modularized stylesheet in Arbortext Styler.
1. In Arbortext Editor, open a document with an associated stylesheet that references the module you want to modify.
2. Select Styler > Edit Stylesheet to open the modularized stylesheet in Arbortext Styler.
3. In Arbortext Styler, select Insert > Element to add a new element to the Elements list.
4. Name and style the element as desired.
5. Highlight the new element in the Elements list and select File > Move to Module. The Move to Module dialog box opens.
6. Select the module to which you want to move the element in the Move selected Elements to hierarchy and click OK. The new element is moved to the module.
7. Save the stylesheet.
When you save the stylesheet, all modified modules in the hierarchy are also saved. Note, however, that you cannot save a read-only module. You can save a module that is referenced by a read-only module, as long as the included module is not read-only.
If you want to add 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 before performing one of these options.