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

Applying Character Style GREP with forced line break

Return to Member Forum

  • Author
    Posts
    • #111404
      Anonymous
      Inactive

      Hi!

      I’m trying to apply a GREP to a character style so that it put in bold everything from the beginning of the paragraph up to either a , or a /.

      My GREP looks like this: .+?(?=[\,|])

      It works perfectly… as long as there is no forced line break in my paragraph. If that’s the case, InDesign just start to apply the GREP to the lines after the forced line break as if it was the beginning of a new paragraph.

      I’ve tried nested styles and they do the same thing.

      How can I force my GREP to stop at the first occurrence of a , or a / AND at the first forced line break?

      That would be a cleaner solution than the workaround I’d use (manually «unbold» the next lines of text).

    • #111411
      David Blatner
      Keymaster

      Whenever you are trying to apply a style from the beginning of a paragraph, nested styles is going to be easier. In this case you would make the nested style go to ,/ (if you replace the word “Words” with your own characters, the style spans to whichever one character it finds first.

      This works fine for me, even if there is a line break in the paragraph. But note that a line break is a Shift-Return. If you choose Type > Show Hidden Characters, the line break should look like an “L” on its side (not the ¶ character).

    • #111413
      Anonymous
      Inactive

      That works! I didn’t realize you could assign multiples characters to nested styles!

      Thanks!

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