Writer: bad page numbering sequence

A complex document shows duplicate page numbers instead of monotonously increasing page numbers.

The document is made of “logically independent” parts: cover page, TOC, chapters, index, licence. Switching from one part to another is controlled with a mixture of page styles (for general page layout) and paragraph styles (for semantic markup).

Styles used in document

  • Page styles

Every part is formatted under pairs of styles names xxxStart (first page) and xxx (running page). xxx is defined as the follow-on style with Next attribute in Organizer tab.

Page number style (roman or numeric) is defined in Page tab.

  • Paragraph styles

Some “important” paragraph styles cause a page break to occur through the Breaks attribute in Text Flow tab.

This is the case, for instance, of Heading 1 to switch to page style ChapterStart.

Some styles also force page number to restart from 1, e.g. ContentsStart so that TOC is numbered separately with roman numbers.

Description of bug

TOC, chapters and index are all numbered as expected. However, the licence part (last part of document if this is relevant) numbers i, i, ii, iii, … showing duplication of first page number i. Page styles are LicenceStart and Licence.

If page style in paragraph style definition causing the break is changed for any other (contents or index styles), behaviour is the same (duplication present, while there is no duplication in the first use – TOC or index). If changed for chapter, numbering is continuous as expected. But, if page numbering is forced to reset to 1, then a blank page is inserted between pages 1 and 2 of licence, as if follow-on style Chapter was required to start on a right (odd) page! Sequence is now: 1, blank, 3.

Context

This occurs with LO Writer 5.x and 6.x. My OS is Linux/KDE (Fedora distro).

Misbehaviour has been confirmed by @David (x) as a side-test of this question related to a different topic.

I think I’m quite familiar with styles but since I’ve been struggling against this annoyance for too long, I’m now unable to see any mistake I could have made (I read now what’s in my head instead of what’s on screen).

Could anybody review my styles and give me some insight on what I did wrong? Or at least give me clues?

Here is a sample document: LO-pagenumber-issue.odt with more details inside.

Updated 2018-03-27 only to correct typos and misspellings

(x) Caution: link is faulty and points to a 1-karma user “david” instead of guru 4500+ karma user “David”

EDIT 2018-06-02

After further experimentation and procedure suggested by @RichardG1, I still have the problem. But, it seems paragraph style GNU FDL Title plays an important part. This style contains a manual break to switch to LicenceStart page style with page number 1 forced. If I however force page number to 25, the sequence is 25, 1, 2, 3, … as if the first page had an existence on its own. If the page style is changed to any other, the sequence is still faulty as 25, 1, 2, 3, … Still analysing.

EDIT 2018-06-04

Finally found a work around.

I removed the break from the Text Flow tab of the paragraph style and replaced it with the same properties by a direct formatting with Insert>Manual Break. It survives across save-close-reopen.

Question to wise developers who happen to navigate on this site: is this a bug? If you think so, I’ll report it.

I am not certain that you are actually doing anything wrong. But this may not be the answer you were looking for.

I quote from the Writer Manual – Chapter 5 Formatting pages – Restarting page numbers.

Note: You cannot assign an odd page number to a left hand page or an even page number to a right page. LibreOffice strongly adheres to the convention that odd page numbers go on right-hand pages and even page numbers on left-hand pages.

=======

This is the normal printing convention as a quick look of any printed book will confirm.
However, you can suppress the printing of blank pages on say, a single sided printer when exporting to PDF or printing on your own printer. So you will not be printing blank pages.

Thanks for the hint, but, right, this is not the expected answer.

xxxStart page styles are all constrained with *Right only", so restarting from 1 is consistent.

Document is intended to be duplex-printed, consequently I don’t mind blank pages to sync with page number parity. On the contrary, they are welcome.

Regards

Assuming you want the licence to appear as page iii …(?)

Right click on ‘Gnu Free Documentation Licence’, select ‘paragraph’ from the popup menu, select ‘text flow’ and clear the ‘page number’ tick box. Page number will disappear. Repeat on the process on the paragraph style ‘GNU FDL Title’ and the page number reappears, this time as page iii.

No, I indeed want the licence to be numbered starting from 1 (i) as a section independent from the Index. I tried to clear the text flow properties (resulting in continuous numbering with the Index) as per your suggestion and then re-set the values, but I still get the i-i-ii-iii-iv sequence with page number i duplicated.

Mmm. Odd. I deleted the two page styles, saved and quit. I then recreated the two styles from scratch and applied them … got exactly what you expected … page 1,2,3,etc. Saved and quit. However on restarting, the issue showed up again, suggesting the problem lies in either the save or load process.

Repeated … this time, prior to deleting the page styles, I deleted the header and footer. On recreating (using the Index/IndexStart as templates), I ended up with no header or footer in the Licence/LicenceStart styles. On recreating the footer, this time I’ve got exactly what you’re after - and it stood up through save/quit/reload, suggesting that something in the header/footer is carrying through page style recreation. The trick therefore seems to be to delete them from the page style first.

Proceeded as described, but still get the duplication. Weird enough: instead of linking LicenceStartLicence, I just played with some brand new Licence and get the duplication!!!

I’m looking for something rotten in the licence text itself, but I have no direct formatting here. I’ll try deleting paragraphs one after another to see when it stops.

I’ve also analysed the XML but saw nothing unusual.