blob: c43d72fd8ffca3f41116b5ac9f859caff59b6b2c (
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
%%
%% This is file `footnotehyper.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% footnotehyper.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from footnotehyper.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file footnotehyper.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{footnotehyper}%
[2016/04/19 v0.9c hyperref aware footnote.sty (JFB)]
%%
%% Package: footnotehyper
%% Version: 0.9c (2016/04/19)
%% License: LPPL 1.3c
%% Copyright (C) 2016 Jean-Francois Burnol <jfbu at free dot fr>.
%%
\DeclareOption*{\PackageWarning{footnotehyper}{Option `\CurrentOption' is unknown}}%
\ProcessOptions\relax
\let\FNH@@makefntext\@makefntext\let\@makefntext\@firstofone
\RequirePackage{footnote}%
\let\@makefntext\FNH@@makefntext
\let\FNH@footnote \footnote
\let\FNH@footnotetext\footnotetext
\let\footnote \fn@latex@@footnote
\let\footnotetext\fn@latex@@footnotetext
\AtBeginDocument{\@ifpackageloaded{hyperref}{}{\PackageError{footnotehyper}%
{hyperref package not loaded!^^JThat's not easily forgiven..}%
{I am sure you know what to do. Else, think hard: yes you can!}}}%
\def\fn@fntext {\ifx\ifmeasuring@\undefined\expandafter\@secondoftwo
\else\expandafter\@firstofone\fi
{\ifmeasuring@\expandafter\@gobbletwo\fi}%
\FNH@fn@fntext }%
\long\def\FNH@fn@fntext #1{\global\setbox\fn@notes\vbox
{\unvbox\fn@notes
\fn@startnote
\@makefntext
{\rule\z@\footnotesep\ignorespaces
\ifHy@nesting\expandafter\ltx@firstoftwo
\else\expandafter\ltx@secondoftwo
\fi
{\expandafter\hyper@@anchor\expandafter{\Hy@footnote@currentHref}{#1}}%
{\Hy@raisedlink
{\expandafter\hyper@@anchor\expandafter{\Hy@footnote@currentHref}%
{\relax}}%
\let\@currentHref\Hy@footnote@currentHref
\let\@currentlabelname\@empty
#1}%
\@finalstrut\strutbox }%
\fn@endnote }%
}%
\def\spewnotes {\endgroup
\if@savingnotes\else\ifvoid\fn@notes\else
\begingroup\let\@makefntext\@empty
\let\@finalstrut\@gobble
\let\rule\@gobbletwo
\H@@footnotetext{\unvbox\fn@notes}%
\endgroup\fi\fi
}%
\def\fn@endnote {\color@endgroup}%
\def\fn@endfntext{%
\@finalstrut\strutbox
\fn@postfntext
\fn@endnote
\egroup
\begingroup
\let\@makefntext\@empty
\let\@finalstrut\@gobble
\let\rule\@gobbletwo
\H@@footnotetext{\unvbox\z@}%
\endgroup
}%
\let\endfootnote \fn@endfntext
\let\endfootnotetext \endfootnote
\AtBeginDocument {%
\let\fn@latex@@footnote \footnote
\let\fn@latex@@footnotetext\footnotetext
\let\footnote \FNH@footnote
\let\footnotetext\FNH@footnotetext
}%
\AtBeginDocument
{\expandafter\FNH@check@a\@makefntext{1.2!3?4,}\FNH@@@1.2!3?4,\FNH@@@\relax}%
\long\def\FNH@check@a #11.2!3?4,#2\FNH@@@#3{%
\ifx\relax#3\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
{\FNH@bad@footnote@env}%
{\long\def\fn@prefntext{#1}\long\def\fn@postfntext{#2}\FNH@check@b}%
}%
\def\FNH@check@b #1\relax{\expandafter\expandafter\expandafter\FNH@check@c
\expandafter\meaning\expandafter\fn@prefntext
\meaning\fn@postfntext1.2!3?4,\FNH@check@c\relax
}%
\def\FNH@check@c #11.2!3?4,#2#3\relax
{\ifx\FNH@check@c#2\expandafter\@gobble\fi\FNH@bad@footnote@env}%
\def\FNH@bad@footnote@env {\PackageWarning{footnotehyper}%
{The footnote environment from package footnote^^J%
will be dysfunctional, sorry (not my fault...)}%
\let\fn@prefntext\@empty\let\fn@postfntext\@empty
}%
\endinput
%%
%% End of file `footnotehyper.sty'.
|