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.