The traditional way of formatting office documents is direct formatting. That means, you use a button, such as Bold, which sets a certain property (in this case, a bold typeface). With styles, you can bundle a set of properties (for example, font size and font weight) and give them a speaking name, such as Headline, first level. Using styles, rather than direct formatting has the following advantages:
Gives your pages, paragraphs, texts, and lists a consistent look.
Makes it easy to consistently change formatting later.
Allows reuse and import of styles from another document.
Change one style and its properties are passed on to its descendants.
Example 10.1: Use of Styles
Imagine that you emphasize text by selecting it and clicking the button Bold. Later, you decide you want the emphasized text to be italicized. Now, without styles, you need to find all bold text and manually change it to italics.
If you had used a character style from the beginning, however, you would only need to change the style from bold to italics once. All text formatted with a style changes its appearance as the style is changed.
LibreOffice can use styles for applying consistent formatting to various elements in a document. The following types of styles are available in Writer:
Table 10.1: Types of Styles
|
Type of Style |
Function |
|
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 marginal notes, you can create frames with specified borders, location, and other formatting, so that all of your marginal notes have a consistent appearance. Frames are also used for captioning images: A frame can keep the caption and the image together. Here, you can use frame style to make sure that all your images have the same size and background color, for example. |
|
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. |
Direct formatting overrides any styles you have applied. For example, format a piece of text both with a character style and using the button Bold. Now, the text will be bold, no matter what is set in the style.
To remove all direct formatting, first select the appropriate text, then right-click it and choose Clear Direct Formatting.
Likewise, if you manually format paragraphs using Format › Paragraph, you can 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.