Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Table of contents showing the first word only from a paragraph style

Return to Member Forum

  • Author
    Posts
    • #14360244
      Julie Gomes
      Participant

      I am starting to get into GREP and have tried many things without much luck. What I am trying to do is create a Table Of Contents for a 240 page catalog, which would pull/extract/match the first word from every line that has paragraph style “Product Number” applied to it. The first word in each of these styles is the product SKU. I don’t need the following text after the SKU to display in the TOC. Each of the lines has a different number of tabs and text following after the SKU.

      LIST OF “Product Number” STYLES:

      BH1000 42”L x 52”W Unfolded Black $00.00 each
      SC1 $00.00 each
      BE10 $00.00 each
      UMP $00.00 each
      GRK $00.00 each
      78BLK 6”L x 3”W $00.00 each
      75B 9”L x 9”W $00.00 each
      UMKT 9”L x 12”W $00.00 each

      DESIRED RESULT IN THE TOC:
      SKU PAGE #
      75B 1
      78BLK 1
      BE10 1
      BH1000 1
      GRK 1
      SC1 1
      UMKT 1
      UMP 1

      Screenshot: https://snipboard.io/NLnOEe.jpg

      Thank you in advance for your help!

    • #14360247
      David Blatner
      Keymaster

      You might want to use something like IndexMatic to do this. Here’s an article about an older version, but it will get you to the right place:

      Building an Index Using Character Styles or External Word List

    • #14360249
      Julie Gomes
      Participant

      Thank you! I am going to try this out.

    • #14360250
      Julie Gomes
      Participant

      Just a note, I also need to have this work for a 19-chapter book. Unless I run this script for each of the 19 chapters and then copy/paste the results into one document.

Viewing 3 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads