Skip to main content
juliem88830734
Participant
August 17, 2022
Answered

Footer Text Variables with GREP styles.

  • August 17, 2022
  • 4 replies
  • 386 views

Hi all!

I am trying to apply the GREP style  \Chapter \d+ to my running footer. I have it set in my footer style - and it works on its own - but it refuses to apply when it is being used as part of my Text Variable (to auto apply the chapter number and title). 

I have attached a screenshot with an example. The top is when I manually type the chapter number and title, and the bottom is when it is set with the Text Variable. 

 

 

Any ideas on how to fix?

Thanks!

 

This topic has been closed for replies.
Correct answer Peter Spier

It may also be that the text inside a variable is not recognized. As far as InDesign is concerned, a variable is a single character in the text flow, not the the text that displays.

4 replies

Community Expert
August 18, 2022

Hi @juliem88830734 ,

Peter has it right. If all this, "Chapter n. Chapter Title Here" is reflected in one single text variable you cannot change the formatting inside. However, what you could do is to split the expression to two text variables for two different formattings.

 

Regards,
Uwe Laubender
( Adobe Community Professional )

Peter Spier
Community Expert
Peter SpierCommunity ExpertCorrect answer
Community Expert
August 17, 2022

It may also be that the text inside a variable is not recognized. As far as InDesign is concerned, a variable is a single character in the text flow, not the the text that displays.

Mike Witherell
Community Expert
Community Expert
August 17, 2022

~v is the GREP code for Any Variable. Don't know if that helps or not. \Chapter does not need the backslash. I agree with Scott: use a Nested Style, not a GREP

Mike Witherell
Scott Falkner
Community Expert
Community Expert
August 17, 2022

If the vertical bar is a glyph I would use that as a transition using Nested Styles instead of GREP. 

juliem88830734
Participant
August 17, 2022

Thanks! I thought of using Nested Styles but what I want is for just the word "Chapter" and then the chapter number to appear as regular weight. 

Scott Falkner
Community Expert
Community Expert
August 18, 2022

Nested Styles will handle that just fine.