The script converts all page references in a document to text tags of the form <ix>dog</ix> and inserts these where the page reference occurs in the text. This is usually right before the first character of the indexed word, so that you end up with e.g. <ix>dog</ix>dog: the first dog is the topic from the index, the second one is the actual word in the text. These two are not necessarily the same, as the next example shows, which involves subtopics.
Any subtopics are separated from the main topic and other subtopics by #. Example: all page references to the topic dog with subtopic collie which itself has a subtopic border collie are replaced with the text string <ix>dog#collie#border collie</ix>. If a page reference to this topic chain occurred at the phrase border collie in the text, you would see this: <ix>dog#collie#border collie</ix>border collie. After converting all page references, all topics are deleted and the index is cleared.
The script has no interface; just run it. You could change the codes that the script expects with other codes. The index can be rebuilt later using this script.
Show script (right-click, Save Target/Link As to download)
Back to the main page on indexing
Installing and running scripts
Questions, comments? Get in touch