Power Formatting With Styles

"-->

In the previous sections we talked about formatting characters and paragraphs manually, which is how most people format: selecting text and either clicking quick-formatting tools on the object bar and ruler or choosing a Format menu item to set specific formatting options.

There are legitimate reasons to use only manual formatting (such as quick formatting of short documents whose styles you don't plan to reuse). However, to get the most out of Writer and to work more quickly with more consistency, use styles and templates.

About Writer Styles

Note

The styles for normal page contents, bibliographies , etc. are paragraph styles. If you've used Microsoft Word or other programs, you might be used to them as page styles.


Just a set of characteristics stored under a name

Paragraphs, text, pages, and other elements have certain characteristics: for example, a heading (like the one just above this paragraph) that is 16-pt. bold Helvetica with a 3/4-inch left indent. A style is simply a name given to this set of characteristics, such as Heading 2 .

Making new or modified styles available in other documents

To make a new or modified style available in other documents, you have to drag the style to the document using the Organizer. Choose File > Templates > Organizer. (If you're familiar with FrameMaker, it's kind of the same process as File > Import > Formats.) If you've created style MyNewStyle in your lettertohoney.sxw , that's the only document where the style MyNewStyle will be available. For instructions on dragging styles to other documents, see Loading Styles From Another Document on page 265, in particular Figure 7-63 on page 266 and Figure 7-64 on page 267.

Figure 7-63. Loading styles from the Import Styles window

graphics/07fig63.jpg

Figure 7-64. Loading styles from one document to another in the Document Templates window

graphics/07fig64.jpg

Five types of styles

Figure 7-55 illustrates the five types of styles in Writer. You've already created and formatted everything here; this Styles section just tells you how to create predefined groups of the attributes that are easy to apply, and transfer to different documents and templates.

Why You Should Use Styles

Following are the reasons why you should use styles. Any one of these reasons alone justifies using them.

Instant formatting

With a double-click you can transform a plain text paragraph into one with a different font, font size, font color, indentation, spacing, alignment, and background color . All paragraphs that are given that style are identical.

Automation

When you end a paragraph and press Enter, the next paragraph can become another style automatically. For example, pressing enter at the end of a heading can put you directly into a body paragraph style. Also, when you modify a style, all paragraphs with that style are updated automatically. Automation is good! It doesn't mean "cookie- cutter "; it means you work more quickly, efficiently , and consistently.

Maintaining consistency

Using styles ensures your documents will maintain a consistent style.

Running headers and footers

If you want the main headings in your document to appear automatically in the header or footer of the document, your main headings need to be styles.

Table of contents generation

Writer uses heading styles to generate tables of contents automatically. Using styles for figure and table captions also lets you build lists of figures and tables.

How Styles Work in Writer

The Stylist should be your closest companion in Writer. To show it, press the F11 key.

Behind the scenes, styles also use styles in Writer. For example, if a paragraph style uses numbering or bullets, you'll select the numbering style to use within the paragraph style. Also, in numbering styles, you can assign a character style to use for the numbering or bullet characters.

Styles apply only to the document in which you create them

To make styles in one document available to other documents, see Loading Styles From Another Document on page 265. (If you're familiar with FrameMaker, it's kind of like the process you have to go through to import a new or modified style, using File > Import > Formats.)

About the Stylist

The Stylist, shown at right, is the control center for viewing, applying, adding, modifying, and deleting styles. Table 7-1 provides more detail about the categories.

graphics/07inf16.jpg

The Style Catalog

You can also create, modify, and delete styles using the Style Catalog (Format > Styles > Catalog).

Tips for Using Styles

With the Stylist docked , make sure you have tooltips turned on (Help > Tips) to help you select the style type you want. When the mouse pointer hovers over a style type button, its name is displayed. (If the Stylist is a floating window, the name of the selected style category is displayed in the window's title bar.)

Writer comes with a predefined set of styles: paragraph, character, numbering, page, and frame. These defaults are designed to get you going, but ultimately you'll want to modify the defaults or create your own styles. If you find you're not using a lot of the default styles ( especially the paragraph and character styles), and since you can't delete them, stay in the Custom Styles category of the Stylist.

This will help you more quickly find the styles you do want to use, which also makes using styles less intimidating, because you're not swimming in a sea of unfamiliar styles names you had no part in creating. And since it's good practice not to go too overboard creating a multitude of possible styles (you should only create the ones you'll really use), the Custom Styles category should give you plenty of room to store all the styles you need.

You don't have to have all your styles perfect before you start using them. You'll want to make adjustments to them as you work. The great thing about styles is that you can change them when you want, and all of the paragraphs that use them are updated automatically.

Table 7-1 describes style categories, in the drop-down list at the bottom of the Stylist.

Table 7-1. Writer Stylist categories

Category

Description

All

Shows all defined styles for each style type.

Applied Styles

Shows all the styles you've used in your document so far. Since these applied styles are also displayed in the object bar, take advantage of this by selecting a different category in the Stylist. This lets you see styles for two categories at once.

Custom Styles

Shows the styles you've created beyond the default styles provided by Writer. The styles you create remain in this category even if you assign them to a different category.

Hierarchical

Displays styles in a hierarchical tree view. If a style has a plus sign next to it (+), click the plus sign to view the styles that were created based on that style.

The following categories apply only to paragraph styles

Automatic

Allows the category to change based on where the cursor is located in the document. For example, if the cursor is in a body paragraph, the Text Styles category is shown. If the cursor is moved to within a header, the Special Styles category is shown.

Text Styles

Shows styles that are related to heading and body text.

Chapter Styles

Shows styles that are related to chapter-level text, such as titles and subtitles .

List Styles

Shows an ungodly and confusing amount of hanging indent paragraph styles without bullets. Use this category only if you want to get dizzy. Instead, create your own numbered and bulleted list paragraph styles and store them in a category other than this one.

Index Styles

Shows styles that are related to indexes and tables of contents.

Special Styles

Shows styles that are used in special regions such as headers, footers, and tables.

HTML Styles

Shows styles that are used in HTML documents. Use this category when you're working in Writer/Web.

Conditional Styles

Shows the paragraph styles that have conditions. For example, a paragraph style that behaves differently in a table than it does in regular body text.

Standard Paragraph Styles

This section describes how to create paragraph styles.

  • For information on applying styles, see page 259

  • For modifying styles, see page 260

  • For deleting styles, see page 261

  • For changing the category of styles, see page 261

Creating a paragraph style is fairly easy. In fact, if you know how to format paragraphs manually (see Using the Paragraph Format Window on page 210), you know 90 percent of creating a paragraph style.

  1. In the Stylist, click the Paragraph Styles button.

  2. Select the category in which you want to put the new style.

  3. If you want to create a new style based on an existing style, select the style you want to base it on before you right-click.

  4. Right-click in the Stylist and select New. The Paragraph Style window is displayed.

  5. Set the formatting options for the paragraph. (See the field descriptions in Using the Character Formatting Window on page 202 and Using the Paragraph Format Window on page 210 for more information.)

  6. In the Organizer tab, type a name for the style.

    Use a name that will help you remember what the style either looks like or is used for.

  7. Set the options in the Condition tab, if applicable . (See Figure 7-56 on page 252.)

    Figure 7-56. The Paragraph Style window, Organizer tab

    graphics/07fig56.jpg

  8. Click OK.

Making your new style available in other documents

To make a new style available in other documents, you have to drag the style to the document using the Organizer. Choose File > Templates > Organizer. (If you're familiar with FrameMaker, it's kind of the same process as File > Import > Formats.) If you've created style MyNewStyle in your lettertohoney.sxw , that's the only document where the style MyNewStyle will be available. For instructions on dragging styles to other documents, see Loading Styles From Another Document on page 265, in particular Figure 7-63 on page 266 and Figure 7-64 on page 267.

Figure 7-56 shows paragraph style options on the Organizer tab.

Conditional Paragraph Styles

Figure 7-56 shows paragraph style options on the Condition tab.

Figure 7-57. The Paragraph Style window, Condition tab

graphics/07fig57.jpg

About conditional paragraphs

OpenOffice.org lets you can create different conditions for how a paragraph style is used. For example, you can have the Text Body paragraph style take on different characteristics when it's used in different places (under different conditions): in headers, body text, tables, and so on. There's no compelling reason why you'd want to use this feature over creating separate paragraph formats. There is, however a compelling reason not to use this feature: it can be a maintenance nightmare. As the following section on Using Conditions shows, this feature adds an unnecessary layer of complexity when you're simply trying to modify a paragraph style.

Using conditions

When you want to modify a paragraph style, look first to see if it has a Condition tab with condition settings. Here's why: Because conditional paragraphs can take on different paragraph style characteristics when they're used in different contexts, modifying them can get confusing.

For example, suppose a body text paragraph is a 10 pt. regular (not bold) font in a body paragraph, and it has a conditional setting that makes it appear as a 12 pt. italic font in a text box. If you want to change the text box font, you may be thrown by the fact that the font definition for a text body paragraph doesn't match what is shown in the text box. You might then be tempted to make a wholesale change to the text body font to see if that fixes the seeming font disparity. If you do that, the font for all text body paragraphs change, but the text in the text box remains the same because the condition remains the same.

Table 7-2. Extended descriptions of categories in the Condition tab

Name

Meaning

Automatic

Displays Styles appropriate to the current context.

All Styles

Displays all Styles of the active Style category.

Applied Styles

Displays the Styles (of selected category) applied in the current document. These can also be selected from the Object bar.

Custom Styles

Displays all user -defined Styles of the selected Style category.

Character Styles

Displays appropriate Styles for text.

Chapter Styles

Displays appropriate Styles for chapters.

List Styles

Displays appropriate Numbering Styles for lists.

Index Styles

Displays appropriate Styles for indexes.

Special Region Styles

Displays appropriate Styles for special regions (e.g., headers, footnotes, tables, captions).

HTML Styles

Displays a list of Styles for HTML documents.

Conditional Styles

Displays the user-defined Conditional Styles.

Hierarchical

Displays the Styles in the selected Style category in a hierarchical list. To display the Styles in sublevels, click on the plus sign next to the name of the Style.

Creating a Paragraph Style Using Drag and Drop

You can also create a style by drag and drop. This method doesn't let you set Organizer or Condition tab options.

  1. In your document, format the paragraph manually (see Using the Paragraph Format Window on page 210 and Using the Character Formatting Window on page 202).

  2. In the Stylist, click the Paragraph Styles button and select a paragraph style category to which you want to add the style.

  3. In the document, select the paragraph you want to add, click and hold on the selection, and drag the pointer into the Stylist, as shown in Figure 7-58.

    Figure 7-58. Creating a paragraph style using drag and drop

    graphics/07fig58.jpg

    Make sure you don't drag onto the name of an existing style, because you will overwrite the style.

  4. In the Create Style window, type a name for the style and click OK.

Cross-referencing paragraphs that have numbering

If you want to cross-reference the autogenerated numbers /text of a paragraph, such as "Figure 5-1" in a caption paragraph style, you need to number those paragraph formats in a different way. See Outline Numbering, for Chapter, Figure, and Cross-Reference Numbering on page 314.

Character Styles

This section describes how to create character styles. For information on applying styles, see page 259; for modifying styles, see page 260; for deleting styles, see page 261; for changing the category of styles, see page 261.

Making your new or modified style available in other documents

See Loading Styles From Another Document on page 265, in particular Figure 7-63 on page 266 and Figure 7-64 on page 267.

Creating a Character Style

Creating a character style is fairly easy. In fact, if you know how to format characters manually (see Using the Character Formatting Window on page 202), you know 90 percent of creating a character style.

  1. In the Stylist, click the Character Styles button.

  2. At the bottom of the Stylist, select the category in which you want to put the new style.

  3. If you want to create a new style based on an existing style, select the style you want to base it on before you right-click. For more information on this, see Figure 7-59.

    Figure 7-59. The Character Style window, Organizer tab

    graphics/07fig59.jpg

  4. Right-click in the Stylist and select New. The Character Style window is displayed.

  5. Set the formatting options for the character style.

    See the field descriptions in Using the Character Formatting Window on page 202 for more information.

  6. In the Organizer tab, type a name for the style.

    Use a name that will help you remember what the style either looks like or is used for.

  7. Click OK.

The character style doesn't include hyperlink properties, which are offered in the Character window (Format > Character). You must set hyperlink properties on a case-by-base basis. See Figure 8-1 on page 272 for details.

Figure 7-59 shows the options in the Organizer tab.

Creating a Character Style Using Drag and Drop

You can also create a style by drag and drop. This method doesn't let you set Organizer tab options.

  1. Format the characters manually (see Using the Character Formatting Window on page 202).

  2. In the Stylist, click the Character Styles button and select a character style category to which you want to add the style.

  3. In the document, select the text you want to add, click and hold on it, and drag the pointer into the Stylist.

    Make sure you don't drag onto the name of an existing style, because you will overwrite the style.

  4. In the Create Style window, type a name for the style and click OK.

Numbering and Bullet Styles

Making your new or modified style available in other documents

See Loading Styles From Another Document on page 265, in particular Figure 7-63 on page 266 and Figure 7-64 on page 267.

You can save custom numbering or bulleted lists by creating styles for them. Numbering Styles (which can include bullet styles) let you quickly apply custom numbering to any part of your document.

This section describes how to create numbering styles.

For information on applying styles, see page 259; for modifying styles, see page 260; for deleting styles, see page 261; for changing the category of styles, see page 261.

Creating a Numbering Style

Creating a numbering style is fairly easy. In fact, if you know how to format with numbers and bullets manually (see Numbering, Bullets, and Outlining on page 217), you know 90 percent of creating a numbering style.

  1. In the Stylist, click the Numbering Styles button.

  2. Right-click in the Stylist and select New. The Numbering Style window is displayed.

  3. Set the numbering options for the numbering style.

  4. In the Organizer tab, type a name for the style.

    Use a name that will help you remember what the style either looks like or is used for.

  5. Click OK.

Note

You can also use a numbering style as part of a paragraph style, so that when you apply a paragraph style in the document, the numbering or bullets appear automatically. See Creating Page Styles on page 257


Creating a Numbering Style Using Drag and Drop

You can also create a numbering style by drag and drop.

  1. Format the numbering/bullets manually (see Numbering, Bullets, and Outlining on page 217 and Customizing Numbering, Bullets, and Outlining on page 220).

  2. In the Stylist, click the Numbering Styles button.

  3. In the document, select the first line of the custom numbering you want to add, click and hold on it, and drag the pointer into the Stylist.

    You don't have to select the number/bullet in that paragraph; just the text.

    Make sure you don't drag onto the name of an existing style, because you will overwrite the style.

  4. In the Create Style window, type a name for the style and click OK.

Creating Page Styles

Page styles control such elements as margins, headers, footers, columns , and which page styles follow each other.

Note

Page styles are the key to using different headers and footers in your document, since headers and footers are controlled by the page style in use.


For information on applying styles, see page 259; for modifying styles, see page 260; for deleting styles, see page 261; for changing the category of styles, see page 261.

  1. In the Stylist, click the Page Styles button.

  2. Select the category in which you want to put the new style.

  3. Right-click in the Stylist and select New. The Page Style window is displayed.

  4. Set the options you want for the page.

    If you need help setting options, refer to the following figures.

  5. Click OK.

Figure 7-60 shows page style options on each of the tabs in the Page Style window. The other windows are explained in Page Layout on page 233.

Figure 7-60. The Page Style window, Organizer tab

graphics/07fig60.jpg

About the Next Style Field

As you create custom styles, you may need to wait to set this field until all the page styles you want to use are created.

About the Page Layout Field

If your document seems to skip pages in the page numbering or starts documents at page zero, try setting the Page Layout field (in the Page tab) to All.Frame Styles

Frames are boxes you insert into a document to hold paragraphs and graphics around which you want to wrap the body text of your document. Frame styles let you use a consistent format for frames you commonly use. Frame styles control such attributes as frame size, position, wrapping, borders, backgrounds, and number of columns. You can even assign macros to run when the frame is selected.

For information on applying styles, see page 259; for modifying styles, see page 260; for deleting styles, see page 261; for changing the category of styles, see page 261.

Creating Frame Styles

Making your new or modified style available in other documents

See Loading Styles From Another Document on page 265, in particular Figure 7-63 on page 266 and Figure 7-64 on page 267.

To learn about frames, see Using Frames for Advanced Page Layout on page 239.

  1. In the Stylist, click the Frame Styles button.

  2. Select the category in which you want to put the new style.

  3. Right-click in the Stylist and select New. The Frame Style window is displayed.

  4. Set the options you want for the frame, and click OK.

    Creating a frame style is similar to setting frame properties when you insert one in a document. See Tips for Adjusting Inserted Objects and Fixing Broken Links on page 304.

Applying Styles

  1. Select the paragraph, character, page, or frame to which you want to apply a style.

  2. In the Stylist, select the type of style you want to apply, select a category, and double-click the name of the style you want to use.

Applying Paragraph Styles

As you apply styles in the document, the object bar displays styles you've applied so far. You can then apply styles from the object bar as well.

Applying Character Styles

You get more control over selecting words by double-clicking them. For example, you don't have to take time pinpointing the cursor to avoid selecting spaces before or after a word.

To select a series of words, double-click the first word, and as you drag through the remaining words you want to select, each word is selected in full. Again, this lets you drag quickly without having to avoid selecting the space after the last word.

You can also select nonsequential words by double-clicking. See Selecting Nonconsecutive Blocks of Text on page 185.

Applying Frame Styles

To apply a frame style, you must first insert a frame. See Inserting Frames and Floating Frames on page 297.

After you insert a frame, the frame styles appear in the Stylist. Double-click a frame style to apply it to the frame you inserted.

Removing Numbers and Bullets

Remove numbering or bulleting in a paragraph by clicking in the numbered or bulleted paragraph (or highlighting multiple paragraphs) and clicking the Numbering or Bullets icons in the object bar.

Applying and Switching Page Styles

In a page style, the Next style field on the Organizer tab forces a page to be followed by a specific page: for example, a left page is followed by a right page and vice versa. So if you apply a page style to a page by double-clicking the page style in the Stylist, all subsequent pages will follow the Next style rules begun by the page style you've applied.

You can break the flow of page styles by creating a manual break. For example, you can break a left/right page flow at the end of a section by manually inserting a blank page with no headers or footers. Here's how:

  1. Click in the exact place in the document where you want to create a break.

    If you're breaking at a heading, click at the very beginning of the heading.

  2. Choose Insert > Manual Break.

  3. Select Page Break, and in the Style field, select the page style you want to use for the new page.

    graphics/07inf17.jpg

  4. If you want the page to restart at a page number other than what is used in the regular page flow, select the Change page number option and set the page number the new page will begin with.

    For a practical example of changing page numbering, see Chapter-Page Numbering on page 323.

  5. Click OK.

You can also use this technique to switch between portrait and landscape page styles.

Modifying Styles

Making your modified style available in other documents

See Loading Styles From Another Document on page 265, in particular Figure 7-63 on page 266 and Figure 7-64 on page 267.

  1. In the Stylist, select the style type containing the style you want to modify.

  2. Select the category the style belongs to.

  3. Right-click the style and select Modify.

    If you're modifying a paragraph style, check to see if the paragraph style has a Condition tab with conditional settings.

  4. Change settings for the style. If you need formatting guidance, see the previous formatting sections.

  5. Click OK.

  6. If a style doesn't update automatically in the document, select the name of the style in the Stylist and click the Update Style button at the top of the Stylist.

    graphics/updatestyle.gif

About updating paragraphs

If you try to update a paragraph but the paragraph font doesn't change, you may have applied a character style to the paragraph that is overriding the paragraph style. To fix this, select the entire paragraph and choose Format > Default. This removes the character style override and lets the paragraph use its own style.

Modifying Styles Using Drag and Drop

You can also modify paragraph, character, and numbering styles by drag and drop:

  1. Format the paragraph, characters, or numbering manually (with the object bar or from the Format menu).

  2. In the Stylist, select the type of style you're modifying and select the category the style belongs to.

  3. In the document, select the modified paragraph, characters, or numbering; click and hold on it; and drag the pointer into the Stylist and onto the name of the style you want to modify.

The character style doesn't include hyperlink properties, which are offered in the Character window (Format > Character). You must set hyperlink properties on a case-by-base basis. See Figure 8-1 on page 272 for details.

Deleting Styles

Default styles cannot be deleted. This procedure applies to custom styles you've created.

Before you delete a style, select it in the Stylist, right-click it, select Modify, and select the Organizer tab. Look at the style selected in the Based on field (if applicable). When you delete the style, if it was used in the document, the parts of the document that were assigned that style become the style shown in the Based on field.

  1. In the Stylist, select the style you want to delete.

  2. Right-click it, and select Delete.

  3. Click Yes in the confirmation window.

Changing Style Categories

You can reorganize the styles you create by moving them into different categories. However, you can't change the categories of default Writer styles.

  1. In the Stylist, select the style whose category you want to change.

  2. Right-click it, and select Modify.

  3. Select the Organizer tab.

  4. In the Category field, select the new category you want to use.

  5. Click OK.

All styles you create are custom, and therefore put in the Custom Styles category. Changing a style from the custom category to another category simply puts your custom style in an additional category.



OpenOffice. org 1.0 Resource Kit
OpenOffice.Org 1.0 Resource Kit
ISBN: 0131407457
EAN: 2147483647
Year: 2005
Pages: 407

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