OOo Off the Wall: Building Characters
Character styles are a set of formatting options applied to selected text. They are a basic tool in most word processors, and OpenOffice.org's use of character styles is more or less typical. If you have used character styles in other word processors, then you probably can grasp the basics of using them in OpenOffice.org with few difficulties.
If you are a newcomer to styles, imagine that you decide to put the title of a book in italics. You could enter an override by selecting the italics icon on the Function bar. However, you can work more efficiently if you create a character style for italics or book titles, and apply the style instead. That way, if you decide that all the book titles in your document should use a bold regular weight instead of italics, you can update them simultaneously by modifying the style.
As with other word processors' character styles, OpenOffice.org's work closely with paragraph styles. That is, the basic font of a character style usually is chosen to match or contrast with a particular paragraph style's font. Often, too, the character style differs from the paragraph style only in the font effect, position or background it uses. In fact, you can think of character styles as a style-based override of a paragraph. But no matter how you think about them, character and paragraph styles are a matched pair, by far the most widely used styles in OpenOffice.org.
What is less obvious and more unusual is that many character styles play important roles in the automatic functions of OpenOffice.org Writer, as well as in the export to other formats. Without these character styles working in the background, much of the convenience of Writer would be lost.
How do character styles work in Writer? How can you get the most out of them? When you know the answers to these questions, you'll start to understand the power of using styles to format your work.
Character styles in OpenOffice.org have several characteristics that you should be aware of when using them:
Character styles do not have a Next Style field on the Organizer tab. Character styles generally are applied to selected text in paragraphs otherwise formatted with a paragraph style. Under this circumstance, specifying the next style makes no sense.
Unlike paragraph styles, character styles have a limited number of views available from the drop-down list in the stylist: All, Applied Styles, Custom and Hierarchical.
Character styles in OpenOffice.org are not cumulative, as they are in some word processors. In other words, you cannot apply the Emphasis character style followed by the Internet Link character style to get a format that combines the features of both. If you try, all you do is change the format of the selected text from Emphasis to Internet Link. Instead, you need to create a third character style that combines the characters of both. The quickest way to do this would be to create a new character style based on one of the styles and then modify it to use the features you want from the second style.
Every now and then, people on the OpenOffice.org users' list asks why so many styles are pre-defined. They would rather define their own styles, they say, and grow peevish when they find that they can't delete the pre-defined ones. However, set the Stylist to the All View and select the Character Style button, and you'll soon understand why the pre-defined styles exist and are undeletable.
To start with, many character styles are used automatically by OpenOffice.org, even though you might not be aware of the fact. For example, the Bullet style is used for unordered lists and the Numbering Symbol style for ordered lists. Similarly, Line Number is used whenever you select Tools -> Line Numbering, and Page Number is used when you select Insert -> Fields > Page Number. And, when URL Recognition is chosen from Tools -> AutoCorrect/AutoFormat -> Options, Writer automatically uses the Internet and Visited Internet Link character styles when appropriate. You don't need much reflection to realize that if such character styles were deletable, an anal-retentive user could cripple Writer in the name of tidiness.
Less obviously, many pre-defined character styles also are mapped to HTML, XHTML and/or XML tags. For example, the Emphasis character style maps to the em tag and the Strong Emphasis style to the strong tag. Other tags mapped to markup languages include Definition (dfn), Example (sample), Quotation (cite) and Source Text (code). You could export to a markup language without these styles, but the code would be dependent on a style sheet and considerably less clean.
Customizing the pre-defined styles, of course, is another matter. Because they are used automatically, you can format them and forget about them. What if you prefer not to look at them at all? Make your own character styles, and select the Custom Styles view in the Stylist. The predefined styles continue to be applied in the background and are updated by any changes made to your default paragraph fonts.
-- Bruce Byfield (nanday)
|diff -u: What's New in Kernel Development||Sep 04, 2015|
|Android Candy: Copay—the Next-Generation Bitcoin Wallet||Sep 03, 2015|
|The True Internet of Things||Sep 02, 2015|
|September 2015 Issue of Linux Journal: HOW-TOs||Sep 01, 2015|
|September 2015 Video Preview||Sep 01, 2015|
|Using tshark to Watch and Inspect Network Traffic||Aug 31, 2015|
- diff -u: What's New in Kernel Development
- Using tshark to Watch and Inspect Network Traffic
- Problems with Ubuntu's Software Center and How Canonical Plans to Fix Them
- The True Internet of Things
- Android Candy: Copay—the Next-Generation Bitcoin Wallet
- September 2015 Issue of Linux Journal: HOW-TOs
- Firefox Security Exploit Targets Linux Users and Web Developers
- Concerning Containers' Connections: on Docker Networking
- Where's That Pesky Hidden Word?
- A Project to Guarantee Better Security for Open-Source Projects