summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-manyfoot.sty
blob: 688d57ecf50474d7430bf0a40dd82d45971982da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
%%
%% This is file `lwarp-manyfoot.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `manyfoot')
%% This is a generated file.
%% Copyright 2016-2022 Brian Dunn
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{manyfoot}[2005/09/11]
\RequirePackage{nccfoots}

\newcommand{\extrafootnoterule}{}

\let\defaultfootnoterule\footnoterule

\newcommand*{\SelectFootnoteRule}[2][0]{}

\newcommand{\footnoterulepriority}{1}

\newcommand{\SetFootnoteHook}[1]{}
\@onlypreamble\SetFootnoteHook

\newcommand{\SplitNote}{}

\newcommand*\ExtraParaSkip[1]{}

\newcommand*{\newfootnote}[2][plain]{%
    \ifstrequal{#2}{default}{}{% not "default"
        \expandafter\newbox\csname LWR@footnote#2box\endcsname%
        \appto{\LWR@printpendingfootnotes}{%
            \LWR@@printpendingfootnotes{footnote#2}%
        }
        \long\csdef{Footnotetext#2}##1##2{%
            \NCC@makefnmark{##1}%
            \LWR@@footnotetext{##2}{LWR@footnote#2box}%
        }%
        \long\csdef{Footnotetext#2+}##1##2{%
            \NCC@makefnmark{##1}%
            \LWR@@footnotetext{##2}{LWR@footnote#2box}%
        }%
    }% not "default"
}
\@onlypreamble\newfootnote

\newcommand*{\DeclareNewFootnote}[2][plain]{%
  \@ifnextchar[%
        {\LWR@manyfoot@declare{#1}{#2}}%
        {\LWR@manyfoot@declare{#1}{#2}[arabic]}%
}

\def\LWR@manyfoot@declare#1#2[#3]{%
\ifstrequal{#2}{default}{}{% not "default"
  \newfootnote[#1]{#2}%
  \newcounter{footnote#2}%
    \newcounter{footnote#2Reset}%
    \setcounter{footnote#2Reset}{0}%
    \csdef{thefootnote#2}{%
      \expandafter\noexpand\csname @#3\endcsname%
      \expandafter\noexpand\csname c@footnote#2\endcsname%
    }%
    \expandafter\NewDocumentCommand\csname footnote#2\endcsname{t{+}t{+}t{-}t{-}}{%
        \stepcounter{footnote#2}%
        \protected@xdef\@thefnmark{\csname thefootnote#2\endcsname}%
        \@footnotemark%
        \csuse{Footnotetext#2}{\@thefnmark}% absorbs the footnote contents
    }%
    \csdef{footnotemark#2}{%
        \stepcounter{footnote#2}%
        \protected@xdef\@thefnmark{\csname thefootnote#2\endcsname}%
        \@footnotemark%
    }%
    \expandafter\NewDocumentCommand\csname footnotetext#2\endcsname{t{+}t{+}t{-}t{-}}{%
        \protected@xdef\@thefnmark{\csname thefootnote#2\endcsname}%
        \csuse{Footnotetext#2}{\@thefnmark}% absorbs the footnote contents
    }%
    \csdef{Footnotemark#2}{%
      \Footnotemark%
    }%
    \csdef{Footnote#2}##1{%
      \Footnotemark{##1}%
      \csuse{Footnotetext#2}{##1}%
    }%
}% not "default"
}
\@onlypreamble\DeclareNewFootnote

\endinput
%%
%% End of file `lwarp-manyfoot.sty'.