0% found this document useful (0 votes)
11 views33 pages

WG3606 IntroductionToStyles

Uploaded by

rajc39525
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views33 pages

WG3606 IntroductionToStyles

Uploaded by

rajc39525
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 33

Writer Guide

Chapter 6
Introduction to Styles
Paragraph, Page, Character, and List Styles
Copyright
This document is Copyright © 2010-2013 by its contributors as listed below. You may distribute it
and/or modify it under the terms of either the GNU General Public License
(http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution
License (http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.
All trademarks within this guide belong to their legitimate owners.

Contributors
Ron Faile Jr.
Jean Hollis Weber
John A Smith

Feedback
Please direct any comments or suggestions about this document to:
[email protected]

Acknowledgments
This chapter is revised and updated from Chapter 6 of the OpenOffice.org 3.3 Writer Guide. The
contributors to that chapter are:
Agnes Belzunce Gary Schnabl
Daniel Carrera Janet Swisher
Peter Hillier-Brook Jean Hollis Weber
Peter Kupfer Michele Zarri

Publication date and software version


Published 16 January 2013. Based on LibreOffice 3.6.4.

Note for Mac users


Some keystrokes and menu items are different on a Mac from those used in Windows and Linux.
The table below gives some common substitutions for the instructions in this chapter. For a more
detailed list, see the application Help.

Windows or Linux Mac equivalent Effect


Tools > Options menu LibreOffice > Preferences Access setup options
selection
Right-click Control+click Open context menu
Ctrl (Control) z (Command) Used with other keys
F5 Shift+z+F5 Open the Navigator
F11 z+T Open Styles & Formatting window

Documentation for LibreOffice is available at http://www.libreoffice.org/get-help/documentation


Contents
Copyright............................................................................................................................ 2
Contributors...................................................................................................................................2
Feedback.......................................................................................................................................2
Acknowledgments..........................................................................................................................2
Publication date and software version...........................................................................................2
Note for Mac users............................................................................................................. 2
What are styles?.................................................................................................................5
Why use styles?.............................................................................................................................5
Style categories.............................................................................................................................5
The Styles and Formatting window..................................................................................6
Style selection basics....................................................................................................................6
Using Fill Format mode..................................................................................................................6
Using New Style from Selection, Update Style, and Load Styles..................................................7
New Style from Selection..........................................................................................................7
Update Style (from a selection).................................................................................................8
Load Styles (from a template or document)..............................................................................8
Using the visible styles filters.........................................................................................................9
Drag-and-drop a selection to create a style.................................................................................10
Applying styles.................................................................................................................10
Applying paragraph styles...........................................................................................................10
Using the Apply Style list.........................................................................................................10
Using the Format Paintbrush...................................................................................................11
Example: Applying a paragraph style......................................................................................12
Applying character styles.............................................................................................................13
Using the Styles and Formatting window................................................................................14
Using the Format Paintbrush..................................................................................................14
Unset/undo character styles...................................................................................................14
Applying frame styles...................................................................................................................15
Applying page styles....................................................................................................................15
Example: Chapters..................................................................................................................16
Example: Page with special formatting...................................................................................17
Applying list styles.......................................................................................................................17
Restarting or continuing the numbering..................................................................................18
Modifying styles............................................................................................................... 18
Changing a style using the Style dialog box................................................................................19
Examples: Modifying paragraph styles........................................................................................20
Center Heading 1....................................................................................................................20
Indent Heading 3.....................................................................................................................21
Using AutoUpdate........................................................................................................................22
Creating custom paragraph styles: examples...............................................................22
Creating the Poem paragraph style.............................................................................................23
Creating the PoemHeading style.................................................................................................24
Sample poem...............................................................................................................................24
Changing the formatting of your styles........................................................................................25

Introduction to Styles 3
Indent Poem............................................................................................................................25
Final result...................................................................................................................................25
Copying and moving styles.............................................................................................25
Using the Template Management dialog box...............................................................................26
Deleting styles.................................................................................................................. 27
Assigning styles to shortcut keys..................................................................................27
Defining a hierarchy of headings....................................................................................28
Choosing paragraph styles for outline levels...............................................................................28
Assigning outline levels to other styles........................................................................................29
Setting up heading numbering.....................................................................................................29
Setting up the indentation of headings........................................................................................31
Positioning in new LibreOffice documents..............................................................................32

4 Introduction to Styles
What are styles?
Most people are used to writing documents according to physical attributes. For example, you
might specify the font family, font size, and weight (for example: Helvetica 12pt, bold).
Styles are logical attributes. We use styles every day. For example, there are two styles of
personal computer: desktop and laptop. Each has its own distinctive set of properties. You never
say “my computer is a low-weight, one-piece unit with an LCD screen attached to a rectangular
casing containing the computing components and the keyboard”. Instead, you could say that you
have a laptop.
LibreOffice styles are a way to do the same thing for your document. Using styles means that you
could stop saying “font size 14pt, Times New Roman, bold, centered” and start saying “title” for
describing that particular font usage. In other words, styles mean that you shift the emphasis from
what the text looks like to what the text is.

Why use styles?


Styles help improve consistency in a document. They also make major formatting changes easy.
For example, you might decide to change the indentation of all paragraphs or change the font of all
titles. For a long document, this simple task could be prohibitive. Styles make the task easy.

The time is 9:50 AM, and Jane is finishing the 30-page paper for school that is due at
10:00 AM. She looks over the assignment one more time, and suddenly she realizes that:
• The text must use Arial font instead of Times New Roman.
• The headings must be dark blue and indented.
• The title must appear at the top-right of every page except the first.
• Even-numbered pages must have a wider right margin, and odd-numbered pages
must have a wider left margin.
Thankfully, Jane used LibreOffice Writer and styles. She makes all the changes in only
two minutes and hands in the paper on time.

Style categories
LibreOffice Writer has five style categories:
• Paragraph styles affect entire paragraphs represented with those styles.
• Character styles affect a block of text inside a paragraph.
• Page styles affect page formatting (page size, margin, and the like).
• Frame styles affect frames and graphics.
• List styles affect outlines, numbered lists, and bulleted lists.
In the same way that characters are the building blocks for creating words, paragraphs are the
building blocks of every document. Headings (subheads) are paragraphs; headers, footers, and
numbered lists are also paragraphs. Paragraph styles are, therefore, the most frequently used
styles and are the ones treated in more detail in this and the next chapter.

What are styles? 5


The Styles and Formatting window
Styles are available through a floating or dockable window called Styles and Formatting, shown in
Figure 1. This window is at the center of styles management. Do not worry if, at first, some
contents of this section seem obscure while progressing through this or the next chapter. This
guide describes how to use all these functions.

Figure 1: The Styles and Formatting window for Writer, showing paragraph styles

To open the Styles and Formatting window, do any one of the following:

• Click on the icon located at the left-hand end of the Formatting toolbar.
• Select Format > Styles and Formatting.
• Press F11.

You can move the Styles and Formatting window to a convenient position on the
Tip screen or dock it to an edge.

Style selection basics


The first five icons at the top of the Styles and Formatting window select the category of styles to
work on. Click on one of these icons to display a list of styles in that category, such as paragraph
or character styles.
To apply a character style to existing text, select the text and then double-click on the name of the
style in the Character Styles list. To apply any other style, put the cursor in the paragraph, frame, or
page you want to modify and double-click on the name of the style in the corresponding section.
You can select more than one paragraph or frame and apply the same style to all of them at the
same time.

Using Fill Format mode


The sixth icon at the top of the Styles and Formatting window activates the Fill Format mode. You
can use Fill Format to apply a style to many different areas quickly without having to go back to the
Styles and Formatting window and double-click every time. This method is useful for formatting
many scattered paragraphs, words, or other items with the same style, and it may be easier to use
than making multiple selections first and then applying a style to all of them.

6 Introduction to Styles
1) Open the Styles and Formatting window (Figure 1) and select a style.

2) Click the Fill Format Mode icon .


