3 Replies Latest reply on Dec 12, 2014 3:20 PM by Colin Flashman

    Indexing the names of people en masse in InDesign

    Colin Flashman Adobe Community Professional

      Hello everybody.

       

      I have a family history book that will need to be indexed shortly. While I'm not new to indexing, I don't do it very often, so not sure if what I need is possible.

       

      In short, I need to index the names of rather a lot of people in a family history book that has all of the text in one long text frame. The good news is that a character style has been applied to the names that need to be indexed, and there a plethora of similar scripts that allow indexes to be created from character styles. Unfortunately, the way the index needs to be constructed means that these scripts can't be used. The index needs to have the individual's surname as topic level 1, and then given names as topic level 2.

       

      For example, the names Christopher Cross Griffin, Lois Griffin, Meg Griffin and Peter Griffin need to appear in the index as:

       

      Griffin,

           Christopher Cross...

           Lois...

           Meg...

           Peter...

       

      Aforementioned scripts from Martin Fischer, Peter Kahrel and Josha Hubbers will certainly add the names as index entries, but only to topic level 1. This means when the index is created, the names will appear like so:

       

      Christopher Cross Griffin

      ...<other entries>

      Lois Griffin

      ...<other entries>

      Meg Griffin

      ...<other entries>

      Peter Griffin

       

      Without using a script, adding a name to an index entry as a person's name is normally done by highlighting the entry and then using the shortcut shift+option+command+] (on a mac). This successfully puts the surname first, adds a comma and then enters the given names... but this enters a name as topic level 1. It does not put the surname as topic level 1 and given names as topic level 2. It would create an index that looks like this:

       

      Griffin, Christopher Cross...

      Griffin, Lois...

      Griffin, Meg...

      Griffin, Peter...

       

      There are two other scripts that create index entries based on lists, but not sure if they use index markers, or would specifically do what I'm after.

       

      As I can see it, I have three options:

      1) Do it all manually;

      2) Use a script from Kerntiff software called Quickindex - this will allow topic level 1 and 2, but only via manual intervention... so still manual work, but nowhere near as much as it would without this script; or

      3) Export the text to an indesign tagged text file, use an appropriate GREP to find the character style tags and add the index markers... sounds complicated but i've written about it elsewhere, would just need to modify my GREP to have two topic levels: Wrangle up InDesign index entries… without InDesign. | Colecandoo!

       

      This brief requires that pages may change, so the index may change at a moment's notice, so using a find/change/GREP on the index at the end is not a preferred option.

       

      However, does anyone else have any other ways of doing this, can see something i've missed, or point me in the direction of a utility that might help?

       

      Many thanks,

       

      Colin

        • 1. Re: Indexing the names of people en masse in InDesign
          vinny38 Level 4

          Colin

          You seem to be a GREP specialist, so I guess I won't be able to bring up directions you wouldn't be aware of...

          Actually, I don't understand why you seem reluctant to Option 3... How come updating the index could be a problem?

           

          Assuming you have a char style applied on first names and another one for last names, I would go for Option 3:

           

          Find:

          (<cstyle:firstname>)(.+?)(<cstyle:>)(\s)(<cstyle:lastname>)(.+?)(<cstyle:>)

           

          Replace by:

          <Idx:=<IdxEnType:IdxPgEn><IdxEnRngType:kCurrentPage><IdxEnDispStr:$6><IdxEnDispStr:$2>><cs tyle:firstname>$2<cstyle:> <cstyle:lastname>$6<cstyle:>

           

          Obviously, that would work only for pattern "first name" + "any space" + "last name"... but you know that...

          • 2. Re: Indexing the names of people en masse in InDesign
            Obi-wan Kenobi Adobe Community Professional

            Hi Colin,

             

            4th option: the best approach to make Indesign index sub-entries I've read has been written a long time ago (2009) by Guy Burns. 

            [ After fixing bugs, tested at the time with InDesign CS4! Great! ]

            • 3. Re: Indexing the names of people en masse in InDesign
              Colin Flashman Adobe Community Professional

              @Obi-wan Kenobi - Is this the article you mean? http://www.kahrel.plus.com/indesign/index_edit_topics.pdf Could be promising. Will try it out soon and report back.

               

              @vinny38 - there isn't a reluctance by me to do it. The names are in one style only - given names and surnames, but it is still possible to GREP this solution... at either stage (e.g. make one style TWO while in indesign, OR let the GREP in Textwrangler differentiate between the first words and last whole word). This solution will work in my instance if the text is in one continuous story... if the text was in several stories (or hundreds or thousands) then this method wouldn't be as appropriate, and I'd try Obi's method above... though that will still require the index entries to be listed using the shortcut shift+option+command+] . Obi's method in this instance will require a one-off roll-through using find/change to find each character style and then apply the shortcut, but on 700 entries at arguably 5 seconds an entry, will take just under an hour.

              • 4. Re: Indexing the names of people en masse in InDesign
                Colin Flashman Adobe Community Professional

                Looks like the answer lies in one of Peter Kahrel's scripts that Obi-Wan Kenobi was referring to: http://www.kahrel.plus.com/indesign/index_edit_topics.html


                It also answers my question a little better than my third suggestion of saving out an indesign tagged text format, given that my brief has changed - instead of being one frame with index entries highlighted in a character style, it is in fact hundreds of text frames with TEN different PARAGRAPH styles assigned... so my workload just went up with or without a script!

                 

                I have formulated a way to do this but it is a single serving purpose and will just bore readers to tears, so not worth posting here.