Writing Portfolio

Tab Leaders (Part 4): Automatic Styling

Published By: InDesignSecrets.com
Credit: Byline
Canonical URL

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 column sep­a­ra­tors. Last week part 3 fo­cused on us­ing cus­tom text un­der­li­nes to styl­ize tabs with­in para­graph text. In ad­di­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 on­ly talked about ap­ply­ing char­ac­ter styles man­u­al­ly–se­lect­ing each tab one at a time and ap­ply­ing a style from the Character Styles palette/panel. Manual ap­pli­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 pro­duct cat­a­log, or some­thing else with more than a hand­ful of tabbed lines, “man­u­al ap­pli­ca­tion” is pro­ce­dure you want to em­ploy as rarely as pos­si­ble. Fortunately, InDesign CS2 and CS3 can eas­i­ly au­to­mate the ap­pli­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 un­til it’s time to do that. By com­bin­ing char­ac­ter styles with speci­fic trig­ger char­ac­ters or marks, you tell InDesign to for­mat text up to or through a speci­fic char­ac­ter with a cer­tain style. For in­stance, you could eas­i­ly have InDesign au­to­mat­i­cal­ly for­mat your tab spaces with a dif­fer­ent font, col­or, and track­ing with­out al­ter­ing the text to ei­ther 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 ba­sic dot lead­ers in place, and then, us­ing on­ly the top item, I’ll for­mat each bit of in­for­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 pro­duct 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 be­gin by cre­at­ing a new para­graph style–“Cat Line.” That style will al­so store the oth­er paragraph-level at­trib­ut­es like the po­si­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 (ac­tu­al­ly, three; the dol­lar dig­its use the same for­mat­ting as the pro­duct name). Because both tab spaces use the same for­mat­ting op­tions, they can use the same char­ac­ter style, and I don’t have to make an­oth­er one just for the tab space be­tween 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 ul­ti­mate­ly want on­ly one change in style, make sure you have at least two char­ac­ter styles in ad­di­tion to the para­graph style. You’ll need two to fol­low along with the re­main­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 di­alog. Go down to the Drop Caps and Nested Styles pane (see Figure 2). Make sure the Preview box in the bottom-left of the di­alog is checked; we want to mon­i­tor the changes we make to the para­graph style op­tions 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 column, a drop­down menu, of­fers all your char­ac­ter styles as well two spe­cial ones–[Repeat] and [None]. The for­mer I’ll leave for an­oth­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 op­tions. That’s what we want in this case, so set the style to [None].
  2. Set the val­ues of the re­main­ing three columns to: up to, 1, Tab Characters (the fi­nal column is an­oth­er drop­down menu with Tab Characters list­ed as an op­tion). When you’ve done that you will have com­plet­ed a di­rec­tive to InDesign stat­ing, in ef­fect, do not use any char­ac­ter from the be­gin­ning of the line un­til the first tab is en­coun­tered, how­ev­er long that may be. We want text be­fore the tab to re­main faith­ful to the op­tions in the para­graph style, and this state­ment ac­com­plish­es that. So would no nest­ed style, of course, at least un­til 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 in­sert a new row be­neath the first. With this nest­ed style we’re go­ing to tell InDesign how to for­mat the tab space it­self. Choose the ap­pro­pri­ate char­ac­ter style, and then set the oth­er op­tions to: through, 1, Tab Characters. If you have Preview checked, you should im­me­di­ate­ly see the first tab space change in all your tabbed lines.The dif­fer­ence be­tween “up to” and “through” in the sec­ond column is sim­ple: The for­mer has InDesign ap­ply a style un­til but not in­clud­ing the spec­i­fied char­ac­ter or mark, while the lat­ter has the ap­pli­ca­tion in­clude the spec­i­fied char­ac­ter or mark in the style. These di­rec­tives are al­so suc­ces­sive. Because we first said, “do noth­ing un­til you get to the tab,” InDesign ends that di­rec­tive at the tab. When the first com­mand ends, the next be­gins, for­mat­ting text af­ter that–the tab itself–until InDesign en­coun­ters the spec­i­fied character–the same tab; thus, it ap­plies 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 be­tween 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 in­stead of telling InDesign to look for tab char­ac­ters, I’ll tell it to look first for a dol­lar sign, then a pe­ri­od (be­tween the dol­lar and cent amounts), and, fi­nal­ly, to for­mat the cents them­selves, to ap­ply a style through two dig­its (nu­mer­als). Although the trig­ger char­ac­ter column 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 pe­ri­od) in­to 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 di­alog while sav­ing the changes. Now, be­gin a new line of text and ap­ply 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 ap­plies 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 en­coun­tered, the char­ac­ter style is ap­plied, 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 ap­ply char­ac­ter styles to mul­ti­ple tabbed lines again!

Next week, in the fifth in­stall­ment of the “Tab Leaders” se­ries, I’ll of­fer some ad­di­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.