From 829d232f35caa11f1d1d4d21a269adf4aab7b9fb Mon Sep 17 00:00:00 2001 From: Georgiy Korneev Date: Sat, 6 Nov 2021 16:18:29 +0300 Subject: [PATCH] hyperref package compatibility fix. The \lastpage@putlabel was replaced by conditional definition of \lastpage@putl@bel, as proposed in section "3.13. Other packages manipulating \lastpage@putlabel" of the lastpage package documentation https://mirror.lyrahosting.com/CTAN/macros/latex/contrib/lastpage/lastpage.pdf --- statements/olymp.sty | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/statements/olymp.sty b/statements/olymp.sty index a2693aa..39ae3ec 100644 --- a/statements/olymp.sty +++ b/statements/olymp.sty @@ -91,10 +91,11 @@ % -- End of setup margins -- %---------- From package "lastpage" ------------------ -\def\lastpage@putlabel{\addtocounter{page}{-1}% +\@ifundefined{lastpage@putl@bel}{ +\def\lastpage@putl@bel{\addtocounter{page}{-1}% \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}}}% - \addtocounter{page}{1}} -\AtEndDocument{\clearpage\lastpage@putlabel}% + \addtocounter{page}{1}}} +\AtEndDocument{\clearpage\lastpage@putl@bel}% %---------- end of "lastpage" ------------------ % -- Setup sizes --