diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-22 21:23:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-22 21:23:32 +0000 |
commit | 39d9750a2998eddcc9f174b3e6944f7bacb37234 (patch) | |
tree | b42d8f2ccea3ffb8fded290e75dd082965756bc6 /Master/texmf-dist/tex/latex | |
parent | 1d4ee543b346c4fa8d9219405dc4062fdfee288a (diff) |
footnotehyper (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40686 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty | 73 |
1 files changed, 52 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty b/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty index c43d72fd8ff..60ec34eed7f 100644 --- a/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty +++ b/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty @@ -23,25 +23,29 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{footnotehyper}% - [2016/04/19 v0.9c hyperref aware footnote.sty (JFB)] + [2016/04/21 v0.9d hyperref aware footnote.sty (JFB)] %% %% Package: footnotehyper -%% Version: 0.9c (2016/04/19) +%% Version: 0.9d (2016/04/21) %% 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 +\@ifpackageloaded{footnote} + {\PackageWarning{footnotehyper}{Please next time do not load footnote,^^J + but leave that to me, that is much safer.}} + {\let\FNH@@makefntext\@makefntext\let\@makefntext\@firstofone + \RequirePackage{footnote}\relax + \let\@makefntext\FNH@@makefntext + }% +\let\FNH@fn@footnote \footnote +\let\FNH@fn@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!}}}% + {hyperref package not loaded!^^Jhow many errors will you get ?...}% + {...I am sure you know what to do next time!}}}% \def\fn@fntext {\ifx\ifmeasuring@\undefined\expandafter\@secondoftwo \else\expandafter\@firstofone\fi {\ifmeasuring@\expandafter\@gobbletwo\fi}% @@ -72,6 +76,7 @@ \H@@footnotetext{\unvbox\fn@notes}% \endgroup\fi\fi }% +\let\endsavenotes\spewnotes \def\fn@endnote {\color@endgroup}% \def\fn@endfntext{% \@finalstrut\strutbox @@ -82,7 +87,19 @@ \let\@makefntext\@empty \let\@finalstrut\@gobble \let\rule\@gobbletwo - \H@@footnotetext{\unvbox\z@}% + \H@@footnotetext + {\ifHy@nesting\expandafter\ltx@firstoftwo + \else\expandafter\ltx@secondoftwo + \fi + {\expandafter\hyper@@anchor + \expandafter{\Hy@footnote@currentHref}{\unvbox\z@}}% + {\Hy@raisedlink + {\expandafter\hyper@@anchor\expandafter{\Hy@footnote@currentHref}% + {\relax}}% + \let\@currentHref\Hy@footnote@currentHref + \let\@currentlabelname\@empty + \unvbox\z@} + }% \endgroup }% \let\endfootnote \fn@endfntext @@ -90,25 +107,39 @@ \AtBeginDocument {% \let\fn@latex@@footnote \footnote \let\fn@latex@@footnotetext\footnotetext - \let\footnote \FNH@footnote - \let\footnotetext\FNH@footnotetext + \let\footnote \FNH@fn@footnote + \let\footnotetext\FNH@fn@footnotetext +}% +\ifx\FNH@@makefntext\undefined\expandafter\@gobble + \else\expandafter\AtBeginDocument\fi +{% + \ifx\@makefntextFB\undefined + \expandafter\@gobble\else\expandafter\@firstofone\fi + {\ifFBFrenchFootnotes \let\FNH@@makefntext\@makefntextFB \else + \let\FNH@@makefntext\@makefntextORI\fi}% + \expandafter\FNH@check@a\FNH@@makefntext{1.2!3?4,}\FNH@@@1.2!3?4,\FNH@@@\relax }% -\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{% +\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}% + \FNH@bad@footnote@env + {\def\fn@prefntext{#1}\def\fn@postfntext{#2}\FNH@check@b}% }% -\def\FNH@check@b #1\relax{\expandafter\expandafter\expandafter\FNH@check@c +\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...)}% +\def\FNH@bad@footnote@env +{% + \PackageWarning{footnotehyper}% + {The footnote environment from package footnote^^J% + will be dysfunctional, sorry (not my fault...). You may try to mail + me^^Jthe preamble and/or only the next lines:}% + \typeout{\meaning\@makefntext}% \let\fn@prefntext\@empty\let\fn@postfntext\@empty }% \endinput |