3) To apply a paragraph, page, or frame style, hover the mouse over the paragraph, page, or
frame and click. To apply a character style, hold down the mouse button while selecting the
characters. Clicking on a word applies the character style for that word.
4) Repeat step 3 until you have made all the changes for that style.
5) To quit the Fill Format mode, click the icon again or press the Esc key.

Caution When this mode is active, a right-click anywhere in the document undoes the last
Fill Format action. Be careful not to accidentally right-click and mistakenly undo
actions you want to keep.

Using New Style from Selection, Update Style, and Load Styles
The last button in the toolbar of the Styles and Formatting window is a multipurpose button that
gives access to three functions: New Style from Selection, Update Style, and Load Styles.

New Style from Selection


Use the first function of the multipurpose button to 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 remember all the formatting settings you
want, as is necessary when creating a new style with the Style dialog box. In addition, unlike when
setting the formatting parameters in dialog box pages, which you will learn to do later, you can
immediately see how the objects will look when formatted with the style you are creating.
Follow these steps to create a new style from a selection:
1) Change the formatting of the object (paragraph, frame, etc.) to your liking.
2) 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) Go back to the Styles and Formatting window and click the New Style from Selection
icon.
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.

Figure 2: Dialog to name a new style from selection

The Styles and Formatting window 7


Update Style (from a selection)
Let’s use paragraph styles as an example.
1) Create a new paragraph (or select an existing paragraph) and edit all the properties you
want to alter in the style (such as indentation, font properties, alignment, and others).

Caution Make sure that there are unique properties in this paragraph. For example, if there
are two different font sizes in the paragraph selected to update the style, that
particular property will not be updated.

2) Select the paragraph by clicking anywhere in the paragraph.


3) In the Styles and Formatting window, select the style you want to update (single-click, not
double-click) and then click on the New Style from Selection icon and select Update
Style.

Figure 3: Updating a style from a selection

The procedure to update another type of style (character, page, or frame styles) is the same: select
the item in question, modify it, select the style you want to update, and choose Update Style.

Load Styles (from a template or document)


