LibreOfficeLogo

Writer Guide 7.5

Chapter 5,
Formatting Pages: Basics

Page styles and related features

Copyright

This document is Copyright © 2022 by the LibreOffice Documentation Team. Contributors are listed 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

Kees Kriek

Gillian Polack

Bruce Byfield

John A Smith

Ron Faile Jr.

Randolph Gamo

Kees Kriek

Jenna Sargent

Jamie Eby

 

 

Feedback

Please direct any comments or suggestions about this document to the Documentation Team’s forum at https://community.documentfoundation.org/c/documentation/loguides/ (registration is required) or send an email to: loguides@community.documentfoundation.org. Emails sent to the forum are moderated.

Note

Everything you send to a forum, including your email address and any other personal information that is written in the message, is publicly archived and cannot be deleted.

Publication date and software version

Published [Month] 2023. Based on LibreOffice 7.5.

Using LibreOffice on macOS

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

Windows or Linux

macOS equivalent

Effect

Tools > 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

Alt

⌥ (Option) or Alt, depending on keyboard

Used with other keys

F11

+T

Open Styles deck in Sidebar

Introduction

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

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. Some other 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, and section boundaries in Tools > Options > LibreOffice > Application Colors and the options 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, the placement 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 Page Style.

To change the layout of individual pages, either define a new page style or use one of the techniques (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 and other 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 Page 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 the default template. See Chapter 10, Working with Templates, for details.

Changing page margins

You can change page margins in these ways:

Note

If you change the margins using any of these methods, the new margins are recorded 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 breaksbelow.

To change margins using the rulers:

1)  The shaded sections of the rulers are the margins (Figure 1). Put the mouse pointer over the line between the gray and white sections. The pointer turns into a double-headed arrow (or some other symbol, depending on your operating system) 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

Image13

Note

The 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 pointers placed in the correct position.

Tip

After making a change, passing the mouse pointer over the new margin will show its new measurement.

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. The Gutter margin is the extra space to leave between the left (or inner) edge of the page and the left (or inner) margin. Alternatively, you can leave the Gutter set to zero and add the gutter margin amount to the left or inner margin value.

3)  Click OK to save.

Figure 2: Page tab of Page Style dialog

Image4

To change margins using the Page deck in the Sidebar, choose one of the preset margins in the drop-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

Image3

Note

Changing the margin on the Sidebar changes all four margins to the same dimension. Use another method if you want margins of different sizes.

Inserting page breaks

In many documents (for example, a multi-page report), you want the text to flow from one page to the next as you add or delete information. Writer does this automatically, unless you override the text 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:

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

Image5

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 select Insert > 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, and Style 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.

Figure 5: Inserting a manual page break and changing the page style

Image20

Method 2

1)  Position the cursor in the paragraph you want to be at the start of the next page. Right-click and choose Paragraph > Paragraph in the context menu.

2)  On the Text Flow page of the Paragraph dialog (Figure 6), in the Breaks section, select Insert and With page style. In 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

Image12

Tip

See “Numbering the first page something other than 1below 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 the bottom of a page. They typically include a page number and sometimes document information such as the title. In Writer, headers and footers are specified in page styles; therefore, all the pages 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 stylebelow.

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.

Terminology

A heading is a paragraph that introduces a chapter or section of a document; for example, “Creating headers and footersabove. A header (also known as a running header) appears in the top margin of each page and typically displays information about the document; it is similar to a footer at the bottom of pages.

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 the bottom of the text area to display the Footer marker, and then click the +.)

Figure 7: Header marker at top of text area

Image18

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 the entry All, which activates headers on all the pages of the document regardless of their page style. 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

graphics57

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 and use in the same way as other paragraph styles. See Chapter 8, Introduction to Styles, and Chapter 9, Working with Styles.

To format the layout of headers and footers manually:

1)  Use any of these methods to open the relevant page style dialog:

2)  On the Header or Footer tab of the Page Style dialog (Figure 9), you can change the margins, 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

Image14

Figure 10: Border / Background page for header or footer

Image17

Using fields in headers and footers

You can type information into headers and footers, but some items such as document titles and chapter 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, but one example may be useful here. 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 gray background (which does not show when printed and can be turned off).

5)  To change the title of the document, select File > Properties > Description again and edit.

Note

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

Numbering pages

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

Tip

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 contents of the field.

This section describes some techniques to insert page numbers and related information in headers or footers of a document:

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, place the cursor in 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

Image29

You can align the page number to the left, right, or center. Click in the footer paragraph and then use one of these methods:

Figure 12: Alignment icons in Properties deck of Sidebar

Image6

Figure 13: Alignment tab of the Paragraph dialog

Image1

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, select i, ii, iii, …. in the Page numbers: drop-down list to use lowercase Roman numerals (Figure 14).

Figure 14: Changing format of page numbers

Image7

Caution

Any change in the number format affects the page numbers on all pages using that page style, regardless of the method used to change the format. To change the format of page numbers on some pages but not all, you need to use different page styles; see “Restarting page numbering and changing numbering formatbelow.

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 page or a table of contents. In addition, many documents have the front matter (such as the table of contents) 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 Page Style. See “Using different page stylesbelow and “Defining the number formatabove.

Next, in the front matter, insert a page number (see “Simple page numberingabove).

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. (A heading 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.

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

Image8

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), select Insert and select Page in the Type drop-down list. Select With page style and the page style 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 start with. Click OK.

Note

If you set a starting page number that is an even number, you will end up with a blank 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 are some suggestions:

These variations are all illustrated in Figure 16.

Figure 16: Variations on the simple page numbering method

Image30

Numbering pages by chapter

Technical documents often include the chapter number with the page number in the header or footer. For example, 1-1, 1-2, 1-3, ...; 2-1, 2-2, 2-3, ... To set up this type of page numbering in Writer, 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 for Level 1, and specify “1,2,3” in the Number box (Figure 17).

Figure 17: Specifying paragraph style and numbering for chapter titles

Image15

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 Type list, 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.

Figure 18: Inserting a chapter number field

Image16

Defining a different first page for a document

Many documents, such as letters and memos, have a first page that is different from the other pages 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

Image2

You can do this in several ways:

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 the relevant tab (Header or Footer) of the Page Style dialog, select Header/Footer on and deselect Same content on first page (Figure 20). Optionally select Same content on left and right pages.

2)  Insert a header or footer on any page using the Default Page Style. See “Creating headers and footersabove.

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.

Figure 20: Setting up footers to have different content on different pages

Image11

Using different page styles

As an example, we can use the First Page and Default page styles that come with LibreOffice. Figure 21 shows what we want to happen: the first page is to be followed by the default 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, and choose Default Page Style in the Next Style list (Figure 22).

Figure 21: Flow of page styles

graphics240

Figure 22: Setting the next style for a page style

Image9

Adding title pages

Writer provides a fast and convenient way to add one or more title pages to a document and optionally 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 (Figure 23).

Figure 23: Adding title pages to a document

Image10

On the Title Page dialog, you can make the following choices:

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

Formatting footnotes and endnotes

Footnotes appear at the bottom of the page on which they are referenced. Endnotes are collected at the end of a document.

To work effectively with footnotes and endnotes, you need to:

Defining footnote location and separator line

The location of footnotes on the page, and the color and style of the line that separates the footnotes from the text, are defined in the page style. If you are using several page styles, and may 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 Style on the Menu bar or right-click a page and choose Page Style in the context menu, to display the Page Style dialog. Go to the Footnote tab (Figure 24) and make your selections, then click OK to save the changes.

Figure 24: Defining footnote location and separator line

Image19

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 enter the 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.

Inserting column and line breaks

In addition to manual page breaks (discussed above), you may sometimes wish to use column breaks and line breaks. These two methods for inserting these breaks are similar to the methods for manual page breaks.

Column breaks

Manual column breaks are available only in a multi-column document or section. To insert a manual column break:

1)  Position the cursor at the point you want to start the new column. Select Insert > More Breaks > Manual Break on the Menu bar.

2)  In the Type section of the Insert Break dialog (Figure 5), select Column break. Click OK.

You can also use the Breaks section in the Paragraph dialog (Figure 6).

Line breaks

You can use line breaks to manually format text in several ways:

To insert a default line break, press Shift+Enter.

To insert other line break types:

1)  Position the cursor at the point you want to break the text to a new line. Select Insert > More Breaks > Manual Break on the Menu bar.

2)  In the Type section of the Insert Break dialog (Figure 25), select Line break.

3)  Select the type of line break required. Click OK.

Figure 25: Inserting a line break

Image21

Contents