Board index ‹ Getting started ‹ Tutorials ‹ Writer
[Tutorial] Page styles and headers/footers
No question in this forum please
For any question related to a topic, create a new thread in the relevant section.
by floris v » Sat Oct 15, 2011 12:05 pm
Writer uses page styles to control things like page size and orientation, margins, headers and footers for blocks of pages. There's good news and bad news about them. The good news is: page styles are very powerful, and once you master them, they're easier to use than the sections in MS Word (used to be). For one thing, you can use the same page style for different parts of your document, and you can't do that with sections. The bad news is: the way you apply a page style to a block of pages is very counter-intuitive. You'd want to select a block of text and apply a page style to it as you would apply a paragraph style to selected text. Or you'd want to put the cursor somewhere on a page and apply a page style to it as you'd apply a paragraph style to a paragraph with the cursor in it. If you do that, pages before and after that page will get the same page style, from the previous page style transition to the next. You may see that as a shortcoming in the software, but that's how it is.
You don't have to worry about page styles as long as you want the same page size, headers, footers, etc. on all pages (or left and right pages) of your document. You can simply deal with that with Format - Page. The trouble starts when you want a header on some pages and not on others. That's when you need to use different page styles.
There are two problems here, one is how to switch page styles safely. The other problem is how you change the properties of a page style. Here the user interface is lacking. It'd be much better if there was a toolbar where you can configure the behavior of your headers and footers when the cursor is in a header or footer. But now you can only change them with Format – Page or with the styles list (press F11 to open or hide it), fourth icon from the left.
pagestyles.jpg (19.2 KiB) Viewed 44022 times
You can double click a style to change the current page style. You can also change the page style for the page holding the cursor by right clicking the page style name (between page number and language) in the status bar (bottom of the window) and selecting a style from the list. Don't do that in a document that already has different pages styles if you are new to pages styles. If you're an experienced user, you probably don't want to change page styles in a document with several page styles that way either.
Below we'll
- discuss how to (safely) move from one page style to another,
- mention problems in conversion to and from the MS Word format and
- give some examples of how page styles are applied for documents with different headers.
If all of this seems very abstract, just start a new document, enter enough dummy text to fill a few pages and apply the instructions until you get the hang of it all.
Last edited by floris v on Wed Nov 16, 2016 12:31 am, edited 4 times in total.
Reason: Largely rewritten the introduction
floris v
Three ways to get a page style break
There are three ways to move from one page style to another.
1. Manual page break.
Put your cursor at the end of the page before the page for which you want to change the page style. (Note: that doesn't have to be the real bottom of the page. If there's only one line of text on that page, put the cursor at the end of that line.) Select Insert - Manual break, select Page break, click the Style list box and select the page style for the next page. Close the dialog box.
page-en.jpg (16.21 KiB) Viewed 66659 times
This method is fool-proof, it works across conversion to MS Word, and that's saying a lot as Word doesn't have page styles.
2. Link a paragraph style to a page style. Use this if you want all text with paragraph style X at the top of a page - for instance the first page of a chapter or the caption of an page-filling illustration.
Select the paragraph style from the stylist, normally that'll be the Heading 1 style, right click, select Modify, select the Text Flow tab. Tick Insert and With page style and select the page style.
Note: you can also use this method for a single page by applying the formatting to the first paragraph of a page. Select Format - Paragraph - Text flow tab and follow the rest of the instructions above. (Taken from the Writer Guide)
3. Use the Organizer tab of the Page Style dialog box to set a different page style for the next page. An example is the First Page style. Use this for, for instance, the first page of a chapter, to suppress a header with the chapter title over the chapter title.
Last edited by floris v on Tue Jul 15, 2014 10:55 pm, edited 7 times in total.
Reason: Added clarification
Problems with conversion to MS Word
by floris v » Sat Oct 15, 2011 5:32 pm
MS Word doesn't have anything remotely like pages styles. It also doesn't have the chapter title and related fields (until version 97 or so). As a result, conversion of documents loaded with page styles and fields in headers/footers to MS Word format is an exercise in frustration. The only page style break that works is the manual page break mentioned in method 1 above. Word does have a continuous section break with the same purpose as the "soft" page style transition in method 3 above, but unfortunately the developers of OOo aren't aware of that.
Last edited by floris v on Thu Nov 10, 2011 12:46 pm, edited 2 times in total.
Getting page styles to work
On to the last bit, how to use all of this, provided you don't have to convert your file to the MS Word format. Working with page styles requires some planning, so that you don't create a lot of page styles that you don't actually need. Remember that the developers put some serious thought into this. There are several predefined page styles that you may find useful. And you should view all tabs of the page style dialog box, especially the Page, Header and Footer tabs, so that you know what you can do with them. For instance, you can have different content in a header or footer for left and right pages. So, you won't need different page styles for your left and right pages. But if you want to force a new chapter to start on a right page, you can use the Right Page style for just that.
Header on page 1, no header on other pages
Use the First Page style for page 1; enable headers on the Header tab of that style. That's all.
No header on page 1, the same header on all other pages
Same as above, but enable headers for the Default page style.
One page anywhere in the document with header/footer different from the rest of the document
Insert a manual page break at the bottom of the page directly before the page with different header/footer and select the First Page style in the list box (that's because that page style is configured to set the Default page style for the next page). Change the First Page style according to your needs - if you want a header, enable that option, if you don't want it, disable it. If all you want is a different text in the header or footer, enable that option and insert that text on the page where you want it.
No header on the first page of a chapter and on the first pages of the document, for the rest, document title on left pages, chapter title on right pages
Use a separate page style for the first pages without header, the First Page style for the first page of a chapter, Default for the rest.
- First tell Writer what the title of your document is: File - Properties - Description tab - type the title of your manuscript in the Title box. Close the dialog box.
- Make a new page style for the first pages, based on Default, don't change anything except page sizes and margins if they differ from the default settings, apply it to the first page of your document, and now all pages in your document will have that page style. At the end of those pages, insert a manual page break and switch to the Default page style (not necessary if the first page after those pages starts with a heading 1).
- Modify the Default page style: on the header tab tick Header on, un-tick Same content left/right.
- Modify the Heading 1 paragraph style as in 2 above and link it to the First page style. Click in a right page with the Default page style, put the cursor in the header field and Insert - Fields - Other - Document tab - select Chapter - Chapter name (or number and name, whatever). Put the cursor on a left page and Insert - Fields - Other - select Doc information tab - Title.
Return to Writer