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 to bold products names?

Return to Member Forum

  • Author
    Posts
    • #55252

      I'm trying to find an elegant way to bold each of our products names every time they're used in the copy style. Sometimes they'll have the company's name first, for example Adobe InDesign some of the time, but just InDesign at other times. We don't want to bold the company name every time it's used, only when it's combined with the product name.

      The below works in the Find GREP, but not in my GREP style:

      (?<=Company)|(?<!Comapny) Productname1|Productname2|Productname3|Productname4|Productname5

      Right now I have the following in my GREP style:

      (Company Productname1|Productname1|Company Productname2|Productname2|Company Productname3|Productname3| Company Productname4|Productname4| Company Productname5|Productname5)

      It's long, ungly and hard to edit (especially in the one line you get in the dialog box). We frequently have to add and modify product names and it'd be easier if we only had to do so in one spot.

      Additionally, is there any way to make the GREP style reference an outside text file containing all this info? We have multiple brochures using this GREP style and have to remember to open and update each style when a product is added or renamed. Worse, there are multiple styles referencing the same list (body bopy, headers, captions)!

      I'm still working on learning GREP as I go, any help will be most appreciated! Thank you :-)

    • #55266

      Hello,

      I can't help you to write the regex but it seems that wildcard Or combined with a lookbehind is the good solution.

      But I can suggest you Peter Karhel's script Grep editor, just updated : https://www.kahrel.plus.com/ind&#8230;..ditor.html

      Best

    • #55285

      .. Adobe InDesign some of the time, but just InDesign at other times. We don't want to bold the company name every time it's used, only when it's combined with the product name.

      You started out good, but made it a bit more complicated than necessary with the lookbehinds (as in: you are first checking if there is a “Company” before, then if there is not!).

      This works just fine:

      ((Adobe )?(InDesign|Illustrator|Photoshop))|((Quark )?(XPress|Promote))

      but it might be better to use separate GREP styles for each firm. Less hard work for poor Indy! Easier to maintain, as well. Like this:

      (Adobe )?(InDesign|Illustrator|Photoshop)

      (Quark )?(XPress|Promote)

    • #55308

      Thanks, Jongware! That seems to be working, and much easier than what I had before :-)

    • #81231
      Anonymous
      Inactive

      That is nice, but sometimes shouting your brand name is not always the possible solution to generate better sales, but instead change the entire name or possible add some slogan or tagline which you think it can attract every potential clients. This corporate naming tips at https://eatmywords.com/portfolio/names-in-a-nutshell/ certainly will be the best resources.

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