Copy link to clipboard
Copied
Hi There! I'm wondering if anyone can help - I'm trying to use a grep code to format the running foot text for a book I'm working on. The running foot text would have a movie title and year in parentheses, ideally looking like "Psycho (1960)".
As of now, I have a paragraph style for the RF text set to italics, and I'm hoping to create a rule so the text within the parentheses could have a character style, keeping them roman.
I've tried a couple different grep codes I found on similar boards, as well as selecting my own rules using drop-down menu options, coming out to:
Apply Style: RF rom (year)
To Text: "\(\d+\)".
But nothing seems to make a difference.
I'm wondering if anyone can help, thank you!
Like Willi implies, you will need two Running Headers (Character Style).
If you apply Nested Styles to the movie heading on each page that the variables will draw from (Roman and Italic), you can then then put the two Running Headers in the footer, one set to Style: Roman and one set to Style: Italic.
Copy link to clipboard
Copied
Personally, I would do it without GREP. Assume you have the "RF rom (year) Paragraph Style applied to the text in question.
Adjust above 'through or up to' depending on whether you want the parentheses to be Roman or not.
Copy link to clipboard
Copied
Thanks for your response! I should clarify, that the paragraph style I'm using is "RF Movie Title + Year" which is all itals, and I'm applying a character style called "RF rom (year)" to romanize the year within & including the parentheses.
Maybe it's also helpful to note, that these running feet are set as variable text so they change with each chapter/movie topic within my doc's masterpages.
Here is a screenshot of my applying the nested styles, but still the running feet text isn't displaying that way for some reason.
 
Copy link to clipboard
Copied
You get the title with title and Year as a single entity. It comes either from a text variable or something similar. InDesign does not see the paranthesis as they are a part of the text element. Neither nested nor GREP style would help here. If you want to apply a different style to the Year block and the title block, you have to separate them into 2 independent entities.
Copy link to clipboard
Copied
Like Willi implies, you will need two Running Headers (Character Style).
If you apply Nested Styles to the movie heading on each page that the variables will draw from (Roman and Italic), you can then then put the two Running Headers in the footer, one set to Style: Roman and one set to Style: Italic.
Copy link to clipboard
Copied
Thank you both, Willi and Andrew - with your help I was able to get my desired result!!
For those with a similar issue, the solution was to add two nested character styles to the A Head paragraph style your running feet is pulling from.
Copy link to clipboard
Copied
I came here to figure out why my nested style won't allow me to place a parantheses.
Copy link to clipboard
Copied
That's a numeric field only. You can only specify characters and other text markers using GREP, not a nested style.
Copy link to clipboard
Copied
I need a grep to apply a character style to the content before the parentheses below?
Lorem ipsum dolor sit (amet navicus).
Copy link to clipboard
Copied
> You can only specify characters and other text markers using GREP, not a nested style
That goes for the field before where Laura has 'Characters' in her screenshot. But click 'Characters' and you can select any of the predefined characters in the dropdown or type a character:
> I need a grep to apply a character style to the content before the parentheses below?
No, you can use a nested style, enter the opening parenthesis as shown in the screenshot, above.
Copy link to clipboard
Copied
Ah, oops. 🙂
The selections for the end element are a little... terse.
Copy link to clipboard
Copied
Hi @elissaf , Do you want the parenthesis to also be roman? I think @Andrew24943677v30i ’s example leaves them as italic, so there’s also something like this: