Debian Codegraph @

texmf-dist/tex/generic/tex4ht/footmisc.4ht

raw
1 % footmisc.4ht (2024-06-20-13:26), generated from tex4ht-4ht.tex
2 % Copyright 2019-2024 TeX Users Group
3 %
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either
6 % version 1.3c of this license or (at your option) any
7 % later version. The latest version of this license is in
8 % http://www.latex-project.org/lppl.txt
9 % and version 1.3c or later is part of all distributions
10 % of LaTeX version 2005/12/01 or later.
11 %
12 % This work has the LPPL maintenance status "maintained".
13 %
14 % The Current Maintainer of this work
15 % is the TeX4ht Project <http://tug.org/tex4ht>.
16 %
17 % If you modify this program, changing the
18 % version identification would be appreciated.
19 \immediate\write-1{version 2024-06-20-13:26}
20
21 \newcounter{:footnotes}
22
23 \def\FNnum{\the\:footnotes}
24
25 \HRestore\footnote
26
27 \def\:tempc{%
28 \HAssign\FNnum = \csname c@:footnotes\endcsname%
29 \stepcounter{:footnotes}%
30 \HAdvance\FNnum by 1%
31 \o:footnote:%
32 }
33 \HLet\footnote=\:tempc
34
35 \long\def\@footnotetext#1{\leavevmode
36 \vbox{%\IgnorePar
37 \leftskip0pt {\ht:everypar{}\parindent0pt\leavevmode}%
38 \long\def\:tempc##1{\protected@edef\@currentlabel{\the\csname c@footnote\endcsname}%
39 \anc:lbl f{footnote}%
40 \Configure{newlabel}{\cur:th\the\csname c@footnote\endcsname}{\protect\p@footmisc@footnote{\the\csname c@footnote\endcsname}}
41 \a:footnotetext
42 \o:@makefntext:{\b:footnotetext \csname a:footnotebody\endcsname
43 {##1}\csname b:footnotebody\endcsname}\c:footnotetext
44 }%
45 \HLet\@makefntext\:tempc
46 %
47 \reset@font\footnotesize
48 \color@begingroup
49 \@makefntext{\ignorespaces#1}%
50 \color@endgroup
51 \ht:special{t4ht@[}}\ht:special{t4ht@]}}
52
53
54 % detect if the symbol or symbol* option were used
55 % we can detect that by testing of \thefootnote macro
56
57 \edef\footmisc:thefootnote{\expandafter\unexpanded\expandafter{\thefootnote}}
58 \edef\footmisc:symbol{\unexpanded{\fnsymbol{footnote}}}
59 \edef\footmisc:symbolstar{\unexpanded{\@fnsymbol\c@footnote}}
60
61 \ifx\footmisc:thefootnote\footmisc:symbol
62 \newcommand\p@footmisc@footnote[1]{\@fnsymbol{#1}}
63 \else
64 \ifx\footmisc:thefootnote\footmisc:symbolstar
65 \newcommand\p@footmisc@footnote[1]{\@fnsymbol{#1}}
66 \else
67 \newcommand\p@footmisc@footnote[1]{\p@footnote{#1}}
68 \fi
69 \fi
70
71
72
73 \Hinput{footmisc}
74 \endinput
75