Writer Guide

Chapter 5
Formatting Pages: Basics
Page styles and related features

CopyrightThis document is Copyright © 2021 by the LibreOffice Documentation Team. Contributors arelisted below. You may distribute it and/or modify it under the terms of either the GNU General
Public License (https://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative
Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), version 4.0 or later.
All trademarks within this guide belong to their legitimate owners.

Contributors
To this edition
Jean Hollis Weber

Kees Kriek

To previous editions
Jean Hollis Weber
Jamie Eby
Randolph Gamo

Bruce Byfield
John A Smith
Kees Kriek

Gillian Pollack
Ron Faile Jr.
Jenna Sargent

Feedback
Please direct any comments or suggestions about this document to the Documentation Team’s
mailing list: documentation@global.libreoffice.org

Note
Everything you send to a mailing list, including your email address and any otherpersonal information that is written in the message, is publicly archived and cannot
be deleted.

Publication date and software version
Published April 2021. Based on LibreOffice 7.1 Community.
Other versions of LibreOffice may differ in appearance and functionality.

Using LibreOffice on macOS
Some keystrokes and menu items are different on macOS from those used in Windows andLinux. The table below gives some common substitutions for the instructions in this document.
For a detailed list, see the application Help.
Windows or LinuxmacOS equivalent

EffectTools > Options
menu selection

LibreOffice > Preferences

Access setup options

Right-click

Control+click or right-click
depending on computer setup

Open a context menu

Ctrl (Control)⌘ (Command)

Used with other keys

F11

⌘+T

Open the Styles deck in the Sidebar

Documentation for LibreOffice is available at https://documentation.libreoffice.org/en/Contents
Copyright............................................................................................................................2
Contributors.............................................................................................................................. 2
Feedback.................................................................................................................................. 2
Publication date and software version.......................................................................................2
Using LibreOffice on macOS.....................................................................................................2

Introduction........................................................................................................................4
Setting up basic page layout using styles......................................................................4
Changing page margins....................................................................................................5
Inserting page breaks.......................................................................................................7
Controlling automatic page breaks............................................................................................7
Inserting a page break without changing the page style............................................................7
Inserting a page break and changing to a new page style.........................................................7

Creating headers and footers..........................................................................................8
Formatting headers and footers................................................................................................9
Using fields in headers and footers.........................................................................................11

Numbering pages............................................................................................................11
Simple page numbering.......................................................................................................... 12
Defining the number format.....................................................................................................13
Restarting page numbering and changing numbering format..................................................13
Numbering the first page something other than 1....................................................................14
Combining header text and page number...............................................................................14
Numbering pages by chapter..................................................................................................15

Defining a different first page for a document.............................................................16
Using one page style............................................................................................................... 17
Using different page styles......................................................................................................17
Adding title pages.................................................................................................................... 18

Formatting footnotes and endnotes..............................................................................19
Defining footnote location and separator line..........................................................................19

Chapter 5 Formatting Pages: Basics | 3

Introduction
Writer provides several ways for you to control page layouts. This chapter describes the use ofpage styles and some associated functions:
•
•
•
•
•
•

Margins
Page breaks
Headers and footers
Page numbering
Title pages
Footnotes and endnotes

Chapter 6, Formatting Pages: Advanced covers the use of columns, frames, tables, and sections;changing page orientation within a document; and the use of borders and backgrounds. Someother uses of page styles are discussed in Chapter 8, Introduction to Styles. The Page Style
dialog is covered in detail in Chapter 9, Working with Styles.

Note
All pages in a Writer document are based on page styles. The other layout methods(described in Chapter 6) build upon the underlying page style.

Tip
Page layout is usually easier if you select the options to show text, object, table, andsection boundaries in Tools > Options > LibreOffice > Application Colors and theoptions for paragraph ends, tabs, breaks, and other items in Tools > Options >LibreOffice Writer > Formatting Aids.

Setting up basic page layout using styles
In Writer, page styles define the basic layout of all pages, including page size, margins, theplacement of headers and footers, borders and backgrounds, number of columns, page
numbers, and so on.
Writer comes with several page styles, which you can build on or modify, and you can define new(custom) page styles. You can have one or many page styles in a single document. If you do not
specify a page style, Writer uses the Default Style.
To change the layout of individual pages, either define a new page style or use one of thetechniques (sections, frames, or tables) described in Chapter 6, Formatting Pages: Advanced.

Note
For some documents, all layout changes (such as the position of page numbers andother elements in a header or footer on facing pages) can be defined in a single
page style.

