diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-03 00:02:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-03 00:02:02 +0000 |
commit | 07d14d88e9e67dacfd1d8955fc7fdb16aea0b324 (patch) | |
tree | 5f634ac32b3a36233a8053203664f2c9d2278992 /Master/texmf-dist/tex/latex/footnotehyper | |
parent | b8dd38acec3998292d34c1908e11ceb5a1605582 (diff) |
footnotehyper
git-svn-id: svn://tug.org/texlive/trunk@40852 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/footnotehyper')
-rw-r--r-- | Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty | 58 |
1 files changed, 37 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty b/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty index 60ec34eed7f..68e39fe9d89 100644 --- a/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty +++ b/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty @@ -23,10 +23,10 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{footnotehyper}% - [2016/04/21 v0.9d hyperref aware footnote.sty (JFB)] + [2016/04/30 v0.9e hyperref aware footnote.sty (JFB)] %% %% Package: footnotehyper -%% Version: 0.9d (2016/04/21) +%% Version: 0.9e (2016/04/30) %% License: LPPL 1.3c %% Copyright (C) 2016 Jean-Francois Burnol <jfbu at free dot fr>. %% @@ -36,21 +36,46 @@ {\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 + \RequirePackage{footnote} \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!^^Jhow many errors will you get ?...}% - {...I am sure you know what to do next time!}}}% -\def\fn@fntext {\ifx\ifmeasuring@\undefined\expandafter\@secondoftwo +\AtBeginDocument {% + \let\fn@latex@@footnote \footnote + \let\fn@latex@@footnotetext\footnotetext + \let\footnote \FNH@fn@footnote + \let\footnotetext\FNH@fn@footnotetext +}% +\AtBeginDocument{\@ifpackageloaded{hyperref} + {\ifHy@hyperfootnotes + \let\fn@fntext \FNH@fn@fntext + \let\spewnotes \FNH@spewnotes + \let\endsavenotes\spewnotes + \let\fn@endfntext\FNH@fn@endfntext + \else + \FNH@inactive + \fi }\FNH@inactive + \let\endfootnote\fn@endfntext + \let\endfootnotetext\endfootnote +}% +\def\FNH@fixendfntext\@finalstrut\strutbox\fn@postfntext + {\@finalstrut\strutbox\fn@postfntext\fn@endnote}% +\def\FNH@inactive {% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\fn@endfntext + \expandafter\expandafter\expandafter + {\expandafter\FNH@fixendfntext\fn@endfntext}% + \PackageInfo{footnotehyper}{hyperref package not loaded,^^J + or hyperfootnotes=false option; I did not activate myself and only^^J + patched footnote.sty for color/xcolor/babel-frenchb compatibility}}% +\def\FNH@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 + \FNH@fn@fntext@i }% +\long\def\FNH@fn@fntext@i #1{\global\setbox\fn@notes\vbox {\unvbox\fn@notes \fn@startnote \@makefntext @@ -68,7 +93,7 @@ \@finalstrut\strutbox }% \fn@endnote }% }% -\def\spewnotes {\endgroup +\def\FNH@spewnotes {\endgroup \if@savingnotes\else\ifvoid\fn@notes\else \begingroup\let\@makefntext\@empty \let\@finalstrut\@gobble @@ -76,9 +101,8 @@ \H@@footnotetext{\unvbox\fn@notes}% \endgroup\fi\fi }% -\let\endsavenotes\spewnotes \def\fn@endnote {\color@endgroup}% -\def\fn@endfntext{% +\def\FNH@fn@endfntext{% \@finalstrut\strutbox \fn@postfntext \fn@endnote @@ -98,18 +122,10 @@ {\relax}}% \let\@currentHref\Hy@footnote@currentHref \let\@currentlabelname\@empty - \unvbox\z@} + \unvbox\z@}% }% \endgroup }% -\let\endfootnote \fn@endfntext -\let\endfootnotetext \endfootnote -\AtBeginDocument {% - \let\fn@latex@@footnote \footnote - \let\fn@latex@@footnotetext\footnotetext - \let\footnote \FNH@fn@footnote - \let\footnotetext\FNH@fn@footnotetext -}% \ifx\FNH@@makefntext\undefined\expandafter\@gobble \else\expandafter\AtBeginDocument\fi {% |