summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog7
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex42
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/footmisc.4ht22
3 files changed, 62 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index dd7c62fc27e..9fa8d8a1258 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,5 +1,12 @@
2024-06-17 Michal Hoftich <michal.h21@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@gmail.com>
+
* tex4ht-4ht.tex (tabularray.4ht): updated names of token lists that
holds rowspan and colspan.
https://tex.stackexchange.com/a/720800/2891
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
index 0fd6e45cbaa..6993bc74f5d 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
@@ -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 @@ Use
\<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 @@ Use
\color@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,10 +37970,7 @@ Use
\newcommand\p@footmisc@footnote[1]{\p@footnote{#1}}
\fi
\fi
-
-\Hinput{footmisc}
-\endinput
->>> \AddFile{9}{footmisc}
+>>>
%%%%%%%%%%%%%%%
\Section{tablefootnote}
diff --git a/Master/texmf-dist/tex/generic/tex4ht/footmisc.4ht b/Master/texmf-dist/tex/generic/tex4ht/footmisc.4ht
index 5cc0deff423..1d4373eb02f 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/footmisc.4ht
+++ b/Master/texmf-dist/tex/generic/tex4ht/footmisc.4ht
@@ -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,8 +16,21 @@
%
% 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
@@ -37,6 +50,7 @@
\color@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