Menu

Need training at your office? Request a quote for custom training.

Home / Adobe InDesign / Adobe InDesign: Assigning Old Style Figures through GREP Styles

Adobe InDesign: Assigning Old Style Figures through GREP Styles

By Barb Binder

GREP (General Regular Expression Print) made its first appearance in Adobe InDesign CS3 as a major upgrade to the Find/Change dialog box. By using GREP searches, we could search for patterns instead of literal text/numeric strings. Document clean-up took a giant step forward with this addition. (For more information on GREP Find/Change, visit “Adobe InDesign: Removing Unwanted Spaces, Fast!” and “Adobe InDesign: GREP to Replace Hyphens with En Dashes”. )

In Adobe InDesign CS4, GREP Styles made a fairly quiet appearance. In my observation, they were ignored by most InDesign users, most likely because they didn’t appreciate the power that was suddenly at their fingertips. Instead of a Find/Change update that you have to initiate, these GREP Styles work automatically, as you enter and edit text.

I’m going to use the example of Old Style figures to illustrate the point. If you aren’t familiar with the term, please study the illustration below. Both sets of numbers are set in Garamond Premier Pro 23/27, but the figures on the left are “Lining figures”, a modern style of numerals where all figures are of the same height and rest on the baseline. The “Old Style” figures on the right vary in height and position, and can have either ascenders or descenders. If you decide you want to use the Old Style in place of the default lining style, you’ll have a little work ahead of you. (But if you read this whole article, it’s really just a little work.)

Adobe InDesign: Lining vs Old Style Figures

One more note, make sure you choose an OpenType font for this tutorial. You get a bunch of them with your Creative Suite installation. for example, Adobe Garamond Pro, Adobe Caslon Pro, Minion Pro and Myriad Pro will all work.

Technique Number 1: Find/Change with GREP

  1. Open up a document with lining figures:
    Adobe InDesign: Lining Figures
  2. Choose Edit > Find/Change. Begin by clicking on the GREP tab, and then search for d, which means any digit. Finally, click the Specify Attributes to Change button.Adobe InDesign: GREP Find/Change
  3. In the Change Format Settings dialog box, pick the OpenType Features from the category list on the left, and change the Figure Style to Proportional Oldstyle. Click OK.Adobe InDesign: Change Format Settings to Oldstyle
  4. Set the Search range (i.e., document, story, selection) and Change All.Adobe InDesign: Find/Change results
  5. Click OK and admire the Old Style figures:
    Adobe InDesign: Oldstyle figures
  6. It’s great, but if you add any more numbers, you’ll have to run the search again (and again and again):
    Adobe InDesign: No automatic update


Technique Number 2: GREP Style

  1. Let’s start over again, and try the same thing with a GREP Style:
    Adobe InDesign: Lining Figures
  2. This time, select the text and create a new Paragraph Style. Choose Window > Type & Tables > Paragraph Styles. Hold the Alt/Opt key as you click the Create New Style button:Adobe InDesign: Paragraph Styles panel
  3. Give your style a descriptive name (I called mine “Address”). Click on Apply Style to Selection and Preview before clicking on GREP Style in the category list on the left.Adobe InDesign: New Paragraph Style dialog box
  4. Click the “New GREP Style” button:Adobe InDesign: Add a new GREP style
  5. Notice that the new style already conveniently shows d+, which means apply to one or more digits. That works.Adobe InDesign: To text defaults to d+
  6. Now we need to apply a Character Style to change all the numbers to Old Style, but we forgot to create it in advance. No worries, just click the word [None] after the words Apply Style, and click on the create New Character Style option:Adobe InDesign: Add a Character Style on the fly
  7. Give the new Character Style a descriptive name (I used “Old Style Figures”), and click the OpenType category from the list on the left. Change the Figure Style to Proportional Oldstyle and click OK until you are back to your document.Adobe InDesign: Character Style options set to Old Style Figures
  8. Not only is your existing text using Old Style figures, try adding some more text. WOW! All numbers within the Address paragraph format will automatically shift to Old Style, with no additional work on your part. Now that’s a timesaver.Adobe InDesign: Old style figures are now automatic

Leave a Reply to Barb Binder Cancel reply

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

11 thoughts on “Adobe InDesign: Assigning Old Style Figures through GREP Styles

  1. This example works for roman but not for italics.

    It is possible to adapt grep styles for oldstyle roman, oldstyle italic (bold, etc?)

    Thank you.

  2. @Camilo Umaña
    Hi Camilo:
    In the example above, I used Adobe Garamond Premier Pro. I just changed the paragraph style to Garamond Premier Pro Italic, and it worked just fine. I’m guessing you may be using a font that doesn’t offer Old Style Figures within the Italic style.
    ~Barb

  3. thanks, it works!
    do you know how I can find “forced small caps” to replace with the real small caps? how can I do a search?
    thanks.
    p.

    1. By “forced small caps” I assume that you mean that you reduced the size of the second & subsequent letters of a uppercase word manually. Why not just search for that specific font size and replace with the normal size and small caps. You wouldn’t need GREP for that, just do it in the Text tab of the Find/Change dialog box.
      ~Barb