Possible GREP for Indexing Help?

Learn / Forums / General InDesign Topics / Possible GREP for Indexing Help?

Viewing 2 reply threads
  • Author
    Posts
    • #78565
      Noel Sapp
      Member

      I believe this my first post here, so yay!?!!
      For context, I am formatting a reference book listing available services by city/state. With this, I must develop an Index of those services in a particular structure. Having looked around, I see references to GREP scripts but TBH, that’s a bit beyond me. I really don’t even know if GREP is the way to go, so I am posting here for opinions and/or redirection.

      The book format is something like this:

      ————–

      State01
      City01
      Topic01: Item01; Item02; Item03
      Topic02: Item01; Item05
      Topic03: Item01; Item02; Item09

      City02
      Topic01: Item01; Item02
      Topic02: Item01; Item02
      Topic04: Item01; Item04

      State02
      City01
      Topic01: Item01; Item02; Item06
      Topic02: Item01; Item02

      City02
      Topic05: Item01; Item05

      ————–

      Format and punctuation are consistent, so it may be possible to make use of the : and ; but I haven’t a clue where to begin there. The output Index must retain the following structure:

      ————–

      Topic01
      State01 (if it has any elements listed for Topic01)
      Item01…..page x, y (where x is the listing of the first city, and y is the listing of the second city using the same topic)
      Item02…..page x, y
      Item03…..page x

      State02 (if it has any elements listed for Topic01)
      Item01…..page x
      Item02…..page x
      Item06…..page x

      Topic02
      …etc.

      ————–

      I’ve tried to simplify the hierarchy as best as I can, while providing simple examples of how the items are being listed and called. I’ve done this manually in the past and can do so again if need be but I’m hoping there is an automation that I can use. Too, I would love to learn something new here!

      Thanks in advance for your time and suggestions,

      – Noel.

    • #78570
      Peter Kahrel
      Participant

      Noel,

      It’s going to be tough to change that with GREP, if it’s at all possible. Why don’t you mark up the text with index entries, so that when you generate the index you get the desired output?

      Peter

    • #78574
      Noel Sapp
      Member

      Well, like I said I’m fairly ignorant to GREP. I just found a few blogs and posts referencing it for complex indexing ideas, so that got me curious. There are several thousand individual entries to mark-up manually, so I was hoping (praying?) that there might be an automation of sorts to take advantage of.

      thanks, Peter, for the reply! Much appreciated.

      – Noel.

      P.S. Peter: I just recognized your name. I’m honored you replied! I’m reading (trying to comprehend!) your query manager info. Thanks for the resources!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
>