Formatting with Styles

OpenOffice.org uses styles for applying consistent formatting to various elements in a document. The following types of styles are available:

Table 2.1. About the Types of Styles

Type of Style

What it Does

Paragraph

Applies standardized formatting to the various types of paragraphs in your document. For example, apply a paragraph style to a first-level heading to set the font and font size, spacing above and below the heading, location of the heading, and other formatting specifications.

Character

Applies standardized formatting for types of text. For example, if you want emphasized text to appear in italics, you can create an emphasis style that italicizes selected text when you apply the style to it.

Frame

Applies standardized formatting to frames. For example, if your document uses sidebars, you can create frames with specified graphics, borders, location, and other formatting so that all of your sidebars have a consistent appearance.

Page

Applies standardized formatting to a specified type of page. For example, if every page of your document contains a header and footer except for the first page, you can use a first page style that disables headers and footers. You can also use different page styles for left and right pages so that you have bigger margins on the insides of pages and your page numbers appear on an outside corner.

List

Applies standardized formatting to specified list types. For example, you can define a checklist with square check boxes and a bullet list with round bullets, then easily apply the correct style when creating your lists.


Opening the Styles and Formatting Window

The Styles and Formatting window (called the Stylist in earlier versions of OpenOffice.org), is a versatile formatting tool for applying styles to text, paragraphs, pages, frames, and lists. To open this window, click Format+Styles and Formatting. OpenOffice.org comes with several predefined styles. You can use these styles as they are, modify them, or create new styles.

[Tip]

By default, the Styles and Formatting window is a floating window; that is, it opens in its own window that you can place anywhere on the screen. If you use styles extensively, you might find it helpful to dock the window so that it always present in the same part of the Writer interface. To dock the Styles and Formatting window, press Control while you double-click on a gray area in the window. This tip applies to some other windows in OpenOffice.org as well, including the Navigator.

Applying a Style

To apply a style, select the element you want to apply the style to, and then double-click the style in the Styles and Formatting window. For example, to apply a style to a paragraph, place the cursor anywhere in that paragraph and double-click the desired paragraph style.

Using Styles Versus Using Formatting Buttons and Menu Options

Using styles rather than the Format menu options and buttons helps give your pages, paragraphs, texts, and lists a more consistent look and makes it easier to change your formatting. For example, if you emphasize text by selecting it and clicking the Bold button, then later decide you want emphasized text to be italicized, you need to find all of your bolded text and manually change it to italics. If you use a character style, you only need to change the style from bold to italics and all text that has been formatted with that style automatically changes from bold to italics.

Text formatted with a menu option or button overrides any styles you have applied. If you use the Bold button to format some text and an emphasis style to format other text, then changing the style does not change the text that you formatted with the button, even if you later apply the style to the text you bolded with the button. You must manually unbold the text and then apply the style.

Likewise, if you manually format your paragraphs using Format+Paragraph, it is easy to end up with inconsistent paragraph formatting. This is especially true if you copy and paste paragraphs from other documents with different formatting. However, if you apply paragraph styles, formatting remains consistent. If you change a style, the change is automatically applied to all paragraphs formatted with that style.

Changing a Style

With styles, you can change formatting throughout a document by changing a style, rather than applying the change separately everywhere you want to apply the new formatting.

  1. In the Styles and Formatting window, right-click the style you want to change.

  2. Click Modify.

  3. Change the settings for the selected style.

    For information about the available settings, refer to the OpenOffice.org online help.

  4. Click OK.

Creating a Style

OpenOffice.org comes with a collection of styles to suit many users’ needs. However, most users eventually need a style that does not yet exist. To create a new style:

  1. Right-click in any empty space in the Styles and Formatting window.

    Make sure you are in the list of styles for the type of style you want to create. For example, if you are creating a character style, make sure you are in the character style list.

  2. Click New.

  3. Click OK.

  4. Name your style and choose the settings you want applied with that style.

    For details about the style options available in any tab, click that tab and then click Help.