Build or rebuild index from tags

When you've converted page references to text with the script described here, your text will contain codes of the form <ix>dog</ix>. These precede the word to be indexed, so you often see this: <ix>dog</ix>dog. The script described here rebuilds an index from these text codes. The script rebuilds subtopics when they're separated from the main topic by a #. Example: from this string, <ix>dog#collie#border collie</ix>, the topic dog is added to the index, the subtopic collie and sub-sub-topic border collie are added to the main topic, and a page reference is inserted in the text. The string <ix>. . .</ix> is deleted. Any existing topics are deleted first.

Other forms

The script can operate in either of two modes, which is set as a constant at the beginning of the script. Look for this line:

wrapped = false;


The script has no interface; just run it.

Show script (right-click, then Save Link/Target As to download)

Back to the main page on indexing

Back to the main script page

Installing and running scripts

Editing a script

Questions, comments? Get in touch