Indexing

The following commands modify indexing entries, as applied to document text, for the purposes of generating indexes.

Text Index Names v1.3

Returns an array containing the names of all index styles defined in the frontmost document.

Active Text Index Name v1.3

Returns the name of the text index style that is currently active in the frontmost document, or the @undefined if no text indexes exist.

Set Active Text Index Name name v1.3

Makes the text index style with the given name active in the frontmost document. Returns @true if the text index style exists, or @false if the style is not known.

Remove Text Indexing v2.0

Removes all indexing (in the active text index style) from the currently selected text.

Add to Text Index [options] v1.3

Marks the currently selected text so it is included in the active text index. The newly marked text is itself used as the topic text and updates automatically as the text changes (when the generated index is rebuilt).

As of v3.0.2 the options argument should be a Hash that includes any of the following entries:

Hash Key

Hash Value

BoldTopic

The topic will appear bold in the generated index.

ItalicTopic

The topic will appear italic in the generated index.

BoldNumber

The page number will appear bold in the generated index.

ItalicNumber

The page number will appear italic in the generated index.

CrossRef

Non-empty text which will appear in the generated index instead of a page number. Formatting applied to this cross-ref are preserved and added to the generated index.

SortBy

An array of topic strings which should be used when sorting the indexing entry. Instead of an array you may instead provide a single string that joins all subtopics using a colon.

Legacy Options String

Instead of a Hash the options argument could be a string that includes zero or more of the following characters:

Character

Meaning

b

The topic will appear bold in the generated index.

i

The topic will appear italic in the generated index.

c

The page number will appear bold in the generated index.

j

The page number will appear italic in the generated index.

Add to Text Index As topics, [options] v3.0.2

Marks the currently selected text so it is included in the active text index.

The topics argument can be one of the following:

1. An empty string or the @undefined value: the newly marked text is itself used as the topic text and updates automatically as the text changes (when the generated index is rebuilt).

2. A topic string where sub-topics are separated by colons, eg: "Vampires:Dracula".

3. An array of strings, where each is treated as a sub-topic.

The options argument is just as in the Add to Text Index command (above).

Note: prior to v3.0.2 this command took the form:

Add to Text Index As topics, [crossRef], [options] v1.3

This is the legacy form of this command that expects an options string.


Previous Chapter
Targeting Selections
<<  index  >>
 
Next Chapter
Object Overview