Customizing the Index's Appearance
The following properties are provided to customize the way the generated index looks:
• Styles (see also Styles):
• Style: specifies the style for the whole index (including headings, entries, and so on).
• HeadingStyle: specifies the style used for letter headings (the heading is a letter preceding the group of entries starting with that letter). In the generated index, each heading (usually just the capitalized letter preceding the group of entries beginning with it) is represented by a separate render object (RenderText) to which this style is applied.
• EntryStyles: an indexed property specifying the styles of entries at different levels. For instance, EntryStyles[0] (EntryStyles(0) in VB) specifies the style of entries at the top level, EntryStyles[1] (EntryStyles(1) in VB) specifies the style of sub-entries, and so on. (If the number of nested levels in the index is greater than the number of elements in the EntryStyles collection, the last style in the collection is used for nested styles.)
In the generated index, each entry (the term followed by the list of pages where it appears) is represented by a separate RenderParagraph object, to which the style determined by this property indexed by the entry's nesting level is applied. For instance, this style allows you to specify the minimum number of lines of an entry text before a page break can be inserted (via MinOrphanLines).
• EntryStyle: this is a shortcut for the first (with index 0) element of the EntryStyles collection.
• SeeAlsoStyle: allows you to specify the style of the "see also" text used to precede cross references between entries (see SeeAlso).
• Style: allows you to override the style for a particular entry.
• SeeAlsoStyle: allows you to override the style of the "see also" text for a particular entry.
• Other properties:
• RunIn: a Boolean property (False by default) which, if True, indicates that sub-entries should appear in line with the main heading rather than indented on separate lines.
• EntryIndent: a Unit property specifying the indent of sub-entries relative to the main entry. The default is 0.25 inch.
• EntryHangingIndent: a Unit property specifying the hanging indent (to the left) of the first line of an entry's text relative to the following lines (used if the list of references does not fit on a single line). The default is -0.125 inch.
• LetterSplitBehavior: a SplitBehaviorEnum property that determines how a letter group (entries starting with the same letter) can be split vertically. The default is SplitBehaviorEnum.SplitIfNeeded. Note that headings (represented by their letters by default) are always printed together with their first entry.
• Italic: similar to Bold but uses italic face instead of bold.
• LetterFormat: a string used to format the letter headings. The default is "{0}".
• TermDelimiter: a string used to delimit the entry term and the list of term's occurrences (page numbers). The default is a comma followed by a space.
• RunInDelimiter: a string used to delimit the entries when a run-in (see RunIn) index is generated. The default is a semicolon.
• OccurrenceDelimiter: a string used to delimit the list of occurrences of an entry (page numbers). The default is a comma followed by a space.
• PageRangeFormat: a format string used to format page ranges of entries' occurrences. The default is "{0}-{1}".
• SeeAlsoFormat: a string used to format the "see also" references. The default is " (see {0})" (a space, followed by an opening parentheses, followed by the format item used to output the reference, followed by a closing parentheses).
• FillChar: a character used as filler when the page numbers are aligned to the right (PageNumbersAtRight is True). The default value of this property is a dot.
• PageNumbersAtRight: a Boolean property indicating whether to right-align the page numbers. The default is False.
• EntrySplitBehavior: a SplitBehaviorEnum property that determines how a single entry can split vertically. The default is SplitBehaviorEnum.SplitIfLarge. This property applies to entries at all levels.
• Bold: a Boolean property that allows you to highlight the page number corresponding to a certain occurrence of an entry using bold face. (For example, this can be used to highlight the location where the main definition of a term is provided,.
|