Tip
Any modifications of page styles, including the Default Style, apply only to the
document you are working on. If you want the changes to be the default for all
documents, you need to put the changes into a template and make that template thedefault template. See Chapter 10, Working with Templates, for details.

4 | Chapter 5 Formatting Pages: Basics

Changing page margins
You can change page margins in these ways:•

Using the page rulers—quick and easy, but does not have fine control.

•

Using the Page Style dialog—can specify margins to two decimal places.

•

Using the Page deck in the Sidebar—changes all margins to the same value.

Note
If you change the margins using any of these methods, the new margins arerecorded in the page style and affect all pages that use that style. The new margins
will be shown in the Page Style dialog the next time you open it.
If you want to change the margins on some pages, but not others, you must use
different page styles and switch between them; see “Inserting page breaks” on page7.
To change margins using the rulers:
1) The shaded sections of the rulers are the margins (see Figure 1). Put the mouse cursor
over the line between the gray and white sections. The pointer turns into a double-headed
arrow and displays the current setting in a tooltip.
2) Hold down the left mouse button and drag the mouse to move the margin.

Figure 1: Moving the margins

CautionThe small arrows on the ruler are used for indenting paragraphs. They are often in
the same place as the page margins, so you need to be careful to move the margin
marker, not the arrows. The double-headed arrows shown in Figure 1 are the mouse
cursors placed in the correct position.

Tip
After making a change, passing the mouse over the new margin will show its newmeasurement.

Changing page margins | 5

To change margins using the Page Style dialog:
1) Right-click anywhere on the page and select Page Style in the context menu.
2) On the Page tab of the dialog (Figure 2), type the required distances in the Margins
boxes.
3) Click OK to save.

Figure 2: Page tab of Page Style dialog
To change margins using the Page deck in the Sidebar, choose one of the preset margins in thedrop-down list (Figure 3). You can also access the Page Style dialog from the symbol at the top
right of the Format section’s title bar.

Figure 3: Changing margins using the Sidebar

CautionChanging the margin on the Sidebar changes all four margins to the same
dimension. Use another method if you want margins of different sizes.
6 | Chapter 5 Formatting Pages: Basics

Inserting page breaks
In many documents (for example, a multi-page report), you want the text to flow from one page tothe next as you add or delete information. Writer does this automatically, unless you override thetext flow using one of the techniques described in this section.

Controlling automatic page breaks
You can control some of the automatic text flow in several ways, including:•

Use the Keep with next paragraph option, for example to prevent the lead-in sentence
to a list from being separated from the list. This option is found on the Text Flow tab of
the Paragraph dialog (right-click and choose Paragraph > Paragraph in the context
menu to open the dialog).

Figure 4: Keep with next paragraph and Do not
split paragraph options on Paragraph dialog•

Use the Do not split paragraph option on the Text Flow tab of the Paragraph dialog (forindividual paragraphs) or the Paragraph Style dialog (for all paragraphs with that style).

•

Use a paragraph style to require a paragraph to start on a new page. A typical use is forchapter titles to always start on a new right-hand (odd-numbered) page; use theParagraph Style dialog to define this (see “Text flow options for paragraph styles” in
Chapter 9, Working with Styles, for more information).

Inserting a page break without changing the page style
If you want a page break in a particular place—for example, to put a heading at the top of a new
page—you can position the cursor at the point where you want to start the new page and selectInsert > Page Break on the Menu bar.

Inserting a page break and changing to a new page style
If you want the new page to have a different page style—for example, to change from a First
Page style to a Left Page style—use either of these methods.

Caution
Do not try to change a page style for a single page without inserting a page break. If
you do, the page style of some or all of the other pages may also change.
Method 1
1) Position the cursor at the point you want to start the next page. Select Insert > More
Breaks > Manual Break.
2) In the Type section of the Insert Break dialog (Figure 5), Page break is preselected, andStyle is set at [None]. In the Style drop-down list, select the page style for the next page.
Do not select the Change page number option. Click OK.
Inserting page breaks | 7

Figure 5: Inserting a manual page break and changing the page style
Method 2
1) Position the cursor in the paragraph you want to be at the start of the next page. Rightclick and choose Paragraph > Paragraph in the context menu.
2) On the Text Flow page of the Paragraph dialog (Figure 6), in the Breaks section, selectInsert and With page style. From the Style drop-down list, select the page style for the
next page. Do not select the Page number option. Click OK to insert the page break.

Figure 6: Inserting a manual page break using
the Paragraph dialog

Tip
See “Numbering the first page something other than 1“ on page 14 for information on
the use of the page number field in these dialogs.

