Auto format a word with GREP Styles, Ignoring Capitalization and Accents
Someone wrote us recently asking about how to format a word with grep styles, but it had to ignore the capitalization and accents that may or may not appear in the word. This is tricky because GREP is very specific; if you search for “Aardvark” it will not find “AArdvark” or “Aàrdvark” or any other variation. But you can tell InDesign to be a little more flexible with some extra and somewhat obscure codes.
For example, let’s say you wanted to format the word NESCAFÉ® — but sometimes it has an accented final letter and sometimes it doesn’t; and sometimes it is just spelled Nescafe. Or perhaps it’s Citroën/Citroen, or Motörhead/MOTORHEAD, and so on.
So here are the two rules to remember:
- You can create a Grep Style (you’ll notice I am quite loose with my capitalization of GREp, too) that ignores capitalization by adding a
(?i)at the beginning. - You can search for any diacritical alternative of a letter by using the code
[[=a=]](but replacing the “a” with the letter you’re looking for)
So in the Nescafe example, you could search for: (?i)nescaf[[=e=]]~r?
(The tilde-r followed by the question mark means “there could be a registered trademark there, or perhaps not” — in other words, “zero or one ® symbols.”)
That would find Nescafe, Nescafé, NEScafÉ®, NESCAFE®, and so on…
This article was last modified on December 30, 2021
This article was first published on July 29, 2013
Commenting is easier and faster when you're logged in!
Recommended for you
How to Make a Portrait out of Type in Photoshop
When a person’s image is well-known, it can be recognized even under sever...
Heavy Metal Madness: White Punks on Dope
Part of the reason, or should I say the only reason, I am behind in my garage pr...
Quark Offers Free 30-day Evaluation of QuarkXPress 7 Software
Quark Inc. announced today the availability of its free 30-day evaluation QuarkX...
