[latex3-commits] [git/LaTeX3-latex3-latex2e] OR-lab: drop stray } and fix bug in perpage (095d9690)

Frank Mittelbach frank.mittelbach at latex-project.org
Tue Mar 8 15:21:40 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : OR-lab
Link       : https://github.com/latex3/latex2e/commit/095d96902e08ff912ec1ffcdf4a5078482425dd4

>---------------------------------------------------------------

commit 095d96902e08ff912ec1ffcdf4a5078482425dd4
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Mar 8 15:21:40 2022 +0100

    drop stray } and fix bug in perpage


>---------------------------------------------------------------

095d96902e08ff912ec1ffcdf4a5078482425dd4
 required/latex-lab/latex-lab-footnotes.dtx | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/required/latex-lab/latex-lab-footnotes.dtx b/required/latex-lab/latex-lab-footnotes.dtx
index 499777e0..aa28f474 100644
--- a/required/latex-lab/latex-lab-footnotes.dtx
+++ b/required/latex-lab/latex-lab-footnotes.dtx
@@ -1313,7 +1313,7 @@
   \newbox\FN at tempboxb
   \newbox\FN at tempboxc
   \newskip\footglue \footglue=1em plus.3em minus.3em
-  }
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   \newdimen\footnotebaselineskip
 
@@ -1364,9 +1364,26 @@
 %    \begin{macrocode}
   \def\@stpelt#1{\global\csname c@#1\endcsname \m at ne
     \stepcounter{#1}%
-    \setcounter{#1}{0}%
+    \pp at fix@MakePerPage{#1}%
+  }
+  \def\pp at fix@MakePerPage#1{%
+      \ifnum \value{#1}>\z@
+        \addtocounter{#1}\m at ne\fi
   }
-  \def\pp at cl@end at iii\stepcounter#1\setcounter#2#3{}
+%    \end{macrocode}
+%    The above code may look a bit odd: the \cs{stepcounter} sets the
+%    counter to zero and then we alter it if it is not zero.  The
+%    reason is that \cs{stepcounter} resets other counters and when
+%    perpage is loaded this results in updating counters on the reset
+%    list to 1 (or to a higher starting value if \cs{MakePerPage} is
+%    used with an optional argument, which is precisely the problem
+%    here. By subtracting 1 in that case we set it back to 1 lower
+%    than the starting value.
+%
+%    But to make this fully work we also need to update a support
+%    command in \pkg{perpage}:
+%    \begin{macrocode}
+  \def\pp at cl@end at iii\stepcounter#1\pp at fix@MakePerPage#2{}
 \fi
 
 





More information about the latex3-commits mailing list.