Copy link to clipboard
Copied
Hello everybody,
I have a question concerning GREP styles inside Paragraph styles.
1. I've created a text variable to generate a recurring title on the upper side of the page based on the main title paragraph style;
2. The recurring title is in Adobe Garamond Small Caps, all letters in lower case, and it is formatted with a paragraph style sheet in the master page;
3. I want to create a GREP style for the recurring title, according to which every time that in the recurring title appear an apostrophe or the double quotes, they are automatically lowered 2pt on the baseline
(I already created the character style sheet that lowers letters of 2pt).
What I need is the correct GREP formula to automatically apply the character style sheet to apostrophes and double quotes, in the line of text generated by the text variable...
Thanks for your help
p.
Copy link to clipboard
Copied
Text variables do not "generate" a line of text, so this cannot be done with text variables. You have to convert them to plain text first.
Copy link to clipboard
Copied
Hello Jongware,
so how do I convert them to plain text? is it possible to do it automatically?
Copy link to clipboard
Copied
When I need to convert variable to plain text, I like to use the «tomaxxiVARIprocessor» script. You can find it here: Downloads | tomaxxi.com | All about Adobe Creative Suite
Copy link to clipboard
Copied
Hi,
I think it's time to take a look to Power Headers, a very (very very) clever tool written by Harbs, of in-tools.com!
No other comment!
Copy link to clipboard
Copied
not bad, I'll definitely take a look!
thanks guys!!!
Copy link to clipboard
Copied
Thanks for the "plug" for PW.
Besides applying GREP-like styles, the GREP Processors in Power Headers enables things like automatically abbreviating headers and the like. There's two types of GREP Processors. One is limited to a single variable, while the other works in the whole header frame so it's possible to have some really interesting interactions between different variables.
Two features I've wanted to add to Power Headers for quite a long time is:
1) "script processors" which would allow saving some script snippets in a variable and have that script run on each header as it's produced. This would go along with some standardized variable names which would reference things like the text and the header frame.
2) Backwards headers to enable things like "next instance".
Of course life has been very busy and I've never gotten around to adding these features... Do they sound interesting?
Harbs
Copy link to clipboard
Copied
Hi Harbs,
Cool to read you!
I use a script that create headers, e.g., on left page inserting the 3 last words on the previous page (previous right page) and on right page inserting the 3 first words of the following page (following left page).
Not sure that Power Headers can actually do it?
Another point: Power Headers doesn't actually work with ID CC 2014? I've tried and apparently can't make it work! Can you confirm me this point?
Copy link to clipboard
Copied
I use a script that create headers, e.g., on left page inserting the 3 last words on the previous page (previous right page) and on right page inserting the 3 first words of the following page (following left page).
Not sure that Power Headers can actually do it?
I don't think so (although that might be a use for "script processors"). What's the application for that kind of header?
Another point: Power Headers doesn't actually work with ID CC 2014? I've tried and apparently can't make it work! Can you confirm me this point?
Correct. We're working on getting out CC 2014 support, but it's taken longer than I would have liked...
Copy link to clipboard
Copied
Thanks for the suggestion!
Copy link to clipboard
Copied
any advice on the GREP formula that I need?
GREP formula to automatically apply the character style sheet to apostrophes and double quotes
Copy link to clipboard
Copied
Hi,
As I said, using Power Headers is the best way to do it.
As Power Headers treats the header as "live text", you can use a simple grep style inserted in the header para style:
… to obtain:
For the sample, I use a char style named "-2pts" with Shift -5 pts and Green color to show you the place of ' and ".
Don't forget that, even Power Headers treats the header as "live text", you only have to update Power Headers to make an update of the headers!
Even I use in another cases Tomaxxi's [JS] and it's a good way to treat the question, Jean-Claude Tremblay's solution is less interesting because the variable used is converted in text. If the variable text content changes, it's more complicated to manage the update!
Copy link to clipboard
Copied
Yes, I saw Tomaxxi's script and I'm aware of the problem of the text update...
Power Headers is surely more "powerful"...
Many thanks for your help!
Copy link to clipboard
Copied
Extra help:
with this GREP formula ['"]
I select apostrophes, quotation marks “” and Guillemets «». Instead I want Guillemets not to be selected...
Only apostrophes and quotation marks “” need to be lowered -2pt on the baseline, not Guillemets of course!
Thanks for your help!
Copy link to clipboard
Copied
Hi,
Even I've no problem with this, you can use the unicode values (see glyphs), as (for me): [\x{2019}\x{02DD}]
« = \x{00AB}
» = \x{00BB}
Copy link to clipboard
Copied
It works perfectly, thanks Obi-wan