Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Another advantage of GREP Styles over Nested Styles is that a GREP Style can be applied to specific words or phrases, no matter how many times they appear in a paragraph. This is an ideal way to automatically italicize, for instance, a publication name, or highlight a product name, and it's one of the easiest GREP styles you'll ever create. In this paragraph, there are a number of different product names and I want to highlight one in particular, the Super Widget product name, in a different Character Style. And I want to do that everywhere it appears and I don't want to do it manually.
So, in order to have it done automatically for me, I am going to create a new GREP style in this product description Paragraph Style. I will right-click that style name in the Paragraph Styles panel, choose Edit Product Description and go to GREP Style to create a New GREP Style. The style I want to apply is already in this document. It's called Product Name and I will just pick that from the Apply Style menu. And the text that I want to apply it to is the actual product name. This is literal text, no metacharacters involved. I am just going to type 'Super Widget'.
When I click off here, you'll see not only the first instance, but the second instance of Super Widget is in there. And if I typed it 10 more times, it would also appear there. If I typed just the word 'Super', it would not style it. If I typed just the word 'Widget', it would not style it. So, this is specific to this presentation of this product name. Nested styles simply can't do that. If I were to try to accomplish this with a Nested Style by creating a new Nested Style, choosing that same Style Name, first of all, I run into the problem with a criteria that I have to determine a specific amount that I have to indicate.
And anything I type in this field, if I type the word 'Super', a Nested Style doesn't see the word Super, it sees a choice, either an uppercase S, or a lowercase u, or a lowercase p, or a lowercase e, or a lowercase r. Whichever one comes first, it considers it a match. So, there is no way to describe a word at all with a Nested Style. So, this is just never going to work. A GREP Style is the only way to do it. If I want to get ambitious and highlight all of my product names, I can certainly create a new GREP Style using the same Product Name style and add the names of one of the other products in this paragraph, like Wonder tool and it will do that.
And I could create another one for any other products that are in there, or I could be a little bit more efficient. Delete this style and instead, expand the definition of this GREP Style with the Or metacharacter by choosing Match, Or and then typing in 'Wonder Tool'. And then another Or metacharacter and Miracle Product. I would click off here, click OK and in one GREP Style, I've highlighted multiple instances of multiple Product Names.
This particular GREP style only uses one metacharacter, the Or metacharacter and that's only because multiple product names are specified. The rest is all plain text making this one of the simplest, yet very useful GREP styles you could ever create.
Get unlimited access to all courses for just $25/month.Become a member
120 Video lessons · 64685 Viewers
119 Video lessons · 71931 Viewers
125 Video lessons · 32529 Viewers
84 Video lessons · 18996 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.