Grep Styles in Adobe InDesign CS4

RE: http://www.creativepro.com/blog/typetalk-hidden-secrets-indesign-s-findchange

Ilene, great to see the word about GREP finally getting around.

I’ve been a great fan of regular expressions for a couple of decades ;-) both as a programmer and as a designer who deals with highly structured documents (or ones that should be but aren’t quite!) ID CS4 has a wonderful addition to the Paragraph Styles definition window.

“Grep Styles” allow you to define a regular expression which when it matches will apply the assigned style to the matched string… So, I’m a big fan (also) of dropping the height of hypens and dashes by a point or so. In typical text fonts, the dashes (Em, En, hyphen) are designed to run at the x-height of the font, which is fine when they’re used with ALL-CAPS or 1789-89 (numbers), but in body-copy, they will often be too high.

I first need a Character Style which I’ll call “Dash-Hypen“, where I define a “Baseline shift” of -1.0 pt which I’ll apply to the ‘class’ of ‘dashes’.

Then in my Paragraph style (perhaps for Body Text, or even Default) I select “Grep Style” and make a new Grep Style, selecting “Dash-Hypen” to match a set of all the dashes [~_~=~~~--]

The square brackets mean that any one of the characters within will match, rather than a string consisting of all of them. The real advantage here is that you can set this once, and both existing text and new copy will all have the same styles applied.

With a grep search, as you describe, you’ll have to remember to run it again after adding new content!

I’m posting this note on ideaswords.com also!

Cheers!

peter

ideaswords.com – Semiotx

slowprint.com – Letterpress


  1. No Comments