Creating headers and footers
Headers are portions of a document that appear at the top of every page; footers appear at thebottom of a page. They typically include a page number and sometimes document informationsuch as the title. In Writer, headers and footers are specified in page styles; therefore, all thepages with the same page style will display the same header and footer, although the contents of
the header/footer may vary. For example, the header/footer on the first page of a section,
chapter, or document may contain different information than the rest of the headers and footers in
the document, even though the page style is the same. See “Using one page style” on page 17.
Chapter 9 describes how to format a header as part of the page style formatting. The example
below shows how to insert a header in the Default pages using manual formatting.
8 | Chapter 5 Formatting Pages: Basics

Terminology
A heading is a paragraph that introduces a chapter or section of a document; forexample, “Creating headers and footers” above. A header (also known as a running
header) appears on each page and typically displays information about the
document.
There are two ways to insert a header. The simplest method is to click above the top of the text
area, then when the Header marker appears, click the +. (To insert a footer, click below thebottom of the text area to display the Footer marker, and then click the +.)Figure 7: Header marker at top of text area
You can also select Insert > Header and Footer > Header > [Page Style] on the Menu bar. The
submenu lists the page styles used in your document. In addition, the submenu includes theentry All, which activates headers on all the pages of the document regardless of their pagestyle. Similarly, to insert a footer, choose Insert > Header and Footer > Footer > [Page Style].
For our example, select Default Style to activate the headers or footers only on the pages that
use the Default Page Style. An area will appear at the top or bottom of the page (Figure 8).

Figure 8: A page with a page header

Formatting headers and footers
In Writer, headers and footers are paragraphs; therefore, you can format the header or footer text
using the same techniques you use for formatting text in the main body of the document. See
Chapter 4, Formatting Text.
You can also add images to headers and footers using any of the techniques described in
Chapter 11, Images and Graphics, and you can line up information using tables as described in
Chapter 6, Formatting Pages: Advanced.

Tip
Writer provides paragraph styles for headers and footers, which you can modify anduse in the same way as other paragraph styles. See Chapter 8, Introduction to
Styles, and Chapter 9, Working with Styles.

Creating headers and footers | 9

To format the layout of headers and footers manually:
1) Use any of these methods to open the relevant page style dialog:– Click anywhere on the page and choose Format > Page Style on the Menu bar.
– Right-click anywhere on the page and choose Page Style in the context menu.
– If the page has a header, click in the header area. When the Header marker appears,
click the down arrow and select Format Header.
– If the page has a footer, click in the footer area. When the Footer marker appears,
click the down arrow and select Format Footer.
2) On the Header or Footer tab of the Page Style dialog (Figure 9), you can change themargins, spacing, and height.
3) Click More to open the Border/Background dialog (Figure 10), where you can add
borders, background colors, and background images to the header or footer.

Figure 9: Footer tab of Page Style dialog

Figure 10: Border / Background page for header or footer

10 | Chapter 5 Formatting Pages: Basics

Using fields in headers and footers
You can type information into headers and footers, but some items such as document titles andchapter titles are best added as fields. That way, if something changes, the headers and footers
are all updated automatically.
Fields are covered in Chapter 17, Fields, but one example here may be useful. To insert the
document title into the header on a Default page style:1) Select File > Properties > Description on the Menu bar, enter a title for the document in
the Title area, and click OK to close the dialog.
2) Add a header (Insert > Header and Footer > Header > [Page Style]).
3) Place the cursor in the header part of the page.
4) Select Insert > Field > Title on the Menu bar. The title should appear on a graybackground (which does not show when printed and can be turned off).
5) To change the title of the document, reselect File > Properties > Description and edit.

Note
You must use a field for the page number so it changes from one page to the next.
See “Numbering pages” below.

Numbering pages
When you place a page number field in a header or footer, the number appears on every pageand changes automatically from one page to the next. The page number appears with a graybackground. This gray background denotes a field; although it is visible on screen, it is notprinted.

Tips
If you wish to turn off the gray background, choose View > Field Shadings (or press
Ctrl+F8).
If you see the words “Page number” instead of a number, press Ctrl+F9. This toggles
Writer between displaying the field name and the content of the field.
This section describes some techniques to insert page numbers and related information inheaders or footers of a document:•

Simple page numbering•

Defining the number format•

Restarting page numbering and changing numbering format•

Numbering the first page something other than 1•

Combining header text and page number•

Numbering pages by chapter

Numbering pages | 11

Simple page numbering
The simplest case is to have the page number at the top or bottom of every page and nothing
more (Figure 11). To do this, put the cursor on the header or footer and choose Insert > Page
Number or Insert > Field > Page Number on the Menu bar.

