Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Nested styles are an option you can build into paragraph styles that allow you to apply dynamic character styling to a continuous range of text. You just tell InDesign which character styles to apply and which characters mark the end of the range. They are perfect for creating things like run-in heads were you need the start of a paragraph formatted differently from the rest. And you can create a nested style at any time by creating or editing a paragraph style. In this case, I would like the start of this paragraph to be formatted differently from the rest. There should be this blue run-in head, and I have done that here by manually applying the RI_Blue Character Style.
But over the course of an entire project, I could save a ton of time and effort by doing this with the nested style. In this case, it's a perfect example for a nested style, because there's a consistent pattern here. Every time I have the run-in head, it's followed by an en space. So let's setup a nested style to do this. First of all, unapply the Character Style. So now it's all the same typeface. I go to my Paragraph Styles panel and I will Option or Alt + Click on the New Style button to create a New Paragraph Style. And this one I will call RuninFirst, so RIF-RuninFirst.
And down in Drop Caps and Nested Styles, I will click on New Nested Style. I will select my Blue Character Style, RI_Blue, through 1 En Space, and click OK. Now I can apply this, and the character styling takes place automatically. Now that's cool, but what if I have a pattern that's a little more complicated, like if there are more than one character that marks the end where I need the character style applied. Over here, these paragraphs have different punctuation after where I would want the nested style, so this one has a question mark.
This one has an exclamation point. Here are some ellipses, and another exclamation point. Fortunately I can do all of these with one style that I created call RuninPunctuation. So how does that work? Let's right-click on it and take a look. We'll choose Edit and look at the nested style. And here I am applying RI_Blue again, through 1, and then in this field I put in all the options that I wanted InDesign to look for. So when it finds any of these, it stops applying the nested style.
So there is a question mark, an exclamation point and an ellipses. I also have nested line styles. Nested line styles allow you to apply dynamic character styling on a line-by-line basis. So it's sort of like location-based styling. We'll apply that to this paragraph here with run-in line, and we'll take a look at that. I'll right-click on it and choose Edit RuninLine, Drop Caps and Nested Styles, and down here in Nested Line Styles, I am applying RI_Blue for 1 line.
But if I wanted to apply it for 2 lines, I could do that. Click off and I would see the style update. Now an important thing regarding nesting styles and long document workflows is how the formatting will or will not appear in a table of contents. The TOC feature will pick up any manually applied character styling, but automatic styling, for things like nested styles, GREP Styles, those kinds of things will not come across in the TOC. This can be a good thing or a bad thing, depending on your needs. If you don't want that local styling to come across, use these automatic styles.
If you do need in the TOC, then you will need to either replicate the nested style function in your TOC paragraph styles, or you need to unnest the styles. Another time when you might want to unnest styles, is when you're going to export text from InDesign to RTF. When you export to RTF, the formatting applied by a nested style will simply disappear. Let's take a look at that. So here I will put my cursor in this frame with the nested style, and I'll choose File > Export > Rich Text Format, and I'll say Nested for the Name.
I'll switch over to Word and open it, and you can see I have no formatting here where my nested style was. So how do you avoid this? Well, you have to apply the character styles manually, wherever the nested style applied them. One way to do that is to use Find/ Change, but that method depends on your ability to find a query that describes the text formatted by the nested style, and sometimes that might be really hard. An easier method is to use a free script offered by In-Tools.
Let's switch back to InDesign and use that. So in my Scripts panel, I will go to ApplyNestedStyles and double-click on it. The script went through and found all my nested styles and replaced them with manually applied character styles. So if I select any of this formatting and look at my Character Styles panel, I can see now that it's been applied. So if I take this text frame again and export it again to RTF, we'll call this Unnested, and go back to Word and open that, I can see that that formatting held.
One word of caution though, if you had manually applied character styles on top of the nested style formatting, that script will remove the manually applied formatting. It will be gone from the InDesign document and it will be gone in any exports you create. With that said, if you need to convert nested styling to real character styles, that script is great. And even if you occasionally have to unnest styles, they are a wonderful tool for speeding up the formatting of text when you have a predictable pattern of formatting in a paragraph. Next, we'll see another kind of automated formatting with Next Style.
Get unlimited access to all courses for just $25/month.Become a member
120 Video lessons · 58410 Viewers
119 Video lessons · 67635 Viewers
84 Video lessons · 16907 Viewers
125 Video lessons · 29811 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.