Forum Bugs

Resetting page counter disrupts earlier pages

hsivonen
I am experiencing pagination changes and an unwanted page number reset around a table of contents that uses generated content to refer to later page numbers when I reset the page counter after the table of contents.

Are there know bugs in this area? Any known workarounds? (I'd rather not provide a test case if this is already known.)
hsivonen
I put together a document exhibiting this problem:
http://hsivonen.iki.fi/test/prince-page-reset/

Unexpected things:
* The heading for the table of content ("Interdum" in the lorem ipsum obfuscation) has an uncalled for page break after it (p. 6 in the PDF).
* The page number counter is reset for the table of contents (pp. 7–9 in the PDF) even though I did not as for it.

The weirdness goes away if I delete the last rule from the CSS file (but then the page numbering is not reset when the front matter ends and the proper content starts).

Build: Prince 6.0 (alpha 2007-01-16)
mikeday
It seems that resetting the page counter causes a page break, and does so in both Prince 6.0 and Prince 5.1. I'm unsure as to whether this behaviour is strictly necessary, and it does seem unnecessarily restrictive (and confusing). We shall investigate the issue; thanks for letting us know! :)
hsivonen
But resetting the page counter did not cause an extra break where I wanted to reset the counter (at the h2 for chapter 1 on the 10th PDF page).

The place where the unwanted page break occurred (between the h2 of the TOC and the TOC list itself between the 6th and 7th PDF page) also has a page counter reset that I did not ask for. That is, I wanted to reset the counter only once where the lower Roman numbering ends and the Arabic numbering starts. The earlier reset itself is a bug.
mikeday
If the counter-reset is placed on the first element on the page it probably will not cause an additional page break. The problem with the table of contents is that it has a counter-reset on the <li> that is not the first element on the page.
hsivonen
“The problem with the table of contents is that it has a counter-reset on the <li> that is not the first element on the page.”

Ooh. I am embarrassed. I totally forgot that my TOC generator copies the class to the <li> so using a plain class selector is unsafe. Sorry about the invalid bug report and thanks for letting me know what the real problem was.