Forum Discussion

cmulder040's avatar
cmulder040
Copper Contributor
Apr 12, 2021

Index - hyphened page numbers

Is there an Index field code switch for getting subsequent page numbers grouped when making the Index?

Example: an entry XXX appears in the book on pages: 10, 22, 23, 45, 85, 86, 87 and 127.
My desire is then to get in the Index :  XXX …….... 10, 22-23, 45, 85-87, 127

Is there a switch or another manner to get the pages in groups of sequential page numbers…?
I see this often in books and looks very elegant. 

  • Rich89's avatar
    Rich89
    Brass Contributor

    This can be done, but not using switches. Instead you use bookmarks, and, depending on how many things you have to mark, it could be quite tedious. You are right, though, it looks much cleaner. I quickly threw together an Index and took a snip for you I'll attach here too.

     

    So, the way you do this is using bookmarks.  Say you have a word to index on page 2, 3, and 4.  First you make a bookmark by selecting from the first instance of the word to through the last instance.  Let's say the word is "Car" as in my example.  Insert a bookmark and name it something sensible like, "carPageRange1".  Then, go back to the first instance in this range, highlight it, mark it for the index.  In the Marking window, select the "page range" option and, in the drop down that will now be accessible, select the bookmark "carPageRange1".  You needn't mark all the instances in this range, just the first one.

     

    You will need to make a bookmark like this for any ranges.  For any one off Marking of the word that is not part of a range, you mark this like normal.  Then, when you build the Index, it will do the page numbering like in my example. cmulder040 

Resources