All pages in a Writer document are based on page styles, which define the basic layout of pages, including page size, margins, the placement of headers and footers, borders and backgrounds, number of columns, and so on.
If you have a document open in Writer, look in the Status Bar at the bottom of the Writer window. The page style for the current page is displayed there. In the example below, the page style is Default.
Writer comes with several pre-defined page styles, which you can 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.
In this section, we’ll define some page styles to use in our book. The styles we need are listed in Planning a book design.
Tip: Any modifications of page styles, including the Default page style, and any new page styles that you define, 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 Creating a template for details.
Automating the sequence of page styles
You can automate any sequence of pages where you want one style to be followed by a specific style. The following page style can be the same style or a different style.
The first thing to do is decide on the styles you need. Don’t worry if you decide later that you need another style, or want to change the sequence—you can do so at any time.
Let’s set up some page styles to use in our book. Here is a typical sequence:
- Title (cover) page
- Copyright page
- Table of Contents page
- Contents other pages
- First Page (for each chapter)
- Default page (for all other pages in each chapter)
Automating the sequence of styles uses the Next Style property of the styles. You can define page styles in any order you want, but some ways are more efficient than others. You might think it makes sense to work through the page styles from the beginning of the book, starting with the Title page, but in fact it’s much more efficient to start at the end of any sequence of pages, so that the “next style” is always defined before it is needed in the sequence.
First let’s look at a single chapter, which needs two styles: First Page and Default. The diagram below shows this concept.
Both of these styles are provided by Writer, and the First Page style is defined to have a Next Style of Default, so we can proceed without defining any new styles or modifying any existing styles. (The page style you want to use as a next page style must exist before you can assign it as a next style.)
Here is how to do it:
- Create a new document (choose File > New > Text Document or press Control+N). Make sure that end-of-paragraph marks are showing.
- With the cursor in the first page of the document, the Status Bar should show that the page style is Default.
- Double-click First Page in the Styles and Formatting window, or click once on Default in the Status Bar and choose First Page from the pop-up list.
- Type something on this page. Because this is a demonstration of page styles, we won’t be concerned with the formatting of the text at this point. Press Enter at the end of the paragraph, to create another (blank) paragraph.
- Choose Insert > Manual Break from the menu bar. On the Insert Break dialog, choose Page Break, ignore the other boxes, and click OK. Notice that the Page Style for the new page is shown in the Status Bar as Default.
- If you wish, save this document to use later.
Start of a book
For a slightly more complex sequence, the figure below shows the concept of page style sequencing at the start of the book.
Notice that this sequence uses four styles that are not provided by Writer, so we’ll need to create them. We’ll start at the end of the sequence and work our way forward: Contents Other, Table of Contents, Copyright, Title.
- Open a new document or the one you used in the previous example. In the Styles and Formatting window, click the Page Styles icon.
- Right-click anywhere in the Styles and Formatting window and select New from the pop-up menu.
- On the Organizer tab of the Page Style dialog, type Contents Other in the Name box. Open the Next Style drop-down list and select Contents Other.
- Ignore the other tabs for now and click OK to save.
- Repeat steps 2 and 3 three times:
Name: Table of Contents
Next Style: Contents Other
Name: Copyright page
Next Style: Table of Contents
Name: Title page
Next Style: Copyright
Test this sequence as follows:
- With the cursor in the first page of the document, double-click Title page in the Styles and Formatting window, or click once in the page style section of the Status Bar and choose Title page from the pop-up list.
- Type something on this page. Press Enter at the end of the paragraph, to create another (blank) paragraph.
- With the cursor in this last paragraph, choose Insert > Manual Break from the menu bar. On the Insert Break dialog, choose Page Break, ignore the other boxes, and click OK.
- You should now have a second page in your document. Look in the Status Bar. The page style should show Copyright. You did not have to choose Copyright on the Manual Break dialog, because the Title page style is set up to automatically make the next page use the Copyright style.
- Type something on the second page. Press Enter at the end of the paragraph, to create another (blank) paragraph.
- As you did before, choose Insert > Manual Break from the menu bar. On the Insert Break dialog, choose Page Break, ignore the other boxes, and click OK.
- You should now have a third page in your document. Its page style should show in the Status Bar as Table of Contents. This page is intended to be the contents page, but our document does not have any contents yet, and we probably don’t know exactly how many pages of contents there will be. This doesn’t matter; we’ll keep going.
- As before, create a blank paragraph, and choose Insert > Break. On the Insert Break dialog, choose Page Break, ignore the other boxes, and click OK. The new page should have a page style of Contents Other. (You’ll want to delete this page when you insert the real table of contents; this step was just to demonstrate that the sequencing works.
- Save this file for use in the next example.
Adding a chapter to the book sequence
We’ve seen how to do the chapter sequence, but how to change from the “front matter” sequence to the chapter sequence? Here is the concept:
A change from one sequence to a new sequence (for example to begin a new chapter) can be done either manually or by using a property of paragraph styles to automate the change in sequence. Which method you use is entirely up to you.
Changing sequences manually
Let’s look at an example of doing it manually.
- Using the same file as before, go to the end of the table of contents, create a blank paragraph, and choose Insert > Break.
- On the Insert Break dialog, in addition to choosing Page Break, choose First Page in the Style box. Because we want the page numbers to start again at 1 on the first page of the first chapter, select the Change page number option and make sure the number in the box below is 1, then click OK.
- Now, either type or paste enough text to fill up the page and flow on to another page. The Status Bar should say the page style is Default. As you keep adding text, Writer will keep adding Default pages.
- When you’re ready to start Chapter 2, use the familiar Insert > Break. On the Insert Break dialog, choose Page Break and choose First Page in the Style box. This time we want the page numbers to continue numbering from where the first paragraph left off, so do not select the Change page number option this time.
- Again, add text to fill up the page and flow on to another Default page.
- Save this document. We’ll use it again later to demonstrate page numbering.
(We have not yet set up page numbers to display on the page, so you won’t immediately see the result of this action. Page numbering is described here.)
Changing sequences using a paragraph style
Instead of inserting a manual page break each time we want to start a new chapter, we can set up the Heading 1 paragraph style to automatically start on a new page. (The technique works for whatever style you are using for your chapter titles.)
- On the Styles and Formatting window, right-click on the Heading 1 style and select Modify.
- On the Text Flow tab, under Breaks, select Insert and With Page Style. Choose First page from the drop-down list of styles.
- Leave the other tabs alone for now. Click OK to save the change.
To test this method:
- Press Enter to create a blank paragraph and type some words into it, for example Title of Chapter 1. On the Paragraph Style page of the Styles and Formatting window, double-click Heading 1 to apply that style to the paragraph. The paragraph will jump to a new page, which will have a page style of First Page.
- Whenever you want to start a new chapter, repeat step 1.
Note: This technique does not automatically start the page numbering of the first page of the first chapter at 1. You could set the Heading 1 style to automatically restart the page number at 1, but then the page numbering of every chapter would begin again at 1. You probably don’t want that. So you’ll need to manually restart the page numbering on that one page, as described in Restarting page numbering.
This book is licensed under the terms of the Creative Commons Attribution License, version 3.0.