You may have bumped into a bug I didn’t suspect! Anyway, something is definitely broken in your document because it crashes my 7.3.5.2 Writer whenever I try to edit your page break. EDIT: this crash is tdf#150629 and will be fixed in 7.4.1.
Your document is made of:
- a title page under First Page page style,
- a manual page break forcing page style Default Page Style with page number restarted from one
- several pages under Default Page Style
Spurious page break
Both page styles are “ordinary” page styles for right and left pages.
First Page is configured to switch automatically to Default Page Style when end of page is reached. This condition may be enabled with a manual page break. However, if you specify a page number in the page break (this is necessary to be able to force a page number after the break), it looks like this causes a second page break:
- the first page break is the consequence of the page style switch after the manual break
the second page break results from the consideration for the requested page style, Writer not seeing that it is the same as the one currently active
I tried to circumvent the mishap by encoding the page break in Text Flow
tab of Contents Heading paragraph style but I get the same behaviour.
I experimented in a blank document to make sure page styles were configured “as usual”, with controlled page breaks and the same phenomenon occurs. So this is a bug, unless developers explain the behaviour.
EDIT
This was already reported in tdf#137035. The behaviour is considered “normal” to preserve page parity: right pages have always odd numbers and left pages even numbers. However, since I consider there are cases where we print single-sided, I filed tdf#150913 to challenge the dismissal of the previous bug report.
END_EDIT
Page count
Field page count returns the total number of pages. Consequently, you can’t ignore the cover page and any automatically added blank pages to keep only the number of “internal contents” pages. Your document has either 3 pages (without the spurious page break) or 4 pages (including the added blank pages. It never has 2. You can’t print x/2 in the footer.