The last option under the New Style from Selection icon is used to copy styles into the current
document by loading them from a template or another document. Using this method, you can copy
all styles, or groups of styles, at one time.
1) Open the document to copy styles into.
2) In the Styles and Formatting window, click on the New Style from Selection icon and then
on Load Styles (see Figure 3).
3) In the Load Styles dialog box (Figure 4), find and select the template to copy styles from.
Click on the From File button if the styles you want are contained in a text document rather
than a template. In this case, a standard file selection dialog box opens up, where you can
select the desired document.
4) Select the options for the types of styles to be copied: Text (Paragraph and Character
styles), Frame, Pages, Numbering (List styles). If you select Overwrite, the styles being
copied will replace any styles of the same names in the target document.
5) Click OK to copy the styles.

8 Introduction to Styles
Figure 4: Loading styles from a template

Using the visible styles filters


At the bottom of the Styles and Formatting window (Figure 5), use the drop-down menu to select a
filtering criterion for the contents of the main body of the window. Normally, you will find that only a
handful of styles are needed in any given document, and it makes sense to have only these styles
shown.
So, at the beginning of the writing process, you may want to have access to all the available styles
(by selecting All Styles). However, as the document develops, it is useful to reduce the size of the
list displayed to only the styles already in use (by selecting Applied Styles). If you work on a
document where you want to apply special-purpose styles only (such as those styles used in
writing this user guide), select instead Custom Styles. The Hierarchical Styles view is most
useful when modifying styles as it reveals which styles are linked together. This topic is discussed
in more detail in Chapter 7, Working with Styles.

Figure 5: Styles and Formatting filter

If you select the Paragraph Styles view in the Styles and Formatting window, the drop-down menu
contains many more filtering options so you can view, for example, only Text Styles, Special
Styles, and so on.

The Styles and Formatting window 9


Drag-and-drop a selection to create a style
Another way to create a new style is to drag-and-drop a text selection into the Styles and
Formatting window.
1) Open the Styles and Formatting window.
2) Select the style category you are going to create (for example a character style) using one
of the five icons in the top left part of the window.
3) Select the object you want to base the style on and drag it to the Styles and Formatting
window. The cursor changes to indicate whether the operation is possible or not.
4) In the Create Style dialog box (Figure 2), type a name for the new style and click OK to
save the style.

Note You cannot use the drag-and-drop method to create a custom page style.

Applying styles
Styles can be applied easily by means of the Styles and Formatting window. However, alternative
ways exist to apply certain styles, as explained in this section.

Applying paragraph styles


When drafting a document, the most used style is the paragraph style. LibreOffice offers two quick
alternatives to the Styles and Formatting window to apply this category of style: the Apply Style list
and the Format Paintbrush icon.

Using the Apply Style list


When a paragraph style is in use in a document, the style name appears on the Apply Style list
near the left end of the formatting bar, to the right of the Styles and Formatting icon. You can select
styles from this menu, just as you can from the Styles and Formatting window.

Figure 6: Apply Style list

To apply a style from this menu, place the cursor in the paragraph to change, click on the desired
style or use the up or down arrow keys to move through the list, then press Enter to apply the
highlighted style.

Tip Select More at the bottom of the list to open the Styles and Formatting window.

10 Introduction to Styles
Using the Format Paintbrush
You can use the Format Paintbrush to apply a certain paragraph style to another paragraph or to a
group of paragraphs. Start by placing the cursor inside the paragraph you want to copy. Table 1
shows the formatting copied as a result of a particular cursor position. Table 2 shows the formatting
painted as a result of the format copied and the cursor position when painting. Cases A, B, and C
refer to the example shown in Figure 7.

Table 1: Cursor positioning


Case Type of selection Action
A No selection. Cursor in the Copies the formatting of the paragraph and the
space between two words. character formatting of the next character in the
text flow direction.
B No selection, cursor in any As above.
word.
C Text selected. Copies the formatting of the last selected
character and the paragraph.

Table 2: Format Paintbrush click position


Case Paint position Result
selection
A, or B, or C In a space between words. Paragraph formatting only.
A In a word or selection. As above.
B, or C In a word or a selection. Paragraph formatting applied.
Word or selection formatted with character
format from original paragraph.

Now do one of the following:


1) To format a single paragraph:

a) Click the Format Paintbrush icon in the standard toolbar.

b) The cursor changes into an ink bottle . Now click the paragraph (see Table 2) to
which you want to apply the copied style.
If you press Shift+Ctrl while clicking, you exclude any character formatting wherever
you select to click.
c) The paragraph is formatted and the cursor then returns to normal
2) To format more than one paragraph:
a) Double-click the Format Paintbrush icon.
b) The cursor changes shape. Now click each of the paragraphs (see Table 2) to which
you want to apply the copied style.
If you press Shift+Ctrl while clicking, you exclude any character formatting wherever
you select to click.
c) The paragraphs are formatted. Click the Format Paintbrush icon once more.
d) The cursor then returns to normal.

Applying styles 11
Figure 7: Showing the results of Table 1 and Table 2 on the unformatted paragraph

Example: Applying a paragraph style


Let's see the three methods described above in action with an example.
To use the Styles and Formatting method:
1) Create a new document (choose File > New > Text Document or press Control+N).
2) Type the words Heading 1 in the new document, but do not press Enter so that the cursor
remains in that same line where you typed.

3) Click the Styles and Formatting icon located on the Formatting Bar or press the F11
key. This opens the Styles and Formatting window.
4) Make sure the window is showing the Paragraph Styles section: click on the top-left icon

