PTC ALD in Arbortext Styler > Components of Documents and Templates > Creating New Content from the Main Content Stream > Indexes > Index References
Index References
An index reference is the markers in the document content that provides the PTC Arbortext Layout Developer formatting process with the index entry information. The index reference is created using the fIndexReference object’s constructor:
var ref = new fIndexReference();
The properties of the fIndexReference object are:
fIndexReference.groups — confirms the groups in which the index reference appears
The reference can belong to multiple index groups at the same time. The groups are listed on the fIndexReference.GroupMask constant.
The value of this property is used with the value of the groups property for the appropriate fIndex control object to determine which index references appear in the generated index.
fIndexReference.sortKeys — provides the index text unless fIndexReference.displayStrings values are also specified.
The array provides up to five elements which provide the content for the five levels of index entry.
This property is also used as the sort key for the index entry.
fIndexReference.displayStrings — specifies a string to be output in the index entry as an alternative to that provided in the sort key
fIndexReference.permutates (boolean) — instructs PTC Arbortext Layout Developer whether to automatically generate all permutations of the index reference so that sublevel entries become top-level entries themselves
Use this property when specifying multiple levels of index entry in an index entry.
fIndexReference.bookmark — instructs PTC Arbortext Layout Developer to create a bookmark for the index reference point so that the index entry can link to it
The value of this property should be an fBookmarkReference object.
These properties are used to create an index reference, for example:
var ref = new fIndexReference();
ref.sortKeys[0] = "Aardvark";
ref.sortKeys[1] = "Diet";
ref.groups = fIndexReference.GROUP_1;
The fFormatting.addReference() command to add the reference to the formatting process ensures the index reference is processed.