About Arbortext Styler > Generating Indexes > Configuring Multiple Indexes for a Document
  
Configuring Multiple Indexes for a Document
You may wish to include multiple indexes in a single document. The example below walks through how to configure multiple indexes in a document. The indexes are made up of index terms based on different elements.
In this example, it is assumed that a maintenance manual needs a general index and a parts name index. The general index appears at the end of the document, and a parts index will appear in every section of the document.
It is also assumed that the document includes a partslist element that includes child partname elements. A partsindex element inserts the parts index.
The first part of the process is to configure the general index, and scope it for the whole document. Refer to Creating an Index with Element Model Index Terms for full guidelines on how to set up an index with Element Model index terms.
1. In Arbortext Styler, select the indexterm element. Assign it the Index Term (Element Model) style, or edit the style if this has already been done.
2. In the Index Term (Element Model) Details dialog box, select the index definition object representing the index the index terms will belong to, for example Main Index.
3. On the Roles tab, configure roles for the primary and secondary index term elements. Exit the dialog box.
4. Select the index element. Assign it the Index style, or edit the style if this has already been done.
5. In the Index Details dialog box, select the same index definition object in the Index field. Exit the dialog box.
6. In the Indexes list, select the index definition object you have referenced in previous steps. In the General category, ensure that the Scope field is set to (Whole document).
Next, configure the parts index, and scope it to appear at section level.
1. Create a new index definition object that will represent the parts indexes in your document. Choose Insert > Index to create the new object and name it appropriately, for example Parts Index.
In the General category, set the Scope field to the required section element. In the Format category, configure the required styling for the index.
2. Select the context of the partname element in its parent partslist, for example partname anywhere in partlist.
It is assumed that the partname element has the Inline style, and has been configured as a cell in a custom table model.
3. In theGenerated text category for the context, add generated text before element content. Insert a new UFE, for example _ufe:partname_indexterm. Insert the element content of the current element into the UFE. Exit the Generated Text Editor.
4. Select _ufe:partname_index in the Elements list. Give it the Index Term (Nesting Element Model) style.
5. In the Index Term (Nesting Element Model) Details dialog box, select the index definition object representing the parts index, i.e. Parts Index. Exit the dialog box.
6. Select the partslist element in the Elements list. Give it the Index style.
7. In the Index Details dialog box, select the Parts Index index definition object in the Index field. Exit the dialog box.
8. If there is no specific element that inserts a parts index, you could also elect to insert the index at the end of each section. Select the section element and add generated text after element content. Choose Insert > Index. In the Index Details dialog box, select the Parts Index index definition object in the Index field. Exit the dialog box.
9. Preview your document for print or PDF. You will see two types of index - a parts index at the end of each section, plus a document index in the location specified in the first process.