8

It seems that zref-abspage and perpage both defines the abspage counter so

\documentclass{article}
\usepackage{perpage}
\usepackage{zref-abspage}
\begin{document}
This is a test 
\end{document}

would produce error.

How should this be fixed? it seems that changing loading order will fix it.

2 Answers 2

10

Yes, I know it already and have prepared version 3.0 of zref. In zref-abspage I rename the counter to zabspage. Also I take the opportunity of the major version step to change the way, the counter is increased. Before version 3.0 the counter is increased during shipout time via \AtBeginShipout, that means that in the output routine the counter is not yet updated to the value for the page like counter page. With version 3.0 the counter zabspage shows to the next page number and it is increased after the shipout like the behaviour of counter page.

Because I have not finished the work on other parts of the bundle, the next release of my bundle will be later in the year.

1
  • @GonzaloMedina Currently both packages wants to use the same counter name, but incrementing it at different times. Thus I can't see, how savesym can be of help here. Commented Oct 29, 2012 at 2:18
1

Old question, but others may bump into this, as bigfoot and manyfoot use perpage.

Apparently, this change has never been incorporated into zref-abspage, nor will it be: https://github.com/ho-tex/zref/issues/3#issuecomment-564498677 .

A possible workaround:

\usepackage{etoolbox}
\makeatletter
% First fool perpage into thinking the counter is already defined
\def\c@abspage{INVALID PLACEHOLDER}
\RequirePackage{perpage}
% Now create an alternative counter name...
\AddAbsoluteCounter{pp@abspage}
% And redefine the perpage macro that uses it.
\def\theabspage{\ifx\thepage\relax
    \noexpand\thepp@abspage
  \else
    \number\c@pp@abspage
  \fi}
% Finally, clean up the mess we did.
\undef{\c@abspage}
\makeatother
0

You must log in to answer this question.