[tex4ht-commits] [SCM] tex4ht updated: r1532 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Thu Jun 20 14:47:49 CEST 2024


Author: michal_h21
Date: 2024-06-20 12:47:49 +0000 (Thu, 20 Jun 2024)
New Revision: 1532

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
fixed handling of the footnote counter reset

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2024-06-17 19:40:15 UTC (rev 1531)
+++ trunk/lit/ChangeLog	2024-06-20 12:47:49 UTC (rev 1532)
@@ -1,5 +1,12 @@
 2024-06-17  Michal Hoftich  <michal.h21 at gmail.com>
 
+	* tex4ht-4ht.tex (footmisc.4ht): fixed handling of footnote counter
+	reset. 
+	https://tex.stackexchange.com/a/720989/2891
+
+
+2024-06-17  Michal Hoftich  <michal.h21 at gmail.com>
+
 	* tex4ht-4ht.tex (tabularray.4ht): updated names of token lists that
 	holds rowspan and colspan.
 	https://tex.stackexchange.com/a/720800/2891

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2024-06-17 19:40:15 UTC (rev 1531)
+++ trunk/lit/tex4ht-4ht.tex	2024-06-20 12:47:49 UTC (rev 1532)
@@ -37900,9 +37900,39 @@
 
 \<footmisc.4ht\><<<
 % footmisc.4ht (|version), generated from |jobname.tex
-% Copyright 2019 TeX Users Group
+% Copyright 2019-2024 TeX Users Group
 |<TeX4ht license text|>
+|<footmisc footnote counter|>
+|<footmisc footnotetext|>
+|<footmisc symbols|>
 
+
+\Hinput{footmisc}
+\endinput
+>>>        \AddFile{9}{footmisc}
+
+Footmisc can reset the normal footnote counter on every page. Footnote links are 
+then wrong, as they point to an earlier footnote. My solution is to use a global 
+counter that gives each footnote unique number and which doesn't rely on the footnote 
+symbol.
+
+\<footmisc footnote counter\><<<
+\newcounter{:footnotes}
+
+\def\FNnum{\the\:footnotes}
+
+\HRestore\footnote
+
+\def\:tempc{%
+   \HAssign\FNnum = \csname c@:footnotes\endcsname%
+   \stepcounter{:footnotes}%
+   \HAdvance\FNnum by 1%
+   \o:footnote:%
+}
+\HLet\footnote=\:tempc
+>>>
+
+\<footmisc footnotetext\><<<
 \long\def\@footnotetext#1{\leavevmode
    \vbox{%\IgnorePar
       \leftskip0pt {\ht:everypar{}\parindent0pt\leavevmode}%
@@ -37921,6 +37951,9 @@
       \color at endgroup
       \ht:special{t4ht@[}}\ht:special{t4ht@]}}
 
+>>>
+
+\<footmisc symbols\><<<
 % detect if the symbol or symbol* option were used
 % we can detect that by testing of \thefootnote macro
 
@@ -37937,11 +37970,8 @@
     \newcommand\p at footmisc@footnote[1]{\p at footnote{#1}}
   \fi
 \fi
+>>>
 
-\Hinput{footmisc}
-\endinput
->>>        \AddFile{9}{footmisc}
-
 %%%%%%%%%%%%%%%
 \Section{tablefootnote}
 %%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list.