Creating new (custom) styles

From Apache OpenOffice Wiki
Jump to: navigation, search


In addition to using the predefined styles provided by OOo, you can add new custom (user-defined) styles. OOo provides three ways to add styles.

Creating a new style using the Style dialog box

Open the Styles and Formatting window. Right-click on a style and select New. The style that you choose will be the basis for this new style. If you do not want too many of the options preset for you, choose the Default style.

The dialog box displayed depends on the type of style selected. The figure below shows an example of a Style dialog box for a new paragraph style. The dialog boxes and choices for defining new styles are the same as for modifying existing styles.

Tip.png An exception to the above rule is conditional styles, which have a different dialog box. See Working with conditional paragraph styles for more information.


Linking styles

You can link a new style to an existing style. For example, suppose that the style mystyle specifies a font size of 12. Then you create another style (mystyle2) linked to mystyle and specifies underlined text. If you modify mystyle to font size 20, mystyle2 inherits the new font size but still underlines the text.

Linking styles
Linking a new paragraph style to an existing style.

Tip.png If styles are linked, changing the base style changes all the linked styles. Sometimes this is exactly what you want; other times it is not. It pays to plan ahead. Many predefined styles are already linked to other styles.


Creating a new style from a selection

You can create a new style from the formatting of an object in the current document. For instance, you can change the formatting of a paragraph or frame until it appears as you like, and then you can turn that object's formatting into a new style. This procedure can save time, because you do not have to create a new style as described above and remember all of the formatting settings.

  1. Change the formatting of the object (paragraph, frame, etc) to your liking.
  2. Open the Styles and Formatting window. From the icons at the top of the window, choose the type of style to create (paragraph, character, and so on).
  3. In the document, select the item to save as a style.
  4. In the Styles and Formatting window, click the New Style from Selection icon.
  5. In the Create Style dialog box, type a name for the new style. The list shows the names of existing custom styles of the selected type, if any. Click OK to save the new style.

Dragging and dropping a selection to create a style

You can drag and drop a text selection into the Styles and Formatting window to create a new style.

  1. Open the Styles and Formatting window.
  2. Select some text and drag it to the Styles and Formatting window.
  3. In the Create Style dialog box, type a name for the new style. The list shows the names of existing custom styles of the selected type, if any. Click OK to save the new style.
  4. If the Paragraph Styles list is showing in the Styles and Formatting window, a new paragraph style will be added to the list. If Character Styles are active, the character style will be added to the list.
Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools