Need training at your office? Request a quote for custom training.
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.)
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
- Open up a document with lining figures:
- 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.
- 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.
- Set the Search range (i.e., document, story, selection) and Change All.
- Click OK and admire the Old Style figures:
- It’s great, but if you add any more numbers, you’ll have to run the search again (and again and again):
Technique Number 2: GREP Style
- Let’s start over again, and try the same thing with a GREP Style:
- 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:
- 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.
- Click the “New GREP Style” button:
- Notice that the new style already conveniently shows d+, which means apply to one or more digits. That works.
- 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:
- 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.
- 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.
Great and simple demo of the new Grep Styles in CS4. Sadly too many peoples are unaware of the amazing stuff that can be done with it. But wait now they know. 😉
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.
@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
Hi,
Do you also know how to use the old style in Acrobat? Thanks!
Create the Old Style Figures in InDesign, and save the document as a PDF for viewing in Acrobat.
~Barb
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.
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
Saved hours of labor. Thank you.
Really helpful! Thanks a million. xxx
Very helpful. Thank you.