texlive[62524] Master/texmf-dist: footmisc (8mar22)

commits+karl at tug.org commits+karl at tug.org
Tue Mar 8 22:25:37 CET 2022


Revision: 62524
          http://tug.org/svn/texlive?view=revision&revision=62524
Author:   karl
Date:     2022-03-08 22:25:37 +0100 (Tue, 08 Mar 2022)
Log Message:
-----------
footmisc (8mar22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/footmisc/changes.txt
    trunk/Master/texmf-dist/doc/latex/footmisc/footmisc-code.pdf
    trunk/Master/texmf-dist/doc/latex/footmisc/footmisc-doc.pdf
    trunk/Master/texmf-dist/source/latex/footmisc/footmisc.dtx
    trunk/Master/texmf-dist/tex/latex/footmisc/footmisc.sty

Modified: trunk/Master/texmf-dist/doc/latex/footmisc/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/footmisc/changes.txt	2022-03-08 21:25:06 UTC (rev 62523)
+++ trunk/Master/texmf-dist/doc/latex/footmisc/changes.txt	2022-03-08 21:25:37 UTC (rev 62524)
@@ -1,3 +1,8 @@
+2022-03-08  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* footmisc.dtx (subsection{The other footnote commands}):
+	Also support optional arg of \cs{MakePerPage} (gh/03)
+	
 2022-03-07  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* footmisc.dtx (subsection{The other footnote commands}):

Modified: trunk/Master/texmf-dist/doc/latex/footmisc/footmisc-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/footmisc/footmisc-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/footmisc/footmisc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/footmisc/footmisc.dtx	2022-03-08 21:25:06 UTC (rev 62523)
+++ trunk/Master/texmf-dist/source/latex/footmisc/footmisc.dtx	2022-03-08 21:25:37 UTC (rev 62524)
@@ -38,7 +38,7 @@
 %<+package>\DeclareCurrentRelease{}{2022-02-14}
 %<package>\ProvidesPackage{footmisc}%
 %<*!debugins>
-        [2022/03/07 v6.0c
+        [2022/03/08 v6.0d
 %</!debugins>
 %<package>     a miscellany of footnote facilities%
 %<*dtx>
@@ -1865,24 +1865,31 @@
 %    resets footnotes at each chapter start. As a result the first
 %    footnote on the first page of a chapter starts with 2. We
 %    therefore alter one \LaTeX{} internal if \pkg{perpage} is in use:
-% \changes{v6.0c}{2022/03/07}{Fix an issue in perpage packag (gh/03)}
+% \changes{v6.0c}{2022/03/07}{Fix an issue in perpage package (gh/03)}
+% \changes{v6.0d}{2022/03/07}{Also support optional arg of \cs{MakePerPage} (gh/03)}
 %    \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
+  }
 %    \end{macrocode}
-%    The above code may look a bit odd: the \cs{stepcounter} sets
-%    the counter to zero and then the \cs{setcounter} does the
-%    same. 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, which is precisely the problem here. So
-%    the second \cs{setcounter} undoes this if it happens.
+%    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 suport
+%    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\setcounter#2#3{}
+  \def\pp at cl@end at iii\stepcounter#1\pp at fix@MakePerPage#2{}
 %    \end{macrocode}
 %
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/tex/latex/footmisc/footmisc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/footmisc/footmisc.sty	2022-03-08 21:25:06 UTC (rev 62523)
+++ trunk/Master/texmf-dist/tex/latex/footmisc/footmisc.sty	2022-03-08 21:25:37 UTC (rev 62524)
@@ -43,7 +43,7 @@
 \DeclareRelease{v5}{2011-06-06}{footmisc-2011-06-06.sty}
 \DeclareCurrentRelease{}{2022-02-14}
 \ProvidesPackage{footmisc}%
-        [2022/03/07 v6.0c
+        [2022/03/08 v6.0d
      a miscellany of footnote facilities%
                    ]
 
@@ -477,9 +477,13 @@
   \MakePerPage{footnote}
   \def\@stpelt#1{\global\csname c@#1\endcsname \m at ne
     \stepcounter{#1}%
-    \setcounter{#1}{0}%
+    \pp at fix@MakePerPage{#1}%
   }
-  \def\pp at cl@end at iii\stepcounter#1\setcounter#2#3{}
+  \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\pp at fix@MakePerPage#2{}
 \fi
 \ifFN at para
 \else



More information about the tex-live-commits mailing list.