# Page number offset & page count

When I use the method here to change the cover page of a document to page 0, the "Page Count" Field in the footers of the remaining pages increases by one. The entire entry in the footer is Page <Page Number> of <Page Count>. So in a document that just contains the cover page and one more page, it changes from "Page 2 of 2" to "Page 1 of 3".

I really need it to say "Page 1 of 1", but even barring that I can't have it suggesting there are pages that don't exist. Does anyone have any idea how to fix this, other than manually maintaining the page count number in the footer?

edit retag close merge delete

Well, for page count, you could use a formula field (F2), and put there formula page-2. This compensates the cover page and one automatically inserted odd page for document starting with even page (#0). Even if you'd let the cover to have #1, and reset your second page to also have #1, the extra page would still be inserted (between two sequential odd pages).

( 2018-02-14 15:58:44 +0200 )edit

Thanks, I figured I'd need to use a formula but didn't know how. Plus I never would have imagined the variable for Page Count would be page... seems like that should be the variable for Page Number, and pages the variable for Page Count.

( 2018-02-14 16:49:41 +0200 )edit

Sort by » oldest newest most voted

Edit: For now I'm sticking with this, but see warning from @ajlittoz about offset.

For <Page Number>, I used the built in 'Page Number' Field with an offset of -1 (double-clicking the Field allows setting the offset). For <Page Count> I used a formula as suggested by Mike Kaganski.

The method for renumbering pages (linked in OP) didn't survive save and reload, which is just fine because the whole 'phantom page' thing would have driven me bananas.

more

You should never use offset to tweak the current page number. The offset box is intended for references like "See page <current page + offset>". Writer checks that the designated page exists and, if none, returns a void value, which is not what you expect for your renumbered page. Offset is a generalisation of "next page"/"previous page" or "above"/"below" in cross-references.

( 2018-02-14 17:59:40 +0200 )edit

@ajlittoz: Fair warning for others, but since it's apparently the only way to do what I need to do - at least with persistence and without wacko side effects - I'm going to stick with it.

( 2018-02-14 18:32:03 +0200 )edit