When you think about the text in your publication, chances are good you’re thinking of each paragraph as being a representative of a particular kind of text. You’re thinking, “That’s a headline, that’s a subhead, and that’s a photo caption.” Chances are also good that you’re thinking of those paragraphs as having certain formatting attributes: font, size, leading, and indents.
That’s what text styles do—they bundle all those attributes together so you can apply them to text with a single click. But there’s more—if you then change your mind about the formatting, you can edit the style, and all the text with that style applied to it (that is, “tagged” with the style) is reformatted automatically.
Once you’ve created a text style for a specific kind of text, you’ll never have to claw your way through the Character panel or Paragraph panel again. Unless, of course, you want to apply a local formatting override to your styled text, which you’re always free to do.
Global versus Local Formatting. We’ve been using the term “local formatting.” What are we talking about? The key to understanding text styles is understanding the difference between style-based formatting and local formatting.
Local formatting is what you get when you select text and apply formatting directly, using the Character panel or the choices on the Type menu. When you apply formatting using text styles, on the other hand, you’re applying “global” formatting (that is, formatting specified by the selected style).
If local formatting has been applied to text that has had a paragraph style applied to it, you’ll see a “+” after the style name in the Paragraph Styles panel when the text is selected (see Figure 4-58).
Figure 4-58 Styles and Local Overrides
Plus What? When you see that the text you’ve selected in a styled paragraph contains a local override, how can you tell what that local override is? If you have tool tips turned on, you can move the cursor over the style name, and InDesign will display a list of the local overrides. Alternatively, you can choose New Paragraph Style from the Paragraph Styles panel menu. Look at the list of attributes in the Style Settings list at the bottom of the panel—it’ll say “<stylename> + next: Same Style +” (where “<stylename>” is the name of the style applied to the paragraph) and a list of formatting. The items in the list are the local formatting. Click Cancel (or press Command-period/Esc) to close this dialog box without creating a new style.
Incorrect Style Order. Paragraph and character styles should appear in alphabetical order in their respective panels. Sometimes, though, the panels get confused and list them in a near-random order (probably the order in which you created the styles, which is silly). If that happens, just choose Sort by Name from the panel menu.
Styles Are More than Formatting. When you apply a style to a paragraph (which we call “tagging” a paragraph with a style), you’re doing more than just applying the formatting defined by the style. You’re telling InDesign what the paragraph is—not just what it looks like, but what role it has to play in your publication. Is the paragraph important? Is it an insignificant legal notice in type that’s intentionally too small to read? The style says it all.
The most important thing to remember when you’re creating and applying styles is that tagging a paragraph with a style creates a link between the paragraph and all other paragraphs tagged with that style, and between the paragraph and the definition of the style. Change the style’s definition, and watch the formatting and behavior of the paragraphs tagged with that style change to match.
By now, most of us are used to the idea of paragraph styles, which give us a way to apply multiple paragraph formatting attributes to an entire paragraph with a single action. (If you’re not familiar with paragraph styles, we discuss them in the next section.) Character styles are just like paragraph styles, except that they can be applied to ranges of text smaller than an entire paragraph (and, obviously, they lack paragraph formatting features, such as alignment). Applying a character style to a text selection establishes a link between that text and the definition of the style—edit the style, and the formatting of the text changes.
Use character styles for any character formatting you apply over and over again. Run-in headings, drop caps, and special ornamental characters are all good candidates for character styles. Each time you use a character style, you’re saving yourself several seconds you would have spent fiddling with settings in the Character panel or the Type menu. It might not seem like much, but saving a few seconds several hundred times a day can add up.
Creating Character Styles. The easiest way to create a character style is to build it “by example” (see Figure 4-59).
- Select some text that has the formatting you want.
- Hold down Option/Alt and click the Create New Style button at the bottom of the Character Styles panel (or select New Character Style from the Character Styles panel menu). InDesign displays the New Character Style dialog box.
- At this point, if you want to create a relationship between this style and another character style, you can choose that style from the Based On pop-up menu (see “Creating Parent-Child Style Relationships,” later in this chapter).
- Now give your style a name. You can also assign a keyboard shortcut to the character style—the key used must use a modifier key (Command, Ctrl, or Shift and a number key from the numeric keypad; NumLock must be on to define the shortcut).
Figure 4-59 Creating a Character Style
When you create a character style, InDesign won’t automatically apply the style to the text you selected in Step 1 unless you turn on the Apply Style to Selection checkbox in the General pane of the New Character Style dialog box. If you neglect to turn on this helpful checkbox, you’ll have to apply the style to the selected text manually.
QuarkXPress Users Beware: In QuarkXPress, a character style always defines all the character formatting of the text—font, color, size, and other attributes. InDesign’s character styles, however, are defined by differences between the character formatting of the selected text and the default character formatting of the surrounding text. In InDesign you can create a character style which, when applied to text, changes only its size and color, but retains all other underlying formatting.
This is actually a good thing—it means you can create character styles that affect some, but not all, of the attributes of a selection. It’s different from the way that almost every other application defines character styles, and it takes some getting used to.
Character Style Tips. Here are a few things to keep in mind when defining character styles in InDesign.
- If you’re building a character style based on example text (as we suggested earlier), InDesign only picks up the formatting differences between the text you’ve selected and the paragraph style applied to the paragraph. For example, if the underlying paragraph style uses the font Minion Pro Italic, and the text you’ve selected uses the same font, the Font attribute of the character style will not be defined automatically. If you want the font to be part of the character style definition, you can add it once you have the New Character Style dialog box open (select the font from the Font Family pop-up menu in the Basic Character Formats pane).
- If you want your character style to be defined by every attribute of your text selection, you can use the CreateCharacterStyle script (see Chapter 12, “Scripting,” for more on the example scripts that come with InDesign). Or you can create the character style from scratch (not from example text), specifying the font, size, color, leading, and all other formatting.
- Clicking the New Style button in the Character Styles panel creates a new character style based on whatever style was selected in the panel. It doesn’t open a dialog box.
- If you want to “undefine” an attribute in a character style, select and delete the current value (see Figure 4-60).
Figure 4-60 Undefining Attributes
Applying Character Styles. To apply a character style, select some text and do any one of the following things (see Figure 4-61).
- Click the character style name in the Character Styles panel.
- Press the keyboard shortcut you assigned to the character style.
- Point at the style name in the Character Styles panel and choose Apply from the context menu.
- Press Command-Enter/Ctrl Enter to display the Quick Apply panel, type the name of the style, and then press Enter.
Figure 4-61 Applying a Character Style
Again, applying a character style changes only those attributes that are defined in the style. This can cause grave confusion and hair-pulling if you’re used to the way QuarkXPress does it. If you apply a character style that applies only the underline type style and color, for example—InDesign leaves all other character formatting as is.
To remove a character style from a text selection, click None in the Character Styles panel—this reverts the text back to the underlying formatting of the paragraph style. If you want to remove the character style and leave the formatting alone (convert it to local formatting), choose Break Link to Style from the panel menu. This is sometimes useful when you want some text to be formatted using the formatting of a given character style, but you don’t want it linked to that style (because you know the style definition might change).
Editing Character Styles. The great thing about styles is that you can always change them later, and those changes ripple throughout your document. To edit a character style, you can use any or all of the following approaches—all of them display the Character Style Options dialog box, which you can use to change the attributes of the style.
- Hold down Command-Option-Shift/Ctrl-Alt-Shift and double-click the style name in the Character Styles panel.
- Point at the style you want to edit in the Character Styles panel and choose Edit from the context menu.
- Select the style and choose Style Options from the Character Styles panel menu.
- Double-click the style name in the Character Styles panel.
The first two approaches above do not apply the style; the latter two apply the style to the selected text, or to the document default formatting when no text is selected. Be aware of this difference as you go to edit a style—otherwise, you run the risk of accidentally applying the character style.
Redefining Character Styles. Editing a character style through the Character Style Options dialog box works fine, but is kind of boring. For quick changes, try this: Find some text tagged with the character style you want to redefine, then apply local formatting to it (change it to the way you want the style to be defined). A “+” will appear next to the character style name in the Character Styles panel. Next, without deselecting the text, press Command-Option-Shift-C/Ctrl-Alt-Shift-C. InDesign automatically redefines the character style based on the selected text (see Figure 4-62).
Figure 4-62 Redefining a Character Style
Alternatively, you can select the text and choose Redefine Style from the Character Styles panel menu. Or you could point at the style name in the panel and choose Redefine from the context menu. But the keyboard shortcut is more fun.
Deleting character styles. To remove a character style, press Command-Shift-A/Ctrl-Shift-A to deselect everything (do this so that you don’t accidentally apply the character style to text), then select the character style and choose Delete Style from the Character Styles panel menu (or click the Delete Style button in the panel).
InDesign displays the Delete Character Style dialog box, where you can select a replacement style (including no style). If you choose another character style, InDesign applies that character style to the text that had been formatted with the deleted style. If you choose no style, the text formatted with the style using the character style doesn’t change appearance—it becomes local formatting.
Paragraph styles encapsulate all text formatting—both paragraph formatting and character formatting.
Basic Style. If you look at the Paragraph Styles panel, you’ll always see a “Basic Paragraph” style. This is something like Word’s (infamous) “Normal” style, and provides a kind of default style for all text.
We tend not to use this style, or base any other style on it, because we’ve found it can cause problems as we move text from document to document. In a nutshell: If you have defined Basic Paragraph Style one way, then you copy a paragraph tagged with that style to a new document, the text formatting changes because InDesign applies the new document’s Basic Paragraph Style definition. That’s usually not what you were hoping for.
Creating Paragraph Styles. The easiest way (in our opinion) to create a text style is to format an example paragraph using local formatting, then create a new style based on that paragraph (see Figure 4-63).
- Select a formatted paragraph.
- Display the Paragraph Styles panel, if it’s not already visible (press Command/Ctrl-F11).
- Choose New Paragraph Style from the Paragraph Style pop-up menu in the Control panel, or from the Paragraph Styles panel menu (or Option/Alt-click the New Style button) to open the New Paragraph Style dialog box.
- Enter a name for the style in the Style Name field. You could leave the name set to the default, but we think it’s better to enter a descriptive name—“heading 1” is quite a bit easier to remember than “Paragraph Style 6.”
- You can also assign a Next Style (see “Next Styles” later in this chapter) and a keyboard shortcut to the style—the shortcut must use a modifier key (Shift, Command/Ctrl, Option/Alt, or some combination of the above) and a number key from the numeric keypad (NumLock must be on to define the shortcut).
- Turn on the Apply Style to Selection checkbox in the General pane of the New Paragraph Style dialog box. (Otherwise, the style won’t be applied to the paragraph your text cursor is in.)
- Click the OK button.
Figure 4-63 Defining a Paragraph Style
The style definition includes all the character and paragraph formatting applied to the first character in the selected “example” text.
If you work by the hour, you can also define a paragraph style from scratch, rather than basing your style on an example:
- Choose “New Style” from the Paragraph Styles panel menu. InDesign displays the New Style dialog box.
- Work your way through the dialog box, setting the options as you want them for your new style. When everything looks the way you want it to, press Return/Enter to close the dialog box.
Creating a style this way is a little bit more awkward than simply basing a style on an example paragraph, but some people prefer it. We’ve met at least one person who likes setting tabs “without all that pesky text in the way.”
Applying Paragraph Styles. To apply a paragraph style, select a paragraph or series of paragraphs (remember, you don’t have to select the entire paragraph to apply paragraph formatting) and click a style name in the Paragraph Styles panel (see Figure 4-64). Alternatively, if you’ve defined a keyboard shortcut for the paragraph style, you can press the shortcut.
Figure 4-64 Applying a Paragraph Style
When you simply click a paragraph style to apply it, InDesign retains all the local formatting, so italic text remains italic. The one exception to this rule is when every character in the paragraph has local formatting—that stuff always gets removed.
To remove all local formatting as you apply a paragraph style, hold down Option/Alt as you click the paragraph style name. Any formatting applied using character styles is retained.
To remove all local formatting and remove formatting applied by character styles, hold down Option-Shift/Alt-Shift as you click the paragraph style name.
Alternatively, you can use the Context menu in the Paragraph Styles panel to control which local formatting overrides you want to clear and/or keep.
To remove all local formatting (not including character styles) after you’ve applied a style, click the Clear Override button at the bottom of the Paragraph Styles panel. To remove all local character formatting, hold down Command/Ctrl as you click the button; to remove paragraph formatting, hold down Command-Shift/Ctrl-Shift as you click.
To remove a paragraph style from a text selection, choose Break Link to Style from the Paragraph Styles panel menu. Note that this does not change the formatting or the look of the selected paragraphs—it simply applies the formatting applied by the paragraph style as local formatting. As we said in the “Character Styles” section, you can think of this as breaking the link between the paragraph and the style definition.
Editing Paragraph Styles. To edit a paragraph style, you can use any or all of the following approaches—all of them display the Paragraph Style Options dialog box, which you can use to change the attributes of the paragraph style.
- Hold down Command-Option-Shift/Ctrl-Alt-Shift and double-click the paragraph style name in the Paragraph Styles panel.
- Point at the style you want to edit in the Paragraph Styles panel and choose Edit from the context menu.
- Select the style and choose Style Options from the Paragraph Styles panel menu.
- Double-click the style name in the Paragraph Styles panel.
The first two approaches above do not apply the style; the latter two apply the style to the selected text, or to the document default formatting when no text is selected. Be aware of this difference as you go to edit a style—accidentally setting the default font for a document to a style featuring hot pink dingbats can be a frustrating and embarassing experience.
Redefining Paragraph Styles. The easiest way to create a paragraph style is to base the style on the formatting of an example paragraph. The easiest way to update the style definition? Do the same!
First, pick any paragraph tagged with the style you want to change, and apply local formatting to it (a “+” will appear next to the style name in the Paragraph Styles panel). Then choose Redefine Style from the Paragraph Styles panel menu (or press Command-Option-Shift-R/Ctrl-Alt-Shift-R, or use the Context menu). InDesign will redefine the style based on the selected text (see Figure 4-65).
Figure 4-65 Redefining a Paragraph Style
Next Style. If you’re typing in InDesign, and the paragraph you’re in is tagged with the “Heading” style, you probably don’t want the next paragraph to be tagged with “Heading” too, right? You can force InDesign to automatically change the subsequent paragraph style with the Next Style pop-up menu in the New Paragraph Style or Paragraph Style Options dialog box (see Figure 4-66). For example, if you want the subsequent paragraph to be “BodyText,” then choose “BodyText” from the Next Style pop-up menu.
Figure 4-66 Next Style
Note that this only works if the insertion point is at the end of a paragraph when you press Return/Enter. If the insertion point is anywhere else, you’ll simply break that paragraph in two, and both new paragraphs will have the same style as the original one.
Using Next Style on Existing Text. What if you want to apply a sequence of paragraph styles to text you’ve already entered or imported? Select the range of text you want to format, then point at the first paragraph style you want to apply. Choose Apply style name Then Next Style from the context menu (where style name is the name of the style you want to apply). InDesign applies the sequence of paragraph styles (see Figure 4-67).
Figure 4-67 Applying Sequential Styles
Selecting Unused Paragraph Styles. Choose Select All Unused from the Paragraph Styles panel menu to select all paragraph styles that are not applied to any text in the publication. Typically, the only reason you’d want to do this is to delete them all.
Deleting Paragraph Styles. To remove a paragraph style from your document, first deselect everything (press Command-Shift-A/Ctrl-Shift-A), then select the style name in the Paragraph Styles panel and choose Delete Styles from the panel’s menu (or click the Delete Style button at the bottom of the panel). InDesign deletes the style.
InDesign gives you a choice of how to handle paragraphs already tagged with that style. You can choose No Paragraph Style to convert the formatting applied by the style to local formatting, or you can choose to apply another style. If you want to replace one style with another without deleting the original style, use the Find/Change dialog box (see Chapter 3, “Text”).
Paragraph Styles and Nested Styles
As we mentioned in the discussion earlier in this chapter, nested styles really come into their own when combined with paragraph styles. Remember all of the work we did to set up the nested styles in our example? Now imagine putting all of that formatting power into a paragraph style. Imagine applying it with a single mouse click. Again, we think this stuff is very cool (see Figure 4-68).
Figure 4-68 Adding Nested Styles to a Paragraph Style
Creating Parent-Child Style Relationships
One powerful feature of InDesign’s character and paragraph styles is the ability to base one style on another, also called parent-child relationships (see Figure 4-69). You can base a style on another one by choosing a style from the Based On pop-up menu in either the New Paragraph Style or the Paragraph Style Options dialog box (this works for either character or paragraph styles).
Figure 4-69 Using Based On
In this book, there are body text styles for paragraphs that follow headings, paragraphs that are in lists, and so on—but they’re all based on one “parent” paragraph style. If we need to make the text size a half-point smaller, we could edit the parent style and the change would ripple throughout the book.
When one style is based on another, InDesign keeps track of the differences between the base style (the “parent”) and the style based on it (the “child”). When you change the definition of the parent style, the changes will affect all of the attributes in the child style that are the same as the same attributes in the parent style.
Reset to Base. By the way, if your text cursor is in a paragraph when you create a new style, that paragraph’s style becomes the “based on” style and any local formatting applied to the paragraph appears as the differences in the new style. If you don’t want the local formatting, click the Reset to Base button. If you don’t want your new style to be based on anything, make sure the Based On pop-up menu is set to No Paragraph Style.
Style Groups are a way to organize your paragraph and character styles. (They work with object styles and table styles, too, but that’s not what we’re talking about in this chapter.) Each style group is a folder into which you can put one or more styles. You can even nest one style group into another to create style hierarchies.
To create a style group, click the New Style Group button at the bottom of the Paragraph Styles or Character Styles panel (or choose the feature of the same name from the panel’s menu). If you already know which of your styles you want in your group, you can add them while creating the group by first selecting them first (see Figure 4-70).
Figure 4-70 Creating Style Groups
Once you’ve created a style group, you can move any style into it by dragging the style name in the panel into the group. It’s very similar to working with folders in your operating system.
One of the coolest things about style groups is that you can have the same-named styles in more than one group. For example, you might make a “bodytext” paragraph style in a group called “Business Section” and another, differently-styled “bodytext” style in a group called “Entertainment Section”. We’re not saying you have to create templates like this, but it can be useful in certain situations.
To copy one or more selected styles to another group, choose Copy to Group from the panel menu, or Option/Alt-drag them over another folder.
What’s Wrong with Style Groups? At first, style groups sound great, especially if you have dozens of styles in your document. But you need to be careful with them. First, if do have same-named styles with different definitions, it can be confusing which bodytext or which heading you’re applying. This calls for eternal vigilance. It helps if you apply styles with Quick Apply, because the Quick Apply window displays both the style name and what style group its in.
The big problems appear if you need to export your documents as RTF (rich text format) for someone who is editing in Microsoft Word. Style groups will cause huge headaches because on export InDesign changes the style names (it adds the style group name). This isn’t so bad except that when you reimport the RTF file, it’s not smart enough to remap the style names back to the document’s styles, so you end up with all your styles duplicated. It’s horrible. We hope that Adobe will release a patch to fix this problem by the time you read this, but we’re not holding our breath. Of course, in the meantime, it’s a good excuse to get your editors to use InCopy instead.