[pdftex] ambiguous \pdfpageref

Alexander Grahn A.Grahn at fz-rossendorf.de
Wed Dec 8 09:02:57 CET 2004


Thank you, Hans and Rolf, for pointing me to the `count1to' package. I
studied it and worked out the following solution, using the `everyshi'
package together with a LaTeX counter. Do you think this approach is
robust enough?

\documentclass{book}
\usepackage{everyshi}

\newcounter{absolutepage}% absolute page number
\AtBeginDocument{\stepcounter{absolutepage}}% first page `1' not `0'
\EveryShipout{\stepcounter{absolutepage}}%

\begin{document}
    \pagenumbering{roman}
    Page object: \pdfpageref\value{absolutepage}\\
    \newpage
    \pagenumbering{arabic}
    Page object: \pdfpageref\value{absolutepage}\\
\end{document}

Alexander



More information about the pdftex mailing list