« Using the Gallery to Set Up Frequently Used Images for UML Diagrams, D&D Maps, and Anything Illustrated | Main | How to Create Your Own Toolbar, and Manage 2.0 Icons and Toolbars »

December 12, 2005

Starting Page Numbering on Page 2, and Other Ways to Mix Page Styles in a Document

Logo_pagestyle

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.

Page_1

Choose Format > Styles and Formatting. In that window, click the Page Styles icon at the top.

Page2_1

Right-click in the blank part and choose New. You're going to make the page styles you need.

Page3_1

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.

Page4_1

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.

Page5

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.

Page6

Then click the Footer tab and turn it on by marking the checkbox.

Page7

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.

Page8

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".

Page9

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.

Page10

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.)

Page_changepagenumber

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.

Page_showingchange

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.)

Page11

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.

Tip1_1

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.

Tip2_1

Or try using all three approaches together.




TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341cdb1753ef00d8346811e569e2

Listed below are links to weblogs that reference Starting Page Numbering on Page 2, and Other Ways to Mix Page Styles in a Document:

Comments

Great tutorial, worked fine for me :)

Thanks for the nice help.

Hi there,

When I Insert my second style at the point where I want to change, I end up with a blank page ( which makes sense as I'm inserting a page break ). But then when I try to delete this page the formating reverts back. Can't seem to make it stick !

cheers, Dave

Hi Dave,

Yes, I think that's just the way it's supposed to work. The page break is like a dam in a river; remove the dam and the formatting just floods down into the rest of the document.

You might want to keep the page break and just change the page style (if you need to) by clicking in that second page and double-clicking the page style you want.

Solveig

It works for Openoffice writer, but how do I apply this technique in Openoffice calc?

>> It works for Openoffice writer, but how do I apply this technique in Openoffice calc?

Good question. Choose Format > Page, click the sheet tab, and specify a number in First Page Number.

Why didn't you just use the "First Page" style, instead of creating a new page style? I just tried using "First Page", and "Default" and they seem to work well with my needs. The reason that I bring this up is because it helps the new users when they can just use what is already there. It lowers the learning curve. Would you be willing to change that in your tutorial, to reflect that they can use "First Page", and "Default", instead of "Cover Page", and "MainPage"?

Also, I just found out that when we use manual breaks, it seems that we can have our cover pages be at the end of our documents, and thus, the "First Page" style can also be applied to the last page of the document. This is very handy. Thanks! This manual break feature is what I've been looking for, for quite some time. I thought that Ctrl+Enter was the same as Manual Break, but I guess not. I've been wrestling with this page numbering problem for a while for an assignment. I wanted to make a first page, then an automatic table of contents, then the default pages, but there was no way to specify when to automatically switch from a table of contents without a page number in the header, to a default page with a page number in the header. Now that I know about manual breaks, it seems that I can do it easily.

Hi,when I new a cover page which has not footer and header,the doc has 1 page only.But when I insert another page with some specific style from Insert->manual break with "change page number" starting from a number =4 ,the doc has 2 pages.I can't be sure this is a bug.

Hi,when I new a cover page which has not footer and header,the doc has 1 page only.But when I insert another page with some specific style from Insert->manual break with "change page number" starting from a number less than 4 ,the doc has 3 pages,which can be seen from status bar.If string from a number greater than 3,the doc has 2 pages.I can't be sure that if this is a bug.

Hi Chipha,

>> Hi,when I new a cover page which has not footer and header,the doc has 1 page only.But when I insert another page with some specific style from Insert->manual break with "change page number" starting from a number less than 4 ,the doc has 3 pages,which can be seen from status bar.

Go to Format > Page, Page tab, and in Page Layout on the right see if it is set to Only Right or Only Left. Set it to "Right and Left" and see if that helps.

Also, create a new empty document and see if that document is how you want it. Then just go through all the settings in the Page window to compare.

If you're using styles that create a new page break (Format > Paragraph > Text Flow), that might affect it, too.

If you're using page styles that have another style specified as Next (Format > Page > Organizer, Next Style) that might also be a factor.

Good luck!
Solveig

This is amazing, I've been fighting with OOo and page styles for since I use it. It's an elegant way of using them.

You solved my problems with the numeration too.

Thanks

Hi Xavier,

Great! I'm glad it was useful.

Solveig

It works -- until I try either printing, or a Print Preview. Then it is clear that OOW has added a blank page after the cover. In this document, the first page is page-style Didache Cover Page, with no footer, and subsequent pages are Didache Main Body, with footer. I have checked and rechecked all of the above. Is there a way to get rid of that invisible cover sheet?

Hi Jonathan,

Try checking the odd/even settings for each page style. Format > Page, and under the Header and the Footer tabs, see if the Same Content Left/Right options are checked. If they're not, check them and then see if that helps.

Solveig

Hi! Thanks so much for your blog, it's been a life-saver!

I've got this manual break/new page style method to work well, and have used it repeatedly. However, I've got a draft document with a table of contents page, and then the actual text of the document. The page numbering starts with page 1 on the first page of text, but in the automated table of content, it's showing up as page 2.

I can't seem to find a way to either:

Change the table of contents settings so it uses the page numbering as the document itself is showing, or;

Change the page number on the actual text pages back so that the TOC page is counted and the text starts on page 2, thus making the TOC numbering match what is on the pages.

Is there a way to change the starting page number *after* the text is already written?

Hi Gayze,

Thanks for writing, I appreciate it.

The first thing I can think of is just updating the TOC. Select part of it, right-click and choose Update.

Whew! Complicated! But exactly what I wanted to know. Thanks.

Yeah, it's a little complex. ;> Oh well. You can use existing styles (and modify them if necessary) or create your own.

Sorry this does not work.
How do you get rid of this inserted blank page. Page 1 is always a RH Page seems to be the issue.

"Hi Jonathan,

Try checking the odd/even settings for each page style. Format > Page, and under the Header and the Footer tabs, see if the Same Content Left/Right options are checked. If they're not, check them and then see if that helps.

Solveig"

Hi Solveig,

I have a little different problem. My doc has a cover page without page number, 7 introductory pages (table of contents, table of figures, preface, acknowledgements, etc...)that are numbered with roman symbols (i,ii,iii,iv,v,...), and follows the chapters, that must be numbered with arabic symbols beginning with 1 (1,2,3,4,5...). I have tried a lot of style compositions with no success. Can you help me?

Thank you so much for posting this; it was extremely helpful to me.

Yeah, real helpful, thanks guys! :) dont forget those page breaks tho!

