Working with character styles

From Apache OpenOffice Wiki
Jump to: navigation, search


Character styles complement paragraph styles and are applied to groups of characters, rather than whole paragraphs. They are mainly used when you want to change the appearance or attributes of parts of a paragraph without affecting other parts. Examples of effects that can be obtained by means of character styles are bold or italic typeface or colored words.

Two of the character styles used in this document are:

  • Keystrokes use the custom OOoKeyStroke style. For example:
To set Writer to full screen, press Control+Shift+J.
  • Menu paths use the custom OOoMenuPath style. For example:
To turn field shadings on or off, choose View > Field Shadings.

Other ways of using character styles are described elsewhere in the Writer Guide. These uses include making chapter numbers, page numbers, or list numbers larger than the surrounding text and formatting hyperlinks. When inserting words in different language or words you do not want the spell checker to detect as mistakes (for example procedure names in some programming language), character styles are quite useful because you can define the language to be applied in the character-style properties.

Why use character styles?

Beginning Writer users often wonder, “Why use character styles?” or “How is this different from clicking the bold icon to change the font typeface?” The following real-life event illustrates the difference.

Jean is a technical writer from Australia. She learned the value of character styles after her publisher told her to unbold menu paths in her 200-page book. Jean had not used character styles. She had to edit all 200 pages by hand, with some help from Find & Replace. This was the last time Jean failed to used character styles.

Character styles do not have as many options as paragraph styles or page styles. Their benefits are of a different nature:

  • Formatting changes

As Jean’s story illustrates, the ability to make formatting changes throughout a document can be important. Character styles provide this.

  • Consistency

Character styles help ensure that typesetting guidelines are applied consistently.

  • Focus on content

Was I supposed to bold keystrokes? How about menus?” A writer should not have to remember the answers to these questions. Typesetting details distract you from the real content of your work. A properly named custom character style (such as OOoKeyStroke or OOoMenuPath) will remove this burden from you.

Creating a new character style

This section illustrates the use of the style dialog box for creating a new character style.

The pages used to configure the character style have already been seen in the previous section on paragraph styles. Therefore, once you are familiar with creating paragraph styles, it will only take a few minutes to create a character style.

  • Use the Organizer to set up the hierarchical level of the new character style (if needed) and to give it a name.
  • Use the Font page to determine the font, typeface, and size for your character style. As with paragraph styles, you can specify the size as a percentage rather than providing the absolute value. For example, 150% means that when the character style is applied to a 10pt font size, the new font size will be 15pt, while if applied to a 14pt font size, the new size will be 21pt. You can also specify the Language of the text to which a certain character style is applied, so you can insert words in a different language and have them spell checked using the correct dictionary.
  • In the Font Effects page, you can set up attributes such as font color, underlining, relief, or other effects. If you frequently use hidden text, for example, it is very convenient to define a character style where the Hidden option is marked. This way you only need a few mouse clicks to hide text. Relief effects may be appropriate for a drop cap or to give more emphasis to the chapter number or other parts of the title (as it is the case of this guide).
  • You can use the Position page to create a subscript in case you are not satisfied with the default one or even a sub-subscript which may be useful for certain scientific publications. In the same page, you can create rotated, condensed, or expanded text.
Documentation note.png When rotating a group of characters, you also need to specify whether the rotated text should fit in the line or ,if instead, it is allowed to expand above and below the line. This property only becomes active for character styles.
  • Finish creating a character style by assigning a background, if so desired. Applying a background to a character style yields the same effect as using the highlighting tool on the standard toolbar.

Migrating to character styles

For people accustomed to formatting text manually, character styles can take some getting used to. Here are some suggestions for making the transition easier:

  • Never mix character styles and manual formatting. Manual formatting supersedes character styles. If you combine them, you may end up wasting hours in frustration trying to figure out why your character styles don’t work.
  • Right-clicking and choosing Default Formatting removes any text formatting (both manual and character styles).
  • Realize that clicking the Bold icon in the toolbar is not easier than double-clicking on a character style that is preset for bolding the font typeface.
  • Leave the Styles and Formatting window open to make character styles easy to access.


Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools