And if you double-click on it in the Index Panel to open it up in the Page Reference Options dialog box, then close that dialog box without making any changes at all, it suddenly jumps to the correct place in the Index!
The contents of your variable myReversedName start with a space: the problem is in this line:
> var mySurName = myIndexTerm.slice(myBreak);
It catches the space between first and surname. So because your topic name begins with a space it is placed in the symbol section. Apparently, ID has a mechanism to correct that and removes the space when you click the item. Instead, use this:
> var mySurName = myIndexTerm.slice(myBreak+1);
> myReversedName = myIndexTerm.replace (/([^ ]+) (.+)/, "$2, $1");
Brilliant! -- Problem solved! Thank you very much Peter, once again -- Jeremy
PS: You might be wondering why I want index page ranges that go all the way to the end of the document. It's part of a workaround to get page locators that refer to illustrations appear in the same index as locators that refer to text.
For example, suppose I want a reference to an illustration on p.2, as well as keeping text references to pages 1,2,and 3. I can use GREP on the generated index to turn 1, 2, 2-999, 3 into 1, 2, 2, 3
1 person found this helpful
PS: If you're interested in some index scripting, I recently put on the web some scripts I use for dealing with indexes: http://www.kahrel.plus.com/indesign/lists_indexes.html
Yes, those are very helpful, especially the ones for tagging and untagging text. Once you've got something in tagged text form, you can do just about anything with it!
Thanks again --- Jeremy