Figure 11: Page number inserted in the header
You can align the page number to the left, right, or center. Click in the footer paragraph and thenuse one of these methods:•

Click on one of the alignment icons on the Formatting toolbar.

•

Open the Properties deck in the Sidebar. In the Paragraph section, click on one of thealignment icons (Figure 12).

Figure 12: Alignment icons in Properties deck of Sidebar•

Right-click and choose Paragraph > Paragraph in the context menu. On the Paragraphdialog, go to the Alignment tab and choose an alignment option, then click OK.

Figure 13: Alignment tab of Paragraph dialog

12 | Chapter 5 Formatting Pages: Basics

Defining the number format
Many more variations are possible. For example, you can set the page number to display in
Roman numerals. One way to do that is to double-click the page number and select the desired
format; a better choice is to specify the format of numbers in the page style as explained here.
Right-click in the text area of the page and select Page Style in the context menu.
On the Page tab of the Page Style dialog, in the Layout Settings section on the right, selecti, ii, iii, …. in the Page numbers: drop-down list to use lowercase Roman numerals (Figure 14).

Figure 14: Changing format of page numbers

CautionAny change in the number format affects the page numbers on all pages using thatpage style, regardless of the method used to change the format. To change theformat of page numbers on some pages but not all, you need to use different pagestyles; see “Restarting page numbering and changing numbering format” below.

Restarting page numbering and changing numbering format
You may want to restart the page numbering at 1, for example, on the page following a title pageor a table of contents. In addition, many documents have the front matter (such as the table ofcontents) numbered with Roman numerals and the main body of the document numbered in
Arabic numerals, restarting at 1.
First, you need to define the numbering format for two page styles: Front Matter and Default. See“Using different page styles” on page 17 and “Defining the number format’ above.
Next, in the front matter, insert a page number (see “Simple page numbering” on page 12).
Then, you can restart page numbering as follows:
1) Place the cursor in the first paragraph of the page to have the Default page style. (Aheading is a paragraph.)2) Choose Format > Paragraph on the Menu bar, or right-click and choose Paragraph >Paragraph, to display the Paragraph dialog.
3) On the Text Flow page of the Paragraph dialog, in the Breaks area (Figure 15):a) Select Insert.
b) In the Type drop-down list, select Page.
c) In the Position drop-down list, select Before.
d) Select With page style and choose from the drop-down list the page style for the
next page.

Numbering pages | 13e) Select Page number to make the field active. Type 1. Click OK.

Figure 15: The Breaks section of the Text
Flow page of the Paragraph Style dialog

Numbering the first page something other than 1
Sometimes you may want to start a document with a page number greater than 1. The
instructions are similar to Step 3 in the previous section.
1) Insert a page number in the header or footer (Insert > Page Number).
2) Click in the first paragraph in the text area. Choose Format > Paragraph (or right-click
and choose Paragraph > Paragraph in the context menu).
3) In the Text Flow page of the Paragraph dialog, in the Breaks section (Figure 15), selectInsert and select Page in the Type drop-down list. Select With page style and the pagestyle you are using for the first page of the document.
4) Select Page number to make the field active. Type the page number you want to startwith. Click OK.

Note
If you set a starting page number that is an even number, you will end up with ablank page before the first page. LibreOffice adheres to the convention that odd page
numbers go on right-hand pages and even page numbers on left-hand pages.
However, you can suppress this blank page when you print the file or export it as a
PDF. See Chapter 7, Printing, Exporting, Emailing, Signing for more information.

Combining header text and page number
You can apply a lot of interesting variations without further knowledge of page styles. Here aresome suggestions:•

Right-align the header to make the page number appear on the top-right.

•

Type the word Page (and a space) before the page number field so the header reads
Page 1, Page 2, and so on.

•

Add the document title so the header includes, for example: Peter’s Favourite Poems (leftaligned) and Page x (right aligned), where x is the value of the Page Number field. Use aright-aligned tab to separate the title from the page number.

•

Writer also has a Page Count field (Insert > Field > Page Count). Using it and the page
number field, you could, for example, have a header that reads Page 2 of 12.

These variations are all illustrated in Figure 16.

14 | Chapter 5 Formatting Pages: Basics

Figure 16: Variations on the simple page numbering method

Numbering pages by chapter
Technical documents often include the chapter number with the page number in the header orfooter. For example, 1-1, 1-2, 1-3, ...; 2-1, 2-2, 2-3, ... To set up this type of page numbering inWriter, you need to do three things:
1) Ensure that your chapter titles are all identified by the same paragraph style, for example,
the Heading 1 style.
2) Use Tools > Chapter Numbering to tell Writer what paragraph style you are using forLevel 1, and specify “1,2,3” in the Number box.

