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 In Text Variables

Return to Member Forum

  • Author
    Posts
    • #1179767
      Mattie Wells
      Participant

      Hi. I have running headers set up to show a chapter number and name. IE:

      Chapter 1: Chapter Name

      I want everything up to the colon to appear bold in the running header version. So in this case “Chapter 1:”

      I applied a GREP to the paragraph style of my running header- ^.+?:

      When I use the paragraph style on regular/non variable text my grep works, but in my variable text it apples the grep to the full line.

    • #14324330
      David Blatner
      Keymaster

      Have you tried with a Nested Style instead? Might be easier and more straightforward.
      Like this:
      https://indesignsecrets.com/video-how-to-automate-run-in-header-styles.php

    • #14324329
      Aaron Troia
      Participant

      Did you set up your running headers all within variables? Is there any part (e.g. the colon) which you typed in to the text box on your master page? One reason I can think of why GREP wouldn’t work on a running head variable is because GREP only sees a variable or variables, not the text, which is why probably it is applying your style to the whole line. If you typed in the colon on your master page, I would think it would work, but if you already did that… hmmm, I’m not sure.

    • #14324326
      Mattie Wells
      Participant

      Thanks, unfortunately the nested style option will not work either. I think its something with the variable in put. If I use the style not in a variable filed it works.

    • #14324325
      David Blatner
      Keymaster

      Oh, I think Aaron is on to something here: Did you type “Chapter 1: Chapter Title” on the page, and the variable is picking up all that text? Yeah, that won’t work. As he said, a variable is a single character — InDesign can’t “see inside” it.

      I wonder if running a script such as this would help:
      https://indesignsecrets.com/topic/script-to-convert-all-text-variables

    • #14324324
      Mattie Wells
      Participant

      Cool, thanks!

Viewing 5 reply threads
  • You must be logged in to reply to this topic.
Forum Ads