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

Using GREP to find the first instance of something on a page

Return to Member Forum

  • Author
    Posts
    • #69665
      Holly Blake
      Member

      Hi everyone,

      I have a set of brand guidelines for a company which has a complicated set of rules about when registered trademark symbols should appear after the brand name.

      It boils down to: the registered trademark symbol should appear after only the first mention of the brandname on each page, unless the first mention is in a headline, in which case it should appear after the next mention.

      I should be able to take care of the headline problem by only making my GREP query part of the “body” paragraph style and not part of the headline paragraph style. It’s the ‘first mention’ part which is tripping me up.

      Is there a way to use GREP to find the first mention of the brandname on every page of a document and make sure there is a registered trademark symbol after it?

      I’ve already got this expression:

      Find: Brandname(?!~r)
      Change: Brandname~r

      which finds any mention of the brandname and adds a registered trademark symbol, unless it already has one (so it doesn’t add extra ones if there is one already there) but the finding first mention bit has got me well and truly stumped!

      Can anyone help?

      Thanks so much in advance,

      Holly

    • #69667
      David Blatner
      Keymaster

      No, I don’t think there is any way in InDesign to automate that. You might be able to have someone write a script to do it, though.

    • #69755
      Holly Blake
      Member

      Ah booo!
      Never mind, thanks for looking anyway!

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