of the Styles and Formatting window.

Figure 8: Click on the Styles and Formatting icon to bring up the window

12 Introduction to Styles
Double-click the Heading 1 entry of Styles and Formatting (Figure 9). This does two things:
• Gives the line (actually, its entire paragraph) you typed the Heading 1 style.
• Adds Heading 1 to the Apply Style menu.

Figure 9: Applying paragraph styles


To use the Apply Styles list (Figure 9):
1) Repeat steps 1 and 2 from the previous example.
2) Select Heading 1 in the Apply Styles list.
The text acquires the properties of the Heading 1 style. If the paragraph style you want is not in the
Apply Style list, select More to bring up the Styles and Formatting window. If the Styles and
Formatting window is still open, you may notice that the Heading 1 style is also highlighted in the
main window, as shown in Figure 9.
Finally, try the Format Paintbrush.
Recreate the text in Figure 9 and add extra formatting to some of the text; bold and italic was used

in the example. Place the cursor at a point in the text and click the Format Paintbrush icon to
activate it. The cursor changes shape. Move the cursor to one of the new paragraphs and left-click
to apply formatting. Try the different selection points and the different paint points to see the
effects. To apply the formatting to multiple paragraphs, double-click the Format Paintbrush icon
before clicking at a paint point. Clicking back on the icon cancels the format painting.
The cursor shape changes back to the normal one on completion.

Applying character styles


You may have a document that contains character formatting applied directly using the Formatting
toolbar or shortcut keys, and you decide to replace this with character styles formatting. The direct
formatting should be removed before applying new character styles.
To remove the formatting manually, select the characters or words to be altered:
• Select Format > Clear Direct Formatting
• Alternatively, press Ctrl+M.
You can now proceed to apply character styles.

Applying styles 13
Select all the formatting of one type at a time. Manually removing this formatting
leaves the text elements selected so you can then apply the new character style
immediately.
For example, to remove a number of manually italicized elements:
1) Select each instance (press Ctrl when selecting each subsequent element).
Tip
2) Use one of the methods above to remove the formatting (the text remains
selected after removal).
3) In this example, pressing Ctrl+I will also toggle off italics.
4) Apply the character style (for example, Emphasis).
Repeat for each formatted style you wish to replace.

Using the Styles and Formatting window


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:
1) Select the block of text, or put the cursor into the single word, where you wish to apply the
style.
2) Double-click the appropriate character style in the Styles and Formatting window.
Some character styles supplied in LibreOffice include:

Emphasis character style.


Strong Emphasis character style.
Teletype character style.

One difference between character styles and paragraph styles is the need for
selecting text (highlighting). To apply a character style to more than a single word,
Note you need to select all of the text to be changed. To apply the style to a single word,
you only have to place the cursor in the word. Paragraph styles are applied to the
whole of the paragraph in which the cursor is placed.

Using the Format Paintbrush


The Format Paintbrush can be used to apply character styles in much the same way as for
paragraphs (see “Using the Format Paintbrush” on page 11).
The difference is that you must select a word that has the required formatting, and that to paint
only the character style, without the underlying paragraph style, you must hold down the Ctrl key
when applying the style.

Unset/undo character styles


Sometimes, you will want to remove the character style formatting from a block of text. You must
resist the temptation to do this manually using the Formatting toolbar. This will only cause trouble
down the road. To remove character style formatting from selected text:
• Open the Styles and Formatting window (press F11) and click the second button in the top
bar.
• With the Styles and Formatting window open, double-click the Default character style.

14 Introduction to Styles
Applying frame styles
Whenever you insert an object (such as a graphic) into a document, it will automatically have an
invisible frame around it. Some designers like to add frame styles to introduce variety. For
example, you could have one frame style for photographs and a different frame style for other
graphics such as line drawings. The one for photographs might have a border with a drop shadow,
while the one for drawings might have only a border.
To apply a style to a frame:
1) Select the frame.
2) Bring up the Styles and Formatting window (for example, by pressing F11).
3) Click the Frame Styles icon (the third one from the left).
4) Double-click the frame style you want.
Having applied a style to a frame, you can now modify the frame to be just how you want it. Most of
a frame’s design can be set in a style, but the following options must be set manually:
• Anchoring: how the frame is positioned in relation to the rest of the page’s contents
(Format > Anchor).
• Arrangement: the frame’s position in a stack of objects (Format > Arrange).
• Adding a hyperlink: so that a click on the frame opens a Web page or another document in
an HTML file (Insert > Hyperlink).
When a frame is selected, the Frame toolbar replaces the Formatting toolbar, allowing you to
modify the settings. The right-click (context) menu also has items for anchoring and arrangement,
as well as for wrap and alignment.

Applying page styles


To apply a page style, place the cursor anywhere on the page to which the style should be applied.
You can easily check which page style is applied because it is shown on the status bar.

Figure 10: The current page style is displayed on the status bar
If you want to apply a different style, you can either right-click on the style in the status bar and
select a new style from the pop-up menu, or you can open the Styles and Formatting window
(press F11), select the page style icon at the top of the window (fourth icon), and then double-click
on the desired style.

