About Arbortext Styler > Generating Indexes > Creating an Index with Element Model Index Terms
Creating an Index with Element Model Index Terms
Document types that provide several elements for use with indexing use the Element Model for creating index terms. For example, you might use primary, secondary, tertiary, and seealso elements all wrapped with an indexterm element to mark terms to be used in your index and use the index element to generate and format the index itself.
The following examples demonstrate how to create and modify an Element Model index term. Repeat the procedure as required to configure different elements as index terms.
Example: Creating an Element Model Index Term
1. In Arbortext Editor, open the axdindex.xml document located at Arbortext-path/samples/styler. Note that the document defines index terms (using the indexterm element as a wrapper, and the primary and secondary elements as content holders) at the start of the majority of the sect1 elements.
2. Choose Styler > New Stylesheet to create a new stylesheet.
3. In Arbortext Styler, select the indexterm element in the Elements list.
4. Give the element the Index Term (Element Model) style from the Style list, accessed via the Edit > Style menu option. The Index Term (Element Model) Details dialog box opens.
If you want to include index terms only under certain conditions, some extra configuration is required. Refer to Conditional Inclusion of an Index Term in an Index for information.
5. On the Indexes tab, note that the index definition object Main Index is already selected. The index term you’re styling will belong to all indexes set to be formatted with this index definition object.
Create and select an alternative index definition object if required. Refer to Indexes List for further information.
6. On the Roles tab, configure the roles that the primary and secondary elements should perform in the final index entry. Roles specify the level at which each element’s content is output in the index entry.
Select each element in turn in the Available elements list, and click Add to move it to the Index term elements list. Select a role for the element from the Element role field.
For example:
primary - Level 1 term
secondary - Level 2 term
7. Choose OK to save the style and exit the dialog box.
8. Note that styles have been applied to the three elements as follows:
indexterm - Index Term (Element Model)
primary - Inline, Hidden
secondary - Inline, Hidden
9. In Arbortext Editor, place your cursor directly to the left of the book element at the end of the document. Insert an index element if one does not already exist.
10. Back in Arbortext Styler, select the index element in the Elements list. Give the element the Index style from the Style list, accessed via the EditStyle menu option.
11. In the Index Details dialog box, select the index definition object that will format the index from the Index drop down list. Set the language in which the index will be sorted from the Language field.
12. Choose Preview > Print and navigate to the end of the document to view the new index.
If you want to change the look of your index, refer to Modifying the Appearance of an Index for guidelines.