Using character styles
Introducing character styles
Character styles are a complement to paragraph styles. Like paragraph styles, they define text properties (font, weight, size), but they are applied to blocks of text smaller than a paragraph. For example, you can use the Emphasis character style to emphasize a word. A couple of character styles used in this document include:
- Keystrokes use the custom OOoKeyStroke style. For example, “to set OOo 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".
Why use character styles?
Beginning OOo users often wonder, "Why use character styles?" or "How is this different from pressing 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.
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.
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.
Applying character styles
Open the Styles and Formatting window (press F11) and click the second button in the top bar. The list of available character styles is displayed. To apply a character style, follow these steps:
- Select the block of text where you wish to apply the style.
- Double-click the appropriate character style in the Styles and Formatting window.
Some examples include:
- This example uses the OOo-supplied Strong Emphasis character style.
- Definition: A statement describing the meaning of a word or phrase.
Note: One difference between character styles and paragraph styles is the need for selecting text (highlighting). Character styles require you to select the text you want to apply them to; paragraph styles do not.
Unset/undo character styles
Sometimes, you will want to remove the formatting from a block of text. You must resist the temptation to do this manually. This will only cause trouble down the road. There are two easy ways to remove character formatting:
- Select the block of text, right-click and choose Default Formatting.
- If you have the Styles and Formatting window open, select the block of text and double-click the Default character style.
Note: The first method also works for removing manual formatting.
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).