Using Nested Styles


Every once in a while I see a feature that is revolutionary in the field of desktop publishing. Nested styles are such a feature. Nested styles allow you to automate how character styles are applied to paragraphs.

Imagine you are formatting a phone directory. Each paragraph starts with a person's name followed by a colon. After that comes a phone number, and then a new line symbol forces the rest of the address to the end of the paragraph. These are repeating elements that you can reliably count on to use as markers for formatting using nested styles.

You want the person's name to be italic, the phone number to be bold, and the text after the new line symbol to be the regular paragraph style.

Before nested styles, you would have had to manually highlight each element in the paragraph and apply a character style. With nested styles all the formatting is applied in one fell swoop !

An example of the kind of formatting that can be automated using nested styles. In this case there are predictable elements that can be used to apply the automatic formatting.

Tip

As you work with nested styles, remember that you need predictable elements that you can use as part of the automatic formatting. If you can't predict where the elements will be in the text, you probably can't use nested styles for that text.


To prepare to use nested styles:

  • Define all the character styles that will be used to apply the formatting for nested styles.

    Tip

    You can only use character styles as part of nested styles, not local formatting from the Character palette.


Once you have defined the character styles, you can apply them using the Nested Styles command.

To apply the Nested Styles command to text:

1.

Place your insertion point inside the paragraph that you want to format.

2.

Choose Drop Caps and Nested Styles from the Paragraph palette menu. The Drop Caps and Nested Styles dialog box appears .

The Nested Styles area of the Drop Caps and Nested Styles dialog box allows you to apply multiple character styles to predictably occurring text elements.

3.

Click the New Nested Style button. This adds a new listing under the Nested Styles area .

The New Nested Style button creates a new listing in the Nested Styles area.

4.

Use the Character Style menu to choose which character style will be applied to the repetitive element .

Click the Character Style menu to choose the character style that should be applied as the formatting for the nested style.

5.

Use the Duration menu to choose the extent to which the character style is applied :

  • Through applies the style so it includes the repeating character.

  • Up to applies the style so it ends before the repeating character.

Click the Duration menu to set the extent to which the formatting is applied.

6.

Use the Count field to set how many repeating characters should occur before the character style ends.

7.

Use the Repeating Element menu to set which element controls the nested style . (See the next exercise for how to set the repeating elements.)

Click the Repeating Element menu to choose the element that ends the nested style.

8.

Click OK to apply the nested style.

or

Click the New Nested Style button to add more nested styles for other parts of the text.

Using the End Nested Style Here Character

When might you need to insert the End Nested Style Here character? Imagine that you want to style the last set of information in an address such as a zip code or postal code.

You can't rely on a certain number of commas appearing before the zip code appears, nor can you rely on the code to only have numbers if you have a mixture of U.S. and European addresses.

That's when you want to insert the End Nested Style Here character in front of the code.

If necessary, you can ask the editorial department that generates the text to insert a special character before the code. For instance, the zip code 10003 might appear as CODE10003. You can then use the Find/Change command to change the word CODE into the End Nested Style Here character.


To set the repeating elements in a nested style:

  • Click the Repeating Element menu and choose one of the listings from the menu.

    or

    Type a single character in the field.

    Tip

    A character typed into the field can be text, punctuation, or numbers.


    Tip

    If you type multiple characters in the field, InDesign will use any of those characters as the repeating element.


There may be times that you don't have any repeating element that you can rely on to appear in the text. In that case you can insert the End Nested Style Here Character to control the end of a nested style.

To manually insert the End Nested Style Here Character:

1.

Place your insertion point where you want the End Nested Style Here Character to appear.

2.

Choose Type > Insert Special Character > End Nested Style Here. This inserts the End Nested Style Here character into the text .

The End Nested Style Here character can be inserted to end the effects of a nested style.

Tip

The End Nested Style Here character can be seen if you choose Type > Show Hidden Characters.

Tip

You can also use the Special menu in the Change field to insert the End Nested Style Here character into text.

If you have multiple nested styles in the Nested Styles area, you can move them up or down to change the order in which they are applied.

To change the order of multiple nested styles:

1.

Select the nested style that you want to move.

2.

Click the up or down arrow to move the nested style to a new position .

Use the up/down arrows to change the order of nested styles.

The Drop Caps and Nested Styles command in the Paragraph palette is applied as local formatting. It is rather easy to create a paragraph style that contains the nested style. This makes it possible to apply nested styles by simply applying a paragraph style to the text.

To apply nested styles in a paragraph style:

1.

Define the character styles (see page 375) for the nested style.

2.

Choose to define a new paragraph style (see page 369).

3.

Choose the Drop Caps and Nested Styles category from the New Paragraph Style dialog box .

The Drop Caps and Nested Styles area of the New Paragraph Style dialog box.

4.

Add and define the nested styles as described on page 389.

5.

Add any additional nested styles as necessary.

6.

Set whatever other formatting you want in the New Paragraph Style dialog box.

7.

Click OK to define the paragraph style.

8.

Use the Paragraph Styles palette to assign this paragraph style to text.



InDesign CS2 for Macintosh and Windows(c) Visual QuickStart Guide
InDesign CS4 for Macintosh and Windows: Visual QuickStart Guide
ISBN: 0321573579
EAN: 2147483647
Year: 2006
Pages: 309
Authors: Sandee Cohen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net