Today I will introduce a relatively easy, yet powerful way, to improve the workflow of producing layouts in InDesign. It works the best with a pattern of a repetitive string of characters, like a price, measurements, web address, postcode and so on. Sounds complicated? Well, it’s much easier to imagine when I will show a few examples.

 Just for explanatory purposes – I know perfectly well that Regular Expressions (which GREP styles in fact are) is nothing new in programmers’ world. But in graphic design world they are not that common (to put it lightly!) and I think they deserve to be a bit more appreciated.

  1. What are GREP styles?
  2. How to apply GREP styles in InDesign
  3. Examples, please!
  4. Tools and resources for building Regular Expressions

1. What are GREP styles?

GREP styles are actually Regular Expressions implemented in InDesign. In short, they allow applying a character style to a particular word pattern.


2. How to apply GREP styles in InDesign

It’s easy! Well, at least once you master building simple paragraph and character styles. Many samples of GREP style usage can be found on the web. I am showing below just a few I’ve found particularly useful in mine job. Once I find useful some other GREP pattern I will make another post!


3. Examples, please!

Apply character style No Break for:

d+ x d+
150 x 150

Info from typo purists – this is as common as actually a mistake, so a proper multiplication sign (×) should be used here instead of a letter (x). So proper form again would be:

150 × 150
d+ × d+

100% cotton
d+%.+

www.imagiva.net/creative
w+[/]w+

www.imagiva.net/creative-ideas
w+[/]w+(-)w+

Apply style Price for:

£23.99
[£]d+.d+

£23.99-£12.99
d+[-][£]

Apply style Pence.99 superscript for:

£12.99
.d+<<

Apply style Smaller Price for:

[£]dd+[.]d+
+
Apply style Pence .99 for:

[.]d+

£9.99
£12.99 (when smaller size for a two-digit price is needed)

Apply style Measures cm for:

153cm

d+(cm)

Apply style Marker for:

[?][?][.]d+
??.99

Apply style Barcode for:

.+[x][A-Z]+[y]d+[z]
Ç|xAPKCBKy884957z
That one works with EAN-13 barcode patterns produced by Azalea script 

Apply style Hidden for:

[<][n][o][n][e][>]r
r
(hides paragraphs with string or with no string)

Apply style Superscript for:

(?<=d)[t][h]
Changes to superscript th part only after a digit (e.g. 20th but not bath)


4. Tools and resources for building Regular Expressions

Here are a few handy links I’ve found useful:

http://www.regexr.com
http://indesignsecrets.com/tag/grep-styles
http://www.jenjonesdesign.com/using-grep-styles-in-indesign/


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *