From 758d081616cf84542274f8f83ea3934921a90410 Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Thu, 26 Apr 2018 10:37:06 +0100 Subject: [PATCH] Use totpage for obtaining the page number of the last page, if totpage is already loaded (e.g., acmart loads totpage automatically). --- authorarchive.sty | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/authorarchive.sty b/authorarchive.sty index 5905fd9..666f92d 100644 --- a/authorarchive.sty +++ b/authorarchive.sty @@ -192,8 +192,12 @@ pdftitle = {\@title}, } -\RequirePackage{lastpage} - +\@ifpackageloaded{totpages}{% + \def\aa@lastpage{TotPages} +}{% + \RequirePackage{lastpage} + \def\aa@lastpage{LastPage} +} \newsavebox{\AA@authoratBox} \AddToShipoutPicture*{% @@ -215,7 +219,7 @@ }% \parbox{\AA@width-1.4cm}{\authorcrfont% \ifAA@LNCS% - \AA@publication, pp. \thepage--\pageref{LastPage}, \AA@year. + \AA@publication, pp. \thepage--\pageref{\aa@lastpage}, \AA@year. \ifAA@nocopyright\relax\else \textcopyright~\AA@year~\AA@publisher. \fi @@ -251,7 +255,7 @@ by permission of \AA@publisher{} % \fi for your personal use. Not for redistribution. The definitive - version was published in \emph{\AA@publication}, pp.~\thepage--\pageref{LastPage}, \AA@year% + version was published in \emph{\AA@publication}, pp.~\thepage--\pageref{\aa@lastpage}, \AA@year% \ifx\AA@doi\@empty% \ifx\AA@publisherurl\@empty% .%