Writing Portfolio

Tab Leaders (Part 5): Fixed-Width Floating Tabs/Spacers

Published By: InDesignSecrets.com
Credit: Byline
Canonical URL

Although I had planned to make part 5 the last in this series, a read­er ques­tion prompt­ed me to push the tips and tricks out a week and cov­er anoth­er top­ic this week.

After read­ing the first few “Tab Leaders” install­ments, read­er Tom asked:

I would like to add words to a text frame and hit tab and know that the space is always a defined amount, say 5mm, regard­less of how long the pre­ced­ing word was. Is it pos­si­ble to set this up with­out hav­ing to set a load of indi­vid­ual tabs? For exam­ple: word(tab 5mm) long word(tab 5mm) longer word(tab 5mm) longest word

Because text in InDesign fol­lows a hor­i­zon­tal ruler, and tab­stops are linked to absolute posi­tions on that ruler, there real­ly isn’t a way to set a float­ing tab of con­stant width. The end points of tab­stops are fixed, you see, while the begin­nings are deter­mined by pre­ced­ing text. However, there is a way you could fake it–probably a few ways, but here’s one.

  1. Using the Rectangle tool, click and release on the pasteboard–don’t click and drag, click and release. Up will pop the Rectangle dia­log, which allows you to pre­cise­ly spec­i­fy the dimen­sions of the rec­tan­gle (see Figure 1). Set the rec­tan­gle to 1mm wide by 1mm deep and click OK. (I know you want 5mm, but trust me.)

Figure 1

  1. Switch to the Selection Tool and select your new rec­tan­gle. It prob­a­bly has a default appear­ance of black stroke and emp­ty fill. Swap that by press­ing SHIFT+X to make the tiny box eas­i­er to see. If you want even high­er vis­i­bil­i­ty, fill it red or magen­ta; the fill is only tem­po­rary regard­less.
  2. With the rec­tan­gle still select­ed, open the Text Wrap palette/panel from Window > Text Wrap. Choose the Wrap Around Bounding Box wrap style and set the top and bot­tom out­set val­ues to 0 while mak­ing the left and right out­sets 2mm (see Figure 2). Also make sure that Wrap To is set to the default of Both Right & Left Sides (oth­er­wise, text to one side of the box or the oth­er will drop below the box).

Figure 2

  1. On the Object Styles pan­el (Window > Object Styles), cre­ate from, and apply to, the lit­tle box a new styled named some­thing like “5mm Spacer.”
  2. Now, copy the spac­er box, and, switch­ing to the Type tool, paste it direct­ly into text at the posi­tion where you’d like your 5mm-wide space. Make sure that you don’t have spaces or tabs before or after the insert­ed box. As you see in Figure 3, the divi­sion between words is now exact­ly 5mm–1mm box + 2mm left out­set + 2mm right out­set = 5mm.

Figure 3

  1. Finally, return to the orig­i­nal box still on the paste­board and select it once again with the black arrow Selection tool. Change its fill to None, and then update the style with the Redefine Style com­mand on the Object Styles’ panel’s fly­out menu. All the instances of the spac­er box with­in text will update to reflect the change, emp­ty­ing their fills to leave you with fixed-width, float­ing spaces.

Why, you might ask, didn’t we just cre­ate a 5mm box and be done with it? Why com­pli­cate the mat­ter by adding a text wrap? Where some may see super­flu­ous com­pli­ca­tion, I see future­proofed sim­plic­i­ty.

Are you absolute­ly pos­i­tive you’ll nev­er want to adjust those fixed-width, float­ing spac­ers in your doc­u­ment to be 4mm wide or maybe 10mm? If you rely on the phys­i­cal dimen­sions of the box to define the width of your spac­er, then you must man­u­al­ly resize each and every instance in the event that you need more or less space. Object styles can’t store or affect phys­i­cal dimen­sions. Conversely, mak­ing the rec­tan­gle a min­i­mal width, just large enough to grasp with the Selection tool, and then set­ting its width via a for­mat­ting attribute like Text Wrap out­set does enable you to alter the width of all object instances by chang­ing the object style.

If your fixed-width, float­ing spac­ers need to be changed to 4mm wide, edit the object style and change the left and right out­sets to 1.5mm each; if you need 10mm spac­ers, make those out­sets 4.5mm each. Use the text wrap out­sets to con­trol the width, down to zero val­ues, which leave you with the spac­er box’s own 1mm width. If you need nar­row spaces than that, don’t use this tech­nique. Instead, use some of the spe­cial spaces on the Type > Insert White Space menu.

Next week in the final, final seg­ment in this series, I’ll prof­fer those promised 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.