StylePainter Example

Imagine you would like to assign a character style to all numbers that occur throughout a document. Install the software first, and then fire up InDesign and open the document.

  1. Create a character style to your liking (e.g. it could be called AllNumbers or so and it could use a specific font with nice digits).
  2. Create a text frame on the left hand pasteboard of the first page of the document.
  3. In this frame, type a line with the following 3 characters
  4. This is a GREP expression that matches all numeric strings of one or more digits.
  5. Now the magic bit: select the GREP expression (i.e. \d+) and format it with the desired AllNumbers character style. The trick is that we link our desired formatting and style to a GREP expression by formatting the GREP expression itself.
  6. Select the API – StylePainter – Paint Document menu item

If all goes well, all strings of one or more digits in your document will now have the AllNumbers character style applied to them.