GREP of the Month: Superscripting Suffixes
Automatically convert all your numerical suffixes to superscript when applying a paragraph style.

Sometimes you want to automate certain repetitive tasks, like changing numerical suffixes to superscript. Luckily, there’s a great GREP style you can use for this.
First you need to create a new character style that uses the superscript setting. Then take the paragraph style that’s applied to your text, and add a new GREP style. Type in the code (?<=\d)(st|nd|rd|th)
to accomplish your goal.
Here’s the explanation: (st|nd|rd|th)
 looks for any of the sets of letters within the parentheses that will act as a suffix, for example “st” for 1st, “nd” for 2nd,” and so forth. The vertical bars in the expression mean “or.” Of course you don’t want to superscript any pair of letters, just the ones that are preceded by a number. That’s why we add the \d
at the beginning of the expression. But to avoid applying the superscript to the actual number, we put it within a “Positive Lookbehind” string (available from the”@” flyout menu), giving you the (?<=\d)
result.
This means that the presence of a number before any of our letter pairs is the condition upon which the superscript should be applied. Adding this ensures that numbers themselves will be left alone—only the letter pairs will receive the superscript styling.
And remember that this is all applied live, meaning that InDesign will automatically apply your superscript to the correct letter pairs even while you’re adding, changing, or removing text.
Commenting is easier and faster when you're logged in!
Recommended for you

How to Be a Better Designer: Learn About Type
Not everyone who knows about type is a good designer, but all good designers kno...

Illustrator Downloadable: Winter Birch Pattern Set
Lovely patterns and colors to use when you want to evoke the feeling of a cozy s...

Placing Objects on a Path in Illustrator
Get to know the Objects on Path Tool in Illustrator