Tab Leaders (Part 4): Automatic Styling

First, in part 1, we talked about sep­a­rat­ing columns of text with dot or oth­er kinds of lead­ers. Next, in part 2, “Formatting Leaders,” we learned that tabs and their lead­ers can be styled like any oth­er char­ac­ter, open­ing the pos­si­bil­i­ties of cre­ative col­umn sep­a­ra­tors. Last week part 3 focused on using cus­tom text under­lines to styl­ize tabs with­in para­graph text. In addi­tion to cre­at­ing and for­mat­ting the tabs them­selves, we sped up the process of styling mul­ti­ple tabs through the use of char­ac­ter styles. The prob­lem is, so far we’ve only talked about apply­ing char­ac­ter styles man­u­al­ly–select­ing each tab one at a time and apply­ing a style from the Character Styles palette/panel. Manual appli­ca­tion of char­ac­ter styles to a few tab spaces here and there isn’t a has­sle. However, when you’re pro­duc­ing a long list of sports scores, a prod­uct cat­a­log, or some­thing else with more than a hand­ful of tabbed lines, “man­u­al appli­ca­tion” is pro­ce­dure you want to employ as rarely as pos­si­ble. Fortunately, InDesign CS2 and CS3 can eas­i­ly auto­mate the appli­ca­tion of char­ac­ter styles to tab spaces.

I’m talk­ing about nest­ed styles.

The con­cept of nest­ed styles is sim­ple: do this until it’s time to do that. By com­bin­ing char­ac­ter styles with spe­cif­ic trig­ger char­ac­ters or marks, you tell InDesign to for­mat text up to or through a spe­cif­ic char­ac­ter with a cer­tain style. For instance, you could eas­i­ly have InDesign auto­mat­i­cal­ly for­mat your tab spaces with a dif­fer­ent font, col­or, and track­ing with­out alter­ing the text to either side of the tab. It may sound com­pli­cat­ed, but, trust me, it’s a snap.

  1. First, pre­pare by cre­at­ing the para­graph and char­ac­ter styles you’ll need. I find the best way to do that is by cre­at­ing a sam­ple line of text, for­mat­ting it man­u­al­ly, and then cre­at­ing styles from its var­i­ous bits. My project is a price list, so I’ll set my text with tabs and basic dot lead­ers in place, and then, using only the top item, I’ll for­mat each bit of infor­ma­tion as need­ed (see Figure 1).

Figure 1

  1. As you can see, I start out with one type­face and col­or, switch to a sec­ond for the tab space, a third for the prod­uct item num­ber, back to the sec­ond style for the next tab, and fin­ish off with four oth­er char­ac­ter styles for the item price. Because the for­mat­ting of the first style, the item name, can be han­dled by a para­graph style, I’ll begin by cre­at­ing a new para­graph style–“Cat Line.” That style will also store the oth­er paragraph-level attrib­ut­es like the posi­tion­ing of tab­stops, para­graph spac­ing, and so on.
  2. Jumping past the item name, my first for­mat­ting change is the tab space. I’ll high­light that and cre­ate a new char­ac­ter style–“Cat Line Tab”–to pre­serve those set­tings. Next is the item num­ber, which gets its own char­ac­ter style, “Cat Line SKU,” fol­lowed by the four dis­tinct styles in use in the price (actu­al­ly, three; the dol­lar dig­its use the same for­mat­ting as the prod­uct name). Because both tab spaces use the same for­mat­ting options, they can use the same char­ac­ter style, and I don’t have to make anoth­er one just for the tab space between the SKU and the price.Following my lead, high­light and then cre­ate a char­ac­ter from each change in char­ac­ter for­mat­ting in your text. Even if you ulti­mate­ly want only one change in style, make sure you have at least two char­ac­ter styles in addi­tion to the para­graph style. You’ll need two to fol­low along with the remain­ing steps.
  3. Apply your para­graph style to the rest of your tabbed lines of text.
  4. Now, double-click on the para­graph style in the Paragraph Styles palette/panel to open the Paragraph Style Options dia­log. Go down to the Drop Caps and Nested Styles pane (see Figure 2). Make sure the Preview box in the bottom-left of the dia­log is checked; we want to mon­i­tor the changes we make to the para­graph style options on live text.