Hi

I am having the same problem as Chiphi, Jonathan E. Brickman and Andre.

If you have the first page in the "First Page" style, and insert a manual break to change to the "Default" style with a page number of 1, then OOo inserts a blank page.

You do not see this in the document. You see it if you go File|Page Preview -- it has a big "blank page" shown in the middle of it.

This would make sense if you (a) want the Default section to start on a new sheet AND (b) are printing to a printer that has an automatic duplexing unit. It does not make sense otherwise. In particular, when you export to a pdf (which I have to for submitting college assignments), there is no reason for a blank page. But I cannot get rid of it! My First Page style definitely has "Right and left" turned on, although I have tried "Only right" and "Only left" as well, to see if that changed anything. I could get the blank page to be the first, rather than second page, but I could not get it to go away. Incidentally, putting "only right" (or left) settings on the Default style gave me a spurious blank page in between every page of the document!

I'd be glad if anyone could post a way around this!

I think Carlos E. F. Roland's problem is solvable in this way: create 3 page styles, one for first page, one for the pages with Roman numbering, and one for Arabic numbering. In the "Page" tab of the page style for the section with Roman numbering, change "Format" to "i, ii, iii...". Change from one style to the next using "Insert|Manual Break|Page Break" as described, and change the page number to 1 each time. Use the "Insert|Indexes and Tables|Indexes and Tables..." to insert a contents. If necessary, turn off the "Create from Outline" and use "Insert|Indexes and Tables|Entry" at each chapter, to create an entry in the Table of Contents only for those pages that you want in the contents -- "Create from Outline" automatically creates the right table for what I right but it might not be right for you.

HTH

Frank

To Frank, Chiphi, Jonathan E. Brickman and Andre:

I was having the exact same problem. I wanted to convert an Open Office document into a PDF file to hand in an essay digitally. The solution that worked for me is very simple: do not use "export directly as PDF", but rather "File > Export as PDF > ...[fill in file name & push 'export']...

Now you have options to choose from. In the "Pages" section of the PDF option dialog box that appeared, choose "range" and exclude the blank page(s), e.g. "1-3,4-25" to exclude the blank page being page 4 in the document. You can check which page numbers are blank pages in File > Page Preview.

Good luck!

Thanks Barabas

Good idea, I didn't think of that - but I've found a solution too :) so I came back to post it...

Upgrade to v2.0.4 -- it was a bug, and they fixed it.

There is a new option in Tools|Options, OpenOffice.org Writer section, Print dialogue, under the "Other". The option is called "Print automatically inserted blank pages" and it does what it says. In particular, it only affects printing, not PDF generation.

For outputting to PDF, there is a similar option on the "PDF Options" dialogue which pops up before the PDF is generated -- except that it's called "Export automatically inserted blank pages" instead of "Print...". It's right at the bottom of the dialogue and it does not get cleared if you clear the "Print..." checkbox I mentioned earlier.

I was using whatever version came with Mandriva 2006 (OOo 2.0.1, I think), because an upgrade would take too long to come through the modem. But OOo 2.0.4 was on the DVD that came with the latest Linux Format magazine, so I upgraded and now all is well.

Cheers

Frank

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment