Index - hyphened page numbers

%3CLINGO-SUB%20id%3D%22lingo-sub-2267966%22%20slang%3D%22en-US%22%3EIndex%20-%20hyphened%20page%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2267966%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20an%20Index%20field%20code%20switch%20for%20getting%20subsequent%20page%20numbers%20grouped%20when%20making%20the%20Index%3F%3CBR%20%2F%3E%3CBR%20%2F%3EExample%3A%20an%20entry%20XXX%20appears%20in%20the%20book%20on%20pages%3A%2010%2C%2022%2C%2023%2C%2045%2C%2085%2C%2086%2C%2087%20and%20127.%3CBR%20%2F%3EMy%20desire%20is%20then%20to%20get%20in%20the%20Index%20%3A%26nbsp%3B%20XXX%20%E2%80%A6%E2%80%A6....%2010%2C%2022-23%2C%2045%2C%2085-87%2C%20127%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20there%20a%20switch%20or%26nbsp%3Banother%20manner%20to%20get%20the%20pages%20in%20groups%20of%20sequential%20page%20numbers%E2%80%A6%3F%3CBR%20%2F%3EI%20see%20this%20often%20in%20books%20and%20looks%20very%20elegant.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2267966%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2298015%22%20slang%3D%22en-US%22%3ERe%3A%20Index%20-%20hyphened%20page%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2298015%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20can%20be%20done%2C%20but%20not%20using%20switches.%20Instead%20you%20use%20bookmarks%2C%20and%2C%20depending%20on%20how%20many%20things%20you%20have%20to%20mark%2C%20it%20could%20be%20quite%20tedious.%20You%20are%20right%2C%20though%2C%20it%20looks%20much%20cleaner.%20I%20quickly%20threw%20together%20an%20Index%20and%20took%20a%20snip%20for%20you%20I'll%20attach%20here%20too.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%2C%20the%20way%20you%20do%20this%20is%20using%20bookmarks.%26nbsp%3B%20Say%20you%20have%20a%20word%20to%20index%20on%20page%202%2C%203%2C%20and%204.%26nbsp%3B%20First%20you%20make%20a%20bookmark%20by%20selecting%20from%20the%20first%20instance%20of%20the%20word%20to%20through%20the%20last%20instance.%26nbsp%3B%20Let's%20say%20the%20word%20is%20%22Car%22%20as%20in%20my%20example.%26nbsp%3B%20Insert%20a%20bookmark%20and%20name%20it%20something%20sensible%20like%2C%20%22carPageRange1%22.%26nbsp%3B%20Then%2C%20go%20back%20to%20the%20first%20instance%20in%20this%20range%2C%20highlight%20it%2C%20mark%20it%20for%20the%20index.%26nbsp%3B%20In%20the%20Marking%20window%2C%20select%20the%20%22page%20range%22%20option%20and%2C%20in%20the%20drop%20down%20that%20will%20now%20be%20accessible%2C%20select%20the%20bookmark%20%22carPageRange1%22.%26nbsp%3B%20You%20needn't%20mark%20all%20the%20instances%20in%20this%20range%2C%20just%20the%20first%20one.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20will%20need%20to%20make%20a%20bookmark%20like%20this%20for%20any%20ranges.%26nbsp%3B%20For%20any%20one%20off%20Marking%20of%20the%20word%20that%20is%20not%20part%20of%20a%20range%2C%20you%20mark%20this%20like%20normal.%26nbsp%3B%20Then%2C%20when%20you%20build%20the%20Index%2C%20it%20will%20do%20the%20page%20numbering%20like%20in%20my%20example.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1023689%22%20target%3D%22_blank%22%3E%40cmulder040%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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. 

1 Reply

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