Figure 2

  1. In the Nested Styles sec­tion click the New Nested Style but­ton, which should place your cur­sor in the first of four columns above it. The first col­umn, a drop­down menu, offers all your char­ac­ter styles as well two spe­cial ones–[Repeat] and [None]. The for­mer I’ll leave for anoth­er day’s dis­cus­sion (or you can buy my Mastering InDesign CS3 book; I know, I’m shame­less). The lat­ter, [None], doesn’t use a char­ac­ter style; it leaves the text as for­mat­ted by the para­graph style’s own options. That’s what we want in this case, so set the style to [None].
  2. Set the val­ues of the remain­ing three columns to: up to, 1, Tab Characters (the final col­umn is anoth­er drop­down menu with Tab Characters list­ed as an option). When you’ve done that you will have com­plet­ed a direc­tive to InDesign stat­ing, in effect, do not use any char­ac­ter from the begin­ning of the line until the first tab is encoun­tered, how­ev­er long that may be. We want text before the tab to remain faith­ful to the options in the para­graph style, and this state­ment accom­plish­es that. So would no nest­ed style, of course, at least until we com­plete the next step. After that, we’ll be glad to have tak­en this first nest­ed style.
  3. Click the New Nested Style but­ton again to insert a new row beneath the first. With this nest­ed style we’re going to tell InDesign how to for­mat the tab space itself. Choose the appro­pri­ate char­ac­ter style, and then set the oth­er options to: through, 1, Tab Characters. If you have Preview checked, you should imme­di­ate­ly see the first tab space change in all your tabbed lines.The dif­fer­ence between “up to” and “through” in the sec­ond col­umn is sim­ple: The for­mer has InDesign apply a style until but not includ­ing the spec­i­fied char­ac­ter or mark, while the lat­ter has the appli­ca­tion include the spec­i­fied char­ac­ter or mark in the style. These direc­tives are also suc­ces­sive. Because we first said, “do noth­ing until you get to the tab,” InDesign ends that direc­tive at the tab. When the first com­mand ends, the next begins, for­mat­ting text after that–the tab itself–until InDesign encoun­ters the spec­i­fied character–the same tab; thus, it applies the char­ac­ter style to a sin­gle char­ac­ter, the tab.
  4. The next two nest­ed styles are vir­tu­al­ly iden­ti­cal. With my price list, I need a nest­ed style that for­mats the SKU num­ber between the two tabs–Cat Line SKU, up to, 1 Tab Characters–then the sec­ond tab–Cat Line Tab, through, 1, Tab Characters. Set up those, and your list should be com­plete or near­ly so.
  5. The price is just as easy to for­mat, but instead of telling InDesign to look for tab char­ac­ters, I’ll tell it to look first for a dol­lar sign, then a peri­od (between the dol­lar and cent amounts), and, final­ly, to for­mat the cents them­selves, to apply a style through two dig­its (numer­als). Although the trig­ger char­ac­ter col­umn has a drop­down menu of help­ful char­ac­ters and marks, you can type just about any­thing else (like a dol­lar sign or peri­od) into that field.Figure 3 shows all the nest­ed styles used on my price list.

Figure 3

Wait! Here’s the best part. Click OK to close the Paragraph Style Options dia­log while sav­ing the changes. Now, begin a new line of text and apply the para­graph style to it. Begin typ­ing. Nothing’s hap­pen­ing, right? Press your key­board TAB key, and keep on typ­ing. InDesign applies the nest­ed styles, for­mat­ting text, as you type! (It’s OK to ooh and ah at this point.)

As long as you use that para­graph style, InDesign will watch your typ­ing for the nest­ed style trigger(s) you con­fig­ured, be that tab char­ac­ters, dol­lar signs, or any­thing else. When a trig­ger is encoun­tered, the char­ac­ter style is applied, and InDesign watch­es for the next trig­ger. And, it works with colum­nar or para­graph text. You need nev­er man­u­al­ly apply char­ac­ter styles to mul­ti­ple tabbed lines again!

Next week, in the fifth install­ment of the “Tab Leaders” series, I’ll offer some addi­tion­al tips and tricks for work­ing with tabs, lead­ers, and nest­ed styles that are too small for their own posts but def­i­nite­ly too big to miss.

Pariah Burke

Author, consultant, trainer, guru: Digital Publishing, ePub, InDesign, Illustrator, Photoshop, Quark. Empowering, Informing, Connecting Creative Professionals™