See also my post on the pagination extension.
All right. It's the elephant in the room, and it's time to address it.
How do you have no page number on the first page, then have the second page start with the page number 1 in the footer? Or with page number 42, or 623?
(Or how do you have a landscape page in a portrait document?)
Good question. It's a common one. It's actually not more complex than the tax code, but there's some setup you need to do that's a little more complicated than the task at hand. I would like to see a checkbox/field combination somewhere that would let you specify "For this document, start the page footer on page __ and make the first page number be ___". However, for now, we do it this way.
There are two things to control in this situation:
- Whether there is a page number in the footer--i.e. whether there is any number at all in there, regardless of what it is.
- If there is a page number in the footer, what that page number is.
You control the first with page styles: you set up the page style, say "yes, there's a footer and a page number in it" or "no, no stinkin' page numbers here" and then apply that page style.
You control the second a few different ways. I'm going to show you the most straightforward which is just to create a page break, switch to a different page style, and specify what the page number for that page is.: 1, 42, 623, or anything else.
Let's look at part 1 first. Page styles are actually a really nice, useful feature.
Part 1: Setting Up Page Styles
Bring up the document you're working with. Remove any page breaks you've put in between the first and second pages. This sample document I'm using has some text that clearly goes on a cover page, and then it runs immediately into the content text that should start on page 2.
For any of these images, just click on any of them that are too small for you to read. (They mostly all are, but you might not need to get more detail on all of them.)
Here's my sample document. I want no page number on the first page and page number 1 on the 2nd page.
Choose Format > Styles and Formatting. In that window, click the Page Styles icon at the top.
Right-click in the blank part and choose New. You're going to make the page styles you need.
In the Organizer tab of the page styles window, just name the style something like Cover Page. This is the one with no footer and no page number.
You actually don't need to do anything else. But just to make sure it's clear when we're applying the styles in this procedure, I'm going to suggest that you click the Background tab and give it the light gray background.
Click OK.
Now, right-click in a blank part of the Styles and Formatting window again, and choose New. This time you're creating the other page style, the one for the main body where you're going to have a page number and start it at 1. Call it Main Body or something, in the Organizer tab.
Then click the Footer tab and turn it on by marking the checkbox.
That's all you really need to do, so click OK.
Part 2: Applying a Page Style, Then Switching to Another
Click in the first page of the document, where you want the Cover Page page style. In the Styles and Formatting window, double-click the Cover Page style you created. The style will be applied, as you can tell from the gray background.
The style is applied not only to that page, but to the entire document. That's what's supposed to happen at this point.
Now you're ready to switch. So click to the left of the first word where you want to switch, the first word of the next page usually. Or click to the right of the last word on the current page. Whatever works. Here I've clicked to the left of "Why".
Choose Insert > Manual Break. In the window that appears, just tell it that now you want to switch to the Main Body page style by selecting it in the list.
That second page is also really the first content page of the document, so you'd like it to be page 1. So select the page numbering checkbox and specify 1. (Or any number you want.)
Click OK.
A page break will be inserted where your cursor was, and the new page style you specified, Main Page, will be applied from that page on in the document.
Now, there's one more step. You've already created the footer for that Main Page style, but it's time to put content in it. I.e., the page number. This is easy. Just scroll to the bottom of the first content page (the second page), type the word page and a space if you want, then choose Insert > Fields > Page Number. The page number will appear. And you already specified that on this page where the page style switches to MainPage, the page numbering should restart at 1. So it restarts at 1. (If you had specified page number 42 earlier, this number would be 42.)
That's All There Is To It
Just create the styles you want, apply the first style, then just switch page styles the way we did in this example.
Tips for Landscape and Portrait in the Same Document
To have a landscape page in a portrait document, just create a page style and select the Landscape option of the Page tab. So in this example, you could create a third page style, call it Landscape or Horizontal. Switch to it the way we did here with the manual break, but just don't change the page number.
Tips for Automatic Switching From One Page Style to Another
If you want to automatically switch from one page style to another, you have two options.
In the page style definition window, click the Organizer tab and find the Next Style list. You'll still need to insert manual page breaks sometimes but you won't have to switch styles as we did earlier.
In the paragraph style definition window, click the Text Flow tab and find the section in the middle dealing with creating a page break with a particular page style on the next page.
Or try using all three approaches together.
Thank you for the informative post! I had stopped reading this site because the noise:content ratio was getting a bit high. Just today I decided to see if things had changed. I'm glad I checked. Keep up the great work. I'm submitting this post to StumbleUpon.
Posted by: What is Open Office? | May 08, 2008 at 09:58 AM
I read your post and it immediately answered a question I was about to research on your guidebook, so I was glad to see it. However, after following your instructions in OpenOffice.org 2.4 it resulted in adding a blank page immediately after the first page with Cover Page style, and before my second page, (which correctly displayed page #1 in the footer) with Main Page style.
Try as I may, I could not remove that blank page. Although it does not appear in normal view, it is visible in the preview and by looking at the total number of pages in the lower left side of the screen.
Except for this annoying albeit harmless quirk, it does the trick. However, it would be nice if unnecessary pages were not added. Any idea about what may be wrong?
Posted by: Jose | May 08, 2008 at 06:17 PM
@Jose
Have you checked the following in your 2 page styles?
Page tab -> Page Layout
Make sure this is not "only left" or "only right." If it is, this will automatically insert blank pages into your document. Changing it to "right and left" should correct the problem.
Posted by: Nathan | May 11, 2008 at 01:37 AM
Thanks for the suggestion, Nathan.
I did check and it is "right and left".
I tried it several times, within a template I made and with new documents based on the default template and it still inserts a blank page when I insert a manual break, and switch to the Main page style and re-start page numbers.
Any other ideas where I should look? Does anybody else have the same issue?
Posted by: Jose | May 12, 2008 at 06:30 PM
Great stuff.
Posted by: Course Trainer | May 14, 2008 at 06:03 AM
This is just terrible. I spent over an hour trying to get footers and page numbers right. My document kept on changing the footer to including page numbers only on odd pages, and then suddenly the footer would appear on the cover sheet, and so forth. It seemed to have a mind of its own.
The way to acrobatically dodge this grotesque user-interface trap is to make sure you choose the 'next style' option when choosing your page style. Otherwise, the next page reverts to something you don't want.
I try to never use microsoft word, but I'm tempted to revert after this experience.
Posted by: John | November 30, 2008 at 10:04 PM
Hi John,
Page styles are definitely harder than they need to be. But they can be managed, either with Next Style (IF AND ONLY IF you just need to have the style applied to one page before it switches to the next style), or by choosing Insert > Manual Break and selecting the page style to switch to, whenever you want to switch from one page style to another. The latter is the more controllable, reliable approach.
Your page styles need to be set up the way you want them. In the header and the footer, look at the checkbox for "same content left-right." If it's not marked, then you need to put content on both sides. If you want content on both sides, then mark it.
The best thing to do if your document seems to be acting crazy is to delete any page breaks, then just start from the first page, apply the correct page style, then switch to the next one with Insert > Manual Break and select the page style to switch to, and so on.
Solveig
Posted by: solveigh | December 01, 2008 at 06:15 AM