pombreda / rst2pdf

Automatically exported from code.google.com/p/rst2pdf
Other
0 stars 0 forks source link

The total page count is wrong if the TOC makes the contents move to another page #440

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The number of pages shown by the ###Total### magic token is one too large. I 
have created a document without any page counter modifications. It contains a 
title page which does not show the number, but the page after it has the number 
2, so the title page is counted as number 1. The last page of the document has 
the number 30, but when I add a footer with the contents "Page ###Page### / 
###Total###", it always shows something like "Page 3 of 31".

The version of rst2pdf I use is 0.16 from the Ubuntu package of Ubuntu 11.10.

Original issue reported on code.google.com by wolfgang...@gmail.com on 14 Mar 2012 at 9:31

GoogleCodeExporter commented 9 years ago
I have this issue too. The preamble pages are written as i, ii...iv, but are 
not subtracted from the total.
For me this means the end of the document says at the end, "210 of 228". 
My title/contents pages are labelled with roman numerals, but when normal 
numbering starts it is at 1 (different to above)

Original comment by c.cowlr...@gmail.com on 19 Apr 2012 at 5:28

GoogleCodeExporter commented 9 years ago
Same issue here. The error appears in my case only when the table of content 
spawns over multiple pages. On single page TOC, the total number is correct.

Original comment by alfred.w...@gmail.com on 15 May 2012 at 1:46

GoogleCodeExporter commented 9 years ago

Original comment by roberto.alsina on 26 May 2012 at 2:38

GoogleCodeExporter commented 9 years ago
@wolfgang.silbermayr If you have a title page, it *is* page 1. If you want the 
following page to be page 1 you have to reset the counter before the first 
"real" page.

The rest of the reports look like a bug, I will try to reproduce and do a fix 
ASAP.

Original comment by roberto.alsina on 26 May 2012 at 2:40

GoogleCodeExporter commented 9 years ago
This is really tricky to fix. Currently, ###Total### is always replaced with 
the page count for the whole document, that's why it is off.

To make it behave correctly, every time the counter is reset to 1, the previous 
page would need to be marked as a place where the total page counter is reset 
as well.

I say "reset to 1" because it's easy to make it do stuff that makes no sense, 
for example a 1-page document with that page labeled "4". What's the page count 
for it? 1? So "Page 4 of 1"?

Original comment by roberto.alsina on 9 Jun 2012 at 12:39

GoogleCodeExporter commented 9 years ago

Original comment by roberto.alsina on 18 Dec 2012 at 7:34