About Arbortext Styler > Generating Indexes > Configuring Alternative Sorting of Index Terms
  
Configuring Alternative Sorting of Index Terms
You can include index-sort-as elements to provide information for your index. This element applies a sort characteristic to an index term, defining the group in which it should appear. This setting will override an index term’s default alphabetic placement in the index.
A common use for sorting of this nature is to disregard leading punctuation in the index term, or convert leading digits to their names.
This process describes steps to set up index-sort-as elements in an index that you have already created. The example assumes the use of a document type based on the DITA model. Index terms are based on the Nesting Element Model.
Example: Configuring Alternative Sorting
1. In your DITA document, enter nested indexterm and index-sort-as elements as shown in the example below:
This image shows the text and markup <p><indexterm>DITA<indexterm>editing<indexterm>edit with Arbortext Editor</indexterm></indexterm></indexterm><indexterm>DITA<indexterm>styling<indexterm>style with an Arbortext Styler stylesheet</indexterm></indexterm></indexterm><indexterm>Styling DITA documents<index-sort-as>DITA</index-sort-as></indexterm>This is a test sentence that describes how to edit DITA documents, and style them with a Styler stylesheet</p>
Here you have specified that the index entry Styling DITA documents should be indexed under the heading “D”, rather than the heading “S” as it would appear with regular sorting.
2. Choose Styler > Edit Stylesheet to edit the associated stylesheet.
3. In Arbortext Styler, select the indexterm element and edit its style via the Edit > Edit Style Details menu option. The Index Term Details (Nesting Element Model) dialog box opens.
4. On the Roles tab, configure the roles that the index-sort-as element should perform in the final index entry. Roles specify the level at which an element’s content is output in the index entry.
Select the index-sort-as element in the Available elements list, and click Add to move it to the Index term elements list. Select the Sort as role for the element from the Element role field.
5. Choose OK to save the style and exit the dialog box.
6. Note that indexterm and index-sort-as elements now have the following styles:
indexterm - Index Term (Nesting Element Model)
index-sort-as - Inline, Hidden
7. Select Preview > Print. In the Print Preview window, note that the index now contains two principal entries under the “D” heading:
This is an image of the index output, showing both the indexterm and index-sort-as entries under D