Index References
An index reference is the markers in the document content that provides the PTC Advanced Print Publisher 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 Advanced Print Publisher 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 Advanced Print Publisher 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;
formatting.addReference(ref);
The fFormatting.addReference() command to add the reference to the formatting process ensures the index reference is processed.