texlive[72880] Master/texmf-dist: normal footnotes with manyfoot,

commits+karl at tug.org commits+karl at tug.org
Sun Nov 17 22:31:26 CET 2024


Revision: 72880
          https://tug.org/svn/texlive?view=revision&revision=72880
Author:   karl
Date:     2024-11-17 22:31:26 +0100 (Sun, 17 Nov 2024)
Log Message:
-----------
normal footnotes with manyfoot, tex4ht r1596

Revision Links:
--------------
    https://tug.org/svn/texlive?view=revision&revision=1596

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/manyfoot-hooks.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-11-17 21:20:53 UTC (rev 72879)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-11-17 21:31:26 UTC (rev 72880)
@@ -1,3 +1,9 @@
+2024-11-17  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (manyfoot-hooks.4ht): fixed normal footnote numbers
+	after use of custom footnotes.
+	https://tex.stackexchange.com/a/731038/2891
+
 2024-11-10  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (caption.4ht): declare caption hooks only if they

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2024-11-17 21:20:53 UTC (rev 72879)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2024-11-17 21:31:26 UTC (rev 72880)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1595 2024-11-10 19:20:38Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1596 2024-11-17 16:26:25Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2024 TeX Users Group    
@@ -38525,18 +38525,27 @@
 commands, and redefines them to produce normal footnotes, just with 
 changed footnote mark. 
 
+As we call original \''\footnote', we must also take care of the footnote
+counter.
+
 See \Link[https://tex.stackexchange.com/a/729975/2891]{}{} this answer\EndLink 
 for an example.
 
 \<declare manyfoot footnote\><<<
 \let\o:MFL at declare:\MFL at declare
+\newcounter{orig:footnote}
 \def\manyfoot:declarefn#1{%
   \expandafter\renewcommand\csname footnote#1\endcsname[1]{%
     \stepcounter{footnote#1}%
+    \let\:origthefootnote\thefootnote%
+    \setcounter{orig:footnote}{\c at footnote}%
     \renewcommand\thefootnote{\csname thefootnote#1\endcsname}%
     \footnote{##1}%
+    \let\thefootnote\:origthefootnote%
+    \setcounter{footnote}{\c at orig:footnote}
   }%
 }
+
 \def\MFL at declare#1#2[#3]{%
   \o:MFL at declare:{#1}{#2}[#3]%
   \manyfoot:declarefn{#2}%

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/manyfoot-hooks.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/manyfoot-hooks.4ht	2024-11-17 21:20:53 UTC (rev 72879)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/manyfoot-hooks.4ht	2024-11-17 21:31:26 UTC (rev 72880)
@@ -1,4 +1,4 @@
-% manyfoot-hooks.4ht (2024-11-01-14:51), generated from tex4ht-4ht.tex
+% manyfoot-hooks.4ht (2024-11-17-13:28), generated from tex4ht-4ht.tex
 % Copyright 2024 TeX Users Group
 %
 % This work may be distributed and/or modified under the
@@ -16,18 +16,24 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2024-11-01-14:51}
+\immediate\write-1{version 2024-11-17-13:28}
 
 
 \:AtEndOfPackage{%
 \let\o:MFL at declare:\MFL at declare
+\newcounter{orig:footnote}
 \def\manyfoot:declarefn#1{%
   \expandafter\renewcommand\csname footnote#1\endcsname[1]{%
     \stepcounter{footnote#1}%
+    \let\:origthefootnote\thefootnote%
+    \setcounter{orig:footnote}{\c at footnote}%
     \renewcommand\thefootnote{\csname thefootnote#1\endcsname}%
     \footnote{##1}%
+    \let\thefootnote\:origthefootnote%
+    \setcounter{footnote}{\c at orig:footnote}
   }%
 }
+
 \def\MFL at declare#1#2[#3]{%
   \o:MFL at declare:{#1}{#2}[#3]%
   \manyfoot:declarefn{#2}%



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