[tex4ht-commits] [SCM] tex4ht updated: r1596 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Sun Nov 17 17:26:26 CET 2024
Author: michal_h21
Date: 2024-11-17 16:26:25 +0000 (Sun, 17 Nov 2024)
New Revision: 1596
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
Log:
fixed normal footnotes with manyfoot
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2024-11-10 19:20:38 UTC (rev 1595)
+++ trunk/lit/ChangeLog 2024-11-17 16:26:25 UTC (rev 1596)
@@ -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/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2024-11-10 19:20:38 UTC (rev 1595)
+++ trunk/lit/tex4ht-4ht.tex 2024-11-17 16:26:25 UTC (rev 1596)
@@ -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}%
More information about the tex4ht-commits
mailing list.