[pdftex] How to find the current pdf page number?
tigran at aivazian.fsnet.co.uk
Thu Oct 20 19:49:50 CEST 2005
I use pdfpagelabels with roman page numbers in the beginning and then
switching to arabic for the rest of the document. Now, at the end of the
document I want to insert empty pages with the heading "For Notes" until
the total (physical, i.e. including both roman and arabic ranges) number
of pages is divisible by 16 (or some other signature size).
So, I need to find out the current physical page number. I checked pdftex
manual but couldn't see any such primitive. And TeX \page gives me logical
page number, not physical.
On the other hand, if LaTeX kept separate counters for roman page numbers
and arabic page numbers then I could just add these two and have a
solution that worked for both dvi and pdf case (but I only care about pdf
case so I don't mind if the solution is pdftex-specific).
I guess I could save the value of \page in my own counter before switching
to arabic and then add it at the end to the current \page... But maybe
there is a ready \pdf.... primitive that lets me refer to the _current_
physical pdf page number?
More information about the pdftex