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

GREP or Nested Style

  • This topic has 5 replies, 3 voices, and was last updated 9 years ago by Anonymous.

Return to Member Forum

  • Author
    Posts
    • #86328
      Anonymous
      Inactive

      Having difficulty creating a paragraph style that will apply a color, bold & underline format for one (1) to say five (5) words and then no color, bold or underline beginning with a “space – space” and text to the end of the paragraph. Used for in-line paragraph format whether indented or flush. No specific words or phrases for a pattern. The only constant is the “space – space”.
      Example below (just imagine the 1st three words including the space between them, are bold, underlined (not shaded) and color applied:

      Special company data – Company data referenced in this study shall remain confidential.

      I have struggled to successfully apply a GREP that will eliminate the underline of the space before the dash. Can someone educate me. Many thanks.

    • #86329
      Ari Singer
      Member

      Try this GREP style: .+(?= – )

    • #86335
      Anonymous
      Inactive

      Ari – thank you. Your GREP works with one exception, the first “space” in the (?= – ) portion of the GREP equation remains underlined. Any further thoughts? Many many thanks.

    • #86339
      Ari Singer
      Member

      Make sure you did correctly, because by me it works.

      Create a character style that has color, bold and underline attributes. Then within the paragraph style that you want to apply this to, go to GREP styles. From the dropdown menu select your character style you just created and in the “To Text” filed enter this query: .+(?= – ).

      Make sure that you copy and paste the code correctly.

      • #86343
        Matt Isaac
        Participant

        Also make sure you don’t have a nested style that might override the GREP style as well.

    • #86344
      Anonymous
      Inactive

      Found the issue and it is fixed – oh boy!! The GREP worked with my indented Para style but not the flush. My error was in the drop caps & nested styles layout. Thanks all!

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