Figure 17: Specifying paragraph style and numbering for chapter titles
3) Insert the chapter number in the document:a) Place the cursor in the header or footer just before the page number you inserted
earlier, and choose Insert > Field > More Fields on the Menu bar.
b) On the Fields dialog (Figure 18), go to the Document tab. Select Chapter in the Typelist, Chapter number in the Format list, and 1 in the Level box. Click Insert.
c) Type a hyphen or other punctuation between the chapter number and the page
number.

Numbering pages | 15

Figure 18: Inserting a chapter number field

Defining a different first page for a document
Many documents, such as letters and memos, have a first page that is different from the otherpages in the document. For example, the first page of a letterhead typically has a different
header, as shown in Figure 19, or the first page of a report might have no header or footer, while
the other pages do.

Figure 19: Letterhead with different headers for first and following pages

16 | Chapter 5 Formatting Pages: Basics

You can do this in several ways:•

Use the Default (or any other) page style for your document. Deselect the Same content
on first page option on the header/footer tabs in the Page Style dialog, and then add
different headers/footers to the first page and to the other pages of the document. See“Using one page style” on page 17.

•

Use different page styles for the first page and for the following pages. Set the Next Page
attribute for the first page so the next page automatically becomes the style for following
pages. See “Using different page styles” on page 17.

•

Add a title page at the beginning of the document. See “Adding title pages” on page 18.

Using one page style
This example uses the Default page style.
1) Right-click anywhere on the page and choose Page Style in the context menu. On therelevant tab (Header or Footer) of the Page Style dialog, select Header/Footer on anddeselect Same content on first page (see Figure 20). Optionally select Same content
on left and right pages.

Figure 20: Setting up footers to have different content on different pages
2) Insert a header or footer on any page using the Default page style. See “Creating
headers and footers” on page 6.
3) Add different header and footer content to the first page and to the other pages of the
document. For example, leave the header/footer blank on the first page.

Using different page styles
As an example, we can use the First Page and Default Style page styles that come with
LibreOffice. Figure 21 shows what we want to happen: the first page is to be followed by thedefault page, and all the following pages are to be in the default page style.
To do this, open the Page Style dialog for the First Page style, go to the Organizer tab, andchoose Default Style in the Next Style list (see Figure 22).

Figure 21: Flow of page styles

Defining a different first page for a document | 17

Figure 22: Setting the next style for a page style

Adding title pages
Writer provides a fast and convenient way to add one or more title pages to a document andoptionally to restart the page number at 1 for the body of the document.
To begin, choose Format > Title Page on the Menu bar to display the Title Page dialog.
On the Title Page dialog (Figure 23), you can make the following choices:
•
•
•
•
•

Convert existing pages to title pages, or insert new title pages.
How many pages to convert or insert.
Where those pages are located.
If and where to restart page numbering, and what number to start with.
What page style to use for the title page.

Using this technique, you can insert several “title pages” at different points in your document, forexample to add decorative pages between chapters as well as title, copyright, and other pages atthe beginning of a book.

Figure 23: Adding title pages to a document

18 | Chapter 5 Formatting Pages: Basics

Formatting footnotes and endnotes
Footnotes appear at the bottom of the page on which they are referenced. Endnotes arecollected at the end of a document.
To work effectively with footnotes and endnotes, you need to:•Insert footnotes and define their format, if the default does not meet your needs (seeChapter 3, Working with Text: Advanced).

• Define the location of footnotes on the page, and the color and line styles for separatorlines, if the defaults do not meet your needs.

Defining footnote location and separator line
The location of footnotes on the page, and the color and style of the line that separates thefootnotes from the text, are defined in the page style. If you are using several page styles, andmay have footnotes on any of them, you need to define the footnote location and separator line
on each of the page styles.
Choose Format > Page on the Menu bar or right-click a page and choose Page in the context
menu, to display the Page Style dialog. Go to the Footnote tab (Figure 24) and make yourselections, then click OK to save the changes.
Keeping the default setting Not larger than page area, the footnotes area is calculated
automatically on the basis of the number of footnotes. If you prefer to control manually the
maximum space that footnotes can take, select the Maximum footnote height option and enterthe value in the preferred unit of measurement. A footnote higher than the maximum height will
spill over on to the next page. Use the second section of the page to customize the separator
between the footnotes and the main text area.

Figure 24: Defining footnote location and separator line

Formatting footnotes and endnotes | 19