Caution
Changing a page style may cause the style of subsequent pages to change as
well. The results may not be what you want. To change the style of only one page,
you may need to insert a manual page break, as described below.

As discussed in Chapter 7, Working with Styles, a correctly set up page style will, in most cases,
contain information on what the page style of the next page should be. For example, when you
apply a Left page style to a page, you can indicate in the style settings that the next page has to
apply a Right page style, a First page style could be followed by either a Left page style or a
Default page style, and so on.

Applying styles 15
Another very useful mechanism to change the page style is to insert a manual page break and
specify the style of the subsequent page. The idea is simple: you break a sequence of page styles
and start a new sequence. To insert a page break, choose Insert > Manual Break and choose
Page break. This section illustrates two common scenarios where page breaks are useful.

Example: Chapters
A possible scenario: You are writing a book that is divided into chapters. Each chapter starts with a
page style called New Chapter. The following pages use the Default page style. At the end of each
(except the last) chapter, we return to the New Chapter page style for the first page of the next
chapter.
Figure 11 illustrates the flow of page styles when using page breaks.

Figure 11: Page style flow using a page break

Writer doesn’t have a predefined New Chapter page style, so you must create a custom style (see
Chapter 7). (You could also use the First Page style for this purpose, but in our examples we use
that style for the title page of the book.) Let’s suppose that you already have the page styles with
the following properties:

Page style Next Style


New Chapter Default
Default Default

At some point, you will want to start a new chapter. Follow these steps:
1) Put the cursor at the end of the chapter, on a blank line (empty paragraph) of its own.
2) Choose Insert > Manual Break. The Insert Break dialog box (Figure 12) appears.
3) Under Type, choose Page break and under Style, select New Chapter.

Figure 12: Choose Page break and select the


New Chapter page style

16 Introduction to Styles
Example: Page with special formatting
Sometimes you may need to insert a page with special formatting, for example a landscape page
or a page with more columns. This can also be done with page breaks. Suppose that the current
page has the Default page style.
1) Choose Insert > Manual Break.
2) Select the desired page style (say, Special Page) in the Insert Break dialog box.
3) Fill in the contents for this page. Then insert another page break.
4) Then select Default again. The pagination continues on as normal, except that one page
has been replaced by a different page style.
This concept is illustrated in Figure 13.

Figure 13: Inserting a page with special formatting

Applying list styles


List styles define properties such as indentation, numbering style (for example, 1,2,3; a,b,c; or
bullets), and punctuation after the number, but they do not by themselves define properties such as
font, borders, text flow, and so on. The latter are properties of paragraph styles.
If you need your list to have specific paragraph-style properties, you should embed the list style
into paragraph styles, as explained in Chapter 7. You can then create a numbered list by applying
paragraph styles alone.
Writer has two series of predefined list styles, named List and Numbering. Each series contains
five list styles, intended for the different levels of a nested list. As with any style, you can redefine
the properties of these styles, for example the numbering or bullet symbol and the indentation. You
can also define other list styles in these series or create your own series.
Each of the list styles predefined in Writer has four associated paragraph styles. For example, the
Numbering 1 list style is associated with four paragraph styles:
• Numbering 1
• Numbering 1 Cont.
• Numbering 1 End
• Numbering 1 Start
Numbering 1 is a default paragraph style to which you can attach a list style. If you want to make
exclusive use of paragraph styles and never use the Formatting toolbar when creating a numbered
list, you could use the other three styles. All you need to do is to create a suitable list style and set
up the Next Style property in the Organizer page of the Paragraph Style dialog box so that the
Numbering 1 Start paragraph is followed by the Numbering 1 Cont. style, while the Numbering 1
End paragraph style is followed by a default style paragraph.
If you only want to apply a list style (that is, the numbering or bullet symbol and the indentation)
then, when the cursor is on the paragraph, double-click on the desired list style.
When creating a list style, you can define up to ten levels of depth for nested lists. Switch from one

level to the other with either the Promote One Level or the Demote One Level buttons

Applying styles 17
on the Bullets and Numbering toolbar or by pressing the Tab key (one level down) or Shift+Tab key
combination (one level up) or by right-clicking on the list element and select Up One Level or
Down One Level from the context menu.

Restarting or continuing the numbering


When creating more than one numbered list of the same type within the same chapter, Writer
applies sequential numbering to all the lists. Sometimes this is what you want (for example, when
placing illustrations between the numbered paragraphs), while at other times you want to restart
the numbering.
To restart numbering from 1, you can do any of the following:

• Click on the Restart numbering icon on the Bullets and Numbering toolbar.
• Right-click on the first element of the list and choose Restart numbering from the context
menu.
• Right-click on the first element of the list, choose Paragraph from the context menu, and
go to the Outline & Numbering tab of the Paragraph dialog box. In the Numbering section,
select the options Restart at this paragraph and Start with, and set the number (see
Figure 14).

Figure 14: Restarting numbering

If you find that the numbering does not restart as intended using the first or second method, or if
you want to restart from a number greater than 1, use the third method.
When editing a document, you may want to change from restarting numbering to continuing the
numbering from a previous list. To do so, right-click on the list element and choose Continue
previous numbering from the context menu.

Modifying styles
Writer provides several predefined styles, but you may find that they do not fit your preferences.
You can build your own library of custom styles to use in place of the predefined ones, or you can
modify the existing styles. LibreOffice offers four mechanisms to modify both both predefined and
custom (user-created) styles:
• Update a style from a selection.
• Load or copy styles from another document or template.
• Change a style using the Style dialog box.
• Use AutoUpdate (paragraph and frame styles only).

18 Introduction to Styles
The first two methods are discussed in “Update Style (from a selection)” on page 8 and “Load
Styles (from a template or document)” on page 8, while Chapter 7, Working with Styles, discusses
at length the process of creating a new style.
This section shows how you can quickly make simple modifications to existing paragraph styles
using the same tools you would use for applying formatting manually.

Any changes made to a style are effective only in the current document. If you
want to reuse modified or new styles in other documents, you need to either save
Tip the styles in a template (see Chapter 10, Working with Templates) or copy the
styles into the other documents, as described in “Copying and moving styles” on
page 25.

Changing a style using the Style dialog box


To change an existing style using the Style dialog box, right-click on the style in the Styles and
Formatting window and select Modify from the pop-up menu.
The dialog box displayed depends on the type of style selected. Figure 15 shows an example of
the dialog box for a paragraph style. Each style’s dialog box has several tabs. The various
properties on these dialog boxes are described in the next chapter.
Move to the page where the setting you want to modify is specified and input the new value. You
can click the Help button at any time to bring up the online help where all the options of the current
page are briefly described. When you are done, click OK to close the dialog box.

Figure 15: Example of the Paragraph Style dialog box

Modifying styles 19
Examples: Modifying paragraph styles
For this example, we need five lines of text with three LibreOffice-supplied paragraph styles:
Heading 1, Heading 2, and Heading 3. These paragraph styles could be used in formatting
headings (subheads) in the framework for a document that will be “fleshed out” afterwards.
Open a new text document for this exercise and type Title on the first line, click the Paragraph
Styles icon on the Styles and Formatting window, and double-click Heading 1 in the drop-down
list. Press Enter to start a new line and type First section heading, applying the Heading 2 style.
Repeat this procedure for the other headings shown in Figure 16, using the proper paragraph style
for each: Heading 3 for Subsection heading, and so on.

Figure 16: Headings 1–3 with default styles


Now, suppose you decide to make the following changes to these styles:
• Heading 1 should be centered.
• Heading 3 should be indented.

Center Heading 1
On the Styles and Formatting window, select the Paragraph Styles icon (if it isn’t already chosen),
right-click on Heading 1, and choose Modify.

Figure 17: Modifying a style

After the Paragraph Style window opens, choose the Alignment tab, select Center (as shown
below), and click OK.

20 Introduction to Styles
Figure 18: Center Heading 1

Now, every paragraph marked as Heading 1 will be centered (as shown below). If you make
another Heading 1 entry, it will be centered as well.

Figure 19: The text Title, which is formatted as a centered Heading 1 style

Indent Heading 3
On the Styles and Formatting window, right-click on the Heading 3 paragraph style and choose
Modify (as before). After the Paragraph Style dialog box opens, follow the steps below:
1) Click the Indents & Spacing tab.
2) Under the Indent section, set the indentation before the text to 0.60", as shown below.
Your display might be different, depending upon what measurement unit was set in the
options (Tools > LibreOffice Writer > General > Settings).

Figure 20: Set indentation

Modifying styles 21
The result should resemble the illustration below.

Figure 21: The text formatted as Heading 3 style is now indented

Using AutoUpdate
On the Organizer page of the Paragraph Style dialog box is a check box named AutoUpdate. It is
present only for paragraph and frame styles. If this check box is selected, then LibreOffice will
apply to the style itself any modification made manually to a paragraph formatted with that style.

Caution If you are in the habit of manually overriding styles in your document, be sure that
AutoUpdate is not enabled, or you will suddenly find whole sections of your
document reformatting unexpectedly.

Figure 22: The Organizer page of the Paragraph Style dialog box

Creating custom paragraph styles: examples


You have seen that the Styles and Formatting window provides several predefined styles, such as
Heading 1 and Text body. But what if you need something different, like a poem style, that is not in
Styles and Formatting? With Writer you can make your own styles to suit your needs.
Chapter 7, Working with Styles, describes in detail the options on the various pages of the
Paragraph Style dialog box. This section provides an example of a typical use of custom paragraph
styles.
We will create a Poem paragraph style and a Poem Header paragraph style, with the following
properties:
• Poem: Centered, with a font size of 10pt.
• PoemHeading: Centered, bold, with a 12pt font size.
In addition, a PoemHeading style is to be followed by a Poem style. In other words, when you
press Enter, the next paragraph style in the document changes to Poem.

22 Introduction to Styles
You may have noticed this behavior already. After you enter a heading using a
Note Heading paragraph style and press Enter, the next style switches to Text body.

Creating the Poem paragraph style


Our next example creates the Poem style. We will use the Default style as a starting point.

1) Click the Styles and Formatting icon or press F11.


2) Click the Paragraph Styles icon (first from the left).
3) Right-click Default and choose New.
The Paragraph Style dialog box opens, with the Organizer page selected. To create a custom
style, you have to understand and configure the top three entries.

Style fields Description


Name This is the name of the style itself, like Heading 1 or Text body.
Set (type in the text box) the name to Poem.
Next Style This is the style of a paragraph that follows the paragraph that is in Poem
style. When you press Enter while typing text in the Poem style, this style
is applied to the new paragraph.
Set this value to Poem. When you press Enter, the text of the new
paragraph will remain in the Poem style.
Linked with If the Poem style is linked with another style, say Default, then any change
in Default will affect Poem, just as you saw with Heading in the previous
section.
For our example, this is not the behavior we want. Set this entry to
– None –. This means that Poem is not linked with any other style.

Select the Custom Styles category for new styles. After making these changes, your dialog box
should look like Figure 26.

Figure 23: Initial configuration for the Poem style. Set the first three entries as shown.

The next step is to configure the alignment and font properties of this style.
• On the Alignment page, select the Center option.
• On the Font page, select the 12pt font size.
Click OK to save the new Poem style.

Creating custom paragraph styles: examples 23


Creating the PoemHeading style
Create a new PoemHeading style. Use the same procedure as before, using with these changes:
• Next Style: Select Poem, not PoemHeading.
• Linked with: Heading.
The dialog box should look like Figure 24.

Figure 24: Settings for the PoemHeading style

Now set the settings of the new style:


1) On the Alignment page, select Center.
2) On the Font page, choose Bold and size 14pt.
Click OK to save the new PoemHeading style.

Sample poem
It is a good idea to test out your new styles and see if you are happy with them. Typing a poem
using the styles we have just defined should produce the results in Figure 25.

Figure 25: Sample poem

24 Introduction to Styles
Changing the formatting of your styles
One of the main advantages of styles is that they allow the document formatting to be changed
after the content has been written. For example, suppose you have written a 100-page book of
poetry. Then you decide you don’t like the way the poems look after all. Or, perhaps, your publisher
doesn’t like it.
To learn about reconfiguring styles, we add an indentation to the Poem style instead of centering it.

Indent Poem
First, set the Poem style to left alignment:
1) In the Styles and Formatting window, select Poem and right-click and select Modify.
2) On the Alignment page, select Left.
Set the indentation:
1) Click the Indents & Spacing tab.
2) Under Indent, set the indentation before the text to 2in.
Done! Click OK, and you should see the text change.

Final result
After all these changes, the poem should look similar to Figure 26. Note in the figure that a third
style has been created for the author of the poem.

Figure 26: Final result, using three custom styles

Copying and moving styles


Styles are part of the document properties, therefore changes made to a style or new styles you
create are only available within the document they belong to. Styles always stay with a document.
So, for example, if you e-mail a document to another person, the styles go with it.
If you want to reuse modified or new styles in other documents, you need to either save the styles
in a template (see Chapter 10) or copy the styles into the document where you want to use them.

Copying and moving styles 25


You can copy or move styles from one template or document to another in two ways:
• Using the Template Management dialog box.
• Loading styles from a template or document (see page 8).

Using the Template Management dialog box


To copy or move styles using the Template Management dialog box:
1) Click File > Templates > Organize.
2) At the bottom of the Template Management dialog box, choose either Templates or
Documents, as needed. For example, if you are copying styles between two documents,
both entries should say Documents.

Figure 27: Choosing to copy styles from a document, not a template

3) To copy or move styles from a file not shown in the list, click the File button. Navigate to the
wanted file using the Open dialog box, select it and click Open. When you return to this
window, both lists show the selected file, as well as all the currently open documents.
4) Double-click on the name of the template or document and then double-click the Styles
icon to show the list of individual styles.
5) To copy a style, hold down the Control key and drag the name of the style from one list to
the other.
6) Repeat for each style you want to copy or move. When you are finished, click Close.

Caution If you do not hold down the Control key when dragging, the style will be moved
from one list to the other. The style will be deleted from the list you are dragging it
from.

26 Introduction to Styles
Figure 28: Copying a style from one document to another

Deleting styles
It is not possible to delete LibreOffice’s predefined styles from a document or template, even if they
are not in use. However, custom styles can be deleted.
To delete an unwanted style, right-click on it in the Styles and Formatting window and choose
Delete. If the style is in use, a message appears, warning you that the style is in use and asking
you to verify that you really want to delete the style.
If the style is not in use, a different message appears, asking you to verify that you really want to
delete the style.

Caution If you delete a style that is in use, all objects with that style will return to the style it
was based on (linked with) but retain some of the deleted style’s formatting as
manual formatting.

If an unwanted paragraph style is in use, you can use Find & Replace to replace it
Tip with a substitute style before deleting it. See Chapter 3, Working with Text, for
more information.

Assigning styles to shortcut keys


You can configure shortcut keys to quickly assign styles in your document. Some shortcuts are
predefined, such as Ctrl+1 for the Heading 1 paragraph style and Ctrl+2 for Heading 2. You can
modify these shortcuts and create your own. See Chapter 16, Customizing Writer, for details.

Assigning styles to shortcut keys 27


Defining a hierarchy of headings
Tools > Outline Numbering defines the hierarchy of headings in a document. Headings can be
numbered or not; typically the first-level headings in a book-length document are the next level of
headings after the chapter titles, which may be numbered, but lower-level headings are not
numbered. Some chapter title and heading styles (such as those commonly used in engineering
documents) number each chapter and heading level, for example 1, 1.1, 1.2, 2, 2.1, and so on.
When chapters or sections are added or deleted, the numbering is automatically changed.
Paragraph styles are the key to LibreOffice’s outline numbering feature. The default paragraph
styles assigned to outline levels are the heading styles supplied with LibreOffice: Heading 1,
Heading 2, and so on. However, you can substitute any styles you wish, including custom (user-
defined) styles.
The headings defined using the outline numbering feature can be used for more than the table of
contents (described in Chapter 12). For example, fields are commonly used to display headings in
headers and footers of pages (see Chapter 14, Working with Fields), and Writer can send the
outline to Impress to use as the basis for a presentation (see the Impress Guide for details).

Choosing paragraph styles for outline levels


If you are using the default heading styles for the headings in your outline, and you do not want to
use heading numbering, you do not need to do anything on the Outline Numbering dialog box. The
default outline numbering scheme uses the default heading styles (Heading 1, Heading 2, and so
on).
To use custom styles in place of one or more of the default heading styles:
1) Choose Tools > Outline Numbering to open the Outline Numbering dialog box.
2) Click the number in the Level box corresponding to the heading for which you want to
change the paragraph style.

Figure 29: Choosing paragraph styles for outline levels


3) In the Numbering: Paragraph Style section, choose from the drop-down list the paragraph
style you want to assign to that heading level. In this example, you might choose
My Heading 1 to replace Heading 1 and for Level 2, My Heading 2 to replace
Heading 2.
4) Repeat for each outline level that you want to change. Click OK when done.

28 Introduction to Styles
Assigning outline levels to other styles
In Writer, you can assign an outline level to any paragraph style. This feature enables you to create
a table of contents that includes those headings along with the headings using styles listed in the
Outline Numbering dialog box. For example, you might use a different sequence of styles for
annexes (appendixes), but you want the annex headings and subheadings to appear in the TOC at
the same levels as the chapter headings and subheadings.
To assign an outline level to a paragraph style, go to the Outline & Numbering page for the style,
and select the required outline level. Click OK to save this change.

Figure 30: Specifying an outline level for a paragraph style

Setting up heading numbering


If you want one or more heading levels to be numbered, many choices are available; this example
defines a scheme to create headings that look like those in the illustration below.

Figure 31: The numbering scheme to be set up

Defining a hierarchy of headings 29


Use the Numbering page of the Outline Numbering dialog box to define the numbering scheme
and its appearance. Figure 32 shows the default settings.

Figure 32: Default settings on the Outline Numbering dialog box

1) In the Level list, choose 1. In the Number list, choose 1, 2, 3, .... The result is shown in the
preview box on the right in Figure 33.

Figure 33: Specifying numbering of Level 1 headings

2) In the Level list, choose 2. In the Number list, choose 1, 2, 3, .... The Show sublevels list is
now active; it should show 2 (if not, choose 2). The result is shown in Figure 34.

Figure 34: Specifying numbering of Level 2 headings

30 Introduction to Styles
3) In the Level list, choose 3. In the Number list, choose 1, 2, 3, .... The Show sublevels list
should show 3 (if not, choose 3). The result is shown in Figure 35.

Figure 35: Specifying numbering of Level 3 headings

These choices produce the layout shown in Figure 36.

Figure 36: Results of numbering choices for headings

Setting up the indentation of headings


Whether or not the headings are numbered, you may want to change some of their formatting. For
example, you may want the second-level and third-level headings to be indented from the margin.
For numbered headings, you may also want the second line of long headings to line up with the
first word of the heading, not the number. For these changes, use the Position page of the Outline
Numbering dialog box.

The Position page for documents created in LibreOffice is slightly different from the
Position page for documents created in earlier versions of similar programs that
Note are opened in LibreOffice. This difference is provided for backwards compatibility.
For more information, refer to “Position page for older documents opened in
LibreOffice” (under “Creating a new list style”) in Chapter 7, Working with Styles.

Defining a hierarchy of headings 31


Positioning in new LibreOffice documents
Figure 37 shows the Position page as it appears for documents created in LibreOffice.

Figure 37: Setting up the position of level 1 headings


1) In the Level list on the left, choose 2. Change the values for Numbering followed by... at
and Aligned at, as shown in Figure 38. You may want to use a different value. This indents
the entire heading but does not affect the way long headings wrap around (see Figure 39).

Figure 38: Indenting Level 2 headings

Figure 39: Result of changes to indentation of Level 2 headings

2) To change the wrapping behavior of long headings, change Indent at to a larger value, as
shown in Figure 40. The result is shown in Figure 41.

32 Introduction to Styles
Figure 40: Wrapping long headings

Figure 41: Result of changing Indent at value

3) In the Level list, choose 3. Change the values for Numbering followed by... at, Aligned at,
and Indent at, as shown in . The final result is shown in Figure 42.

Figure 42: Indenting level 3 headings

Defining a hierarchy of headings 33

You might also like