If you have a long document with different words set in CAPITALS, you probably would like to set those words with small caps instead.

Example of different words in small caps, applied automatically.

Small caps using GREP

As long as you are using an OpenType font, you can (often, depends on the font) change the text case using OpenType All Small Caps, which ignores the current letter case. Start by creating a character style that does this. The trick in this guide is how to apply it automatically.

This is where you choose OpenType All Small Caps.

OpenType All Small Caps

GREP styles

GREP style is a new feature in InDesign CS4, and works like Nested Styles, a way to apply a character style a part of a paragraph, based on the text content. GREP uses regular expressions (regexp) to find a text range, and if you learn/know your regexp, you will quickly start doing most your Nested Styles with GREP style instead.

This short guide is just to show you an easy to understand introduction to regexp and GREP styles. If you want to learn regexp, regular-expressions.info is a good resource.

This is where you write your regexp and choose what character style should be applied to the found text.

GREP Styles in paragraph options

By default, GREP is case sensitive, which you will use in this example. The regexp pattern here, [A-Z]{2,}, defines that you want to find letters from A to Z (uppercase), but there must be at least 2 after each others. If it had been [A-Z]{3,4}, there had to be at least 3 in a row, but max 4.

I will be sure to write more GREP style and GREP search guides on the blog, showing practical examples and usage of the features.