texlive[71576] Master/texmf-dist: footnote counter reset, tex4ht

commits+karl at tug.org commits+karl at tug.org
Thu Jun 20 23:10:00 CEST 2024


Revision: 71576
          https://tug.org/svn/texlive?view=revision&revision=71576
Author:   karl
Date:     2024-06-20 23:09:59 +0200 (Thu, 20 Jun 2024)
Log Message:
-----------
footnote counter reset, tex4ht r1532

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

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/footmisc.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-06-20 20:12:51 UTC (rev 71575)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-06-20 21:09:59 UTC (rev 71576)
@@ -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/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2024-06-20 20:12:51 UTC (rev 71575)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2024-06-20 21:09:59 UTC (rev 71576)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1531 2024-06-17 19:40:15Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1532 2024-06-20 12:47:49Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2024 TeX Users Group    
@@ -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}
 %%%%%%%%%%%%%%%%%

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/footmisc.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/footmisc.4ht	2024-06-20 20:12:51 UTC (rev 71575)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/footmisc.4ht	2024-06-20 21:09:59 UTC (rev 71576)
@@ -1,5 +1,5 @@
-% footmisc.4ht (2019-12-23-13:36), generated from tex4ht-4ht.tex
-% Copyright 2019 TeX Users Group
+% footmisc.4ht (2024-06-20-13:26), generated from tex4ht-4ht.tex
+% Copyright 2019-2024 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -16,9 +16,22 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2019-12-23-13:36}
+\immediate\write-1{version 2024-06-20-13:26}
 
+\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
+
 \long\def\@footnotetext#1{\leavevmode
    \vbox{%\IgnorePar
       \leftskip0pt {\ht:everypar{}\parindent0pt\leavevmode}%
@@ -37,6 +50,7 @@
       \color at endgroup
       \ht:special{t4ht@[}}\ht:special{t4ht@]}}
 
+
 % detect if the symbol or symbol* option were used
 % we can detect that by testing of \thefootnote macro
 
@@ -54,6 +68,8 @@
   \fi
 \fi
 
+
+
 \Hinput{footmisc}
 \endinput
 



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