Creating product index for a catalogue

Learn / Forums / General InDesign Topics / Creating product index for a catalogue

Viewing 3 reply threads
  • Author
    Posts
    • #1255987
      Earvin Chen
      Member

      Hi everyone. Could you please help with this tricky request.

      I’m working on a product catalogue, which contents more than 1000 products. A product index is required so the readers could locate the products in the catalogue easily.

      The whole product part of the catalogue has been layouted as one long table in the following order:

      Product name
      Product image
      Code A
      Code B
      Qty

      and so on…

      I have created an index in the alphabetical order of the product names using the table of contents function in InDesign. The index looks like this:

      Product name
      Code A
      Code B

      However, the client asked me to change the order of the index to

      Code A (in numerical order)
      Code B
      Product name

      I have tried quite a few times but couldn’t get it to work. Could someone please help me out? Thanks a lot.

    • #1256121
      David Blatner
      Keymaster

      Where are the page numbers? Is each line a different paragraph?

      If so, maybe you could use a grep find/change to turn the 3 paragraphs into a single paragraph with shift-returns (line breaks). Then you could sort the paragraphs with the SortParagraphs.jsx script in the Scripts panel.

      For example, you could search (in the grep tab of the find/change dialog box) for (.+)\r(.+)\r(.+)\r
      and replace it with $2\n?$3\n?$1\r

      That should find everything on the first paragraph, then 2nd paragraph, and the 3rd paragraph… and then replace it with the 2nd paragraph followed by a shift-return, then the 3rd paragraph, then the 1st paragraph.

    • #1256128
      David Blatner
      Keymaster

      Where are the page numbers? Is each line a different paragraph?

      If so, maybe you could use a grep find/change to turn the 3 paragraphs into a single paragraph with shift-returns (line breaks). Then you could sort the paragraphs with the SortParagraphs.jsx script in the Scripts panel.

      For example, you could search (in the grep tab of the find/change dialog box) for (.+)\r(.+)\r(.+)\r
      and replace it with $2\n?$3\n?$1\r

      That should find everything on the first paragraph, then 2nd paragraph, and the 3rd paragraph… and then replace it with the 2nd paragraph followed by a shift-return, then the 3rd paragraph, then the 1st paragraph.

    • #14331305
      Earvin Chen
      Member

      Hi David, Thanks for your suggestion. I have also posted on the InDesign Secrets Facebook page with screenshots. It might explain things a bit better.
      Based on your suggestions, I think instead of trying to regenerate the index in the new order, it might be easier to reorder the existing index. What a shame I don’t have the knowledge to write a script, or it should work perfectly. Thanks again.

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