summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-08-30 20:30:19 +0000
committerKarl Berry <karl@freefriends.org>2021-08-30 20:30:19 +0000
commit587325962bacd6a34314587dcb499adff872777f (patch)
treedef801ec47cb36e47c550211ba5c9e5b517a50c2 /Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty
parent1ab804644e258380a3a28a59701bf7c2e8b8a2aa (diff)
footnotehyper (30aug21)
git-svn-id: svn://tug.org/texlive/trunk@60374 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty')
-rw-r--r--Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty58
1 files changed, 40 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty b/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty
index e8f7db28b48..0e064d387b8 100644
--- a/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty
+++ b/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty
@@ -23,15 +23,16 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{footnotehyper}%
- [2021/02/04 v1.1d hyperref aware footnote.sty (JFB)]
+ [2021/08/13 v1.1e hyperref aware footnote.sty (JFB)]
%%
%% Package: footnotehyper
-%% Version: 1.1d (2021/02/04)
+%% Version: 1.1e (2021/08/13)
%% License: LPPL 1.3c
%% Copyright (C) 2016-2021 Jean-Francois Burnol <jfbu at free dot fr>.
%%
\newif\iffootnotehyperparse\footnotehyperparsetrue
\newif\iffootnotehyperwarn \footnotehyperwarntrue
+\def\FNH@msgbk{^^J(footnotehyper)\@spaces}% make room for message lines
\DeclareOption*%
{\PackageWarning{footnotehyper}{Option `\CurrentOption' is unknown}}%
\ProcessOptions\relax
@@ -274,11 +275,13 @@
}%
\iffootnotehyperwarn
\PackageInfo{footnotehyper}%
- {frenchb compatibility patch activated.^^J It will not work in
- all circumstances.^^J In case of problems with the `footnote' or
- `footnotetext' environments,^^J please send to the author a small
- file demonstrating the problem.^^J To turn off this message, add
- \string\footnotehyperwarnfalse\space to the preamble.^^J}%
+ {babel-french compatibility patch activated.\FNH@msgbk
+ It may not work with all combinations of classes/packages.\FNH@msgbk
+ In case of problems with the `footnote' or `footnotetext'\FNH@msgbk
+ environments, you may try sending to the author a small\FNH@msgbk
+ file demonstrating the problem.\FNH@msgbk
+ To turn off this message, add \string\footnotehyperwarnfalse\FNH@msgbk
+ to the preamble\@gobble}%
\fi
}%
\def\FNH@check@{%
@@ -302,11 +305,11 @@
\def\FNH@prefntext{\@makefntext{}}%
\iffootnotehyperwarn
\PackageInfo{footnotehyper}%
- {using \string\@makefntext{} approach.^^J
- In case of problems with the footnote environments, please send^^J
- to the author a small document source illustrating them. To turn^^J
- off this message, add
- \string\footnotehyperwarnfalse\space to preamble.^^J}%
+ {Using the \string\@makefntext{} approach (see doc).\FNH@msgbk
+ In case of dysfunctional footnote environments, you can\FNH@msgbk
+ try sending the author a small illustrative document.\FNH@msgbk
+ To turn off this message, add \string\footnotehyperwarnfalse\FNH@msgbk
+ to the preamble\@gobble}% "noline"
\fi
\else\FNH@bad@makefntext@alert
\fi
@@ -322,14 +325,22 @@
\def\FNH@bad@makefntext@alert{%
\iffootnotehyperwarn
\PackageWarningNoLine{footnotehyper}%
- {^^J The footnote environments will probably lack footnote numbers at^^J
- bottom of pages, sorry.^^J
- You may try to email the author this meaning of \string\@makefntext:^^J
- \meaning\@makefntext^^J
- together with the document preamble}%
+ {\FNH@msgbk
+ Failed to analyse \string\@makefntext\space into something usable.\FNH@msgbk
+ Using as fall-back the article class code.\FNH@msgbk
+ You may try to email the author this problematic meaning:\FNH@msgbk
+ \meaning\@makefntext\FNH@msgbk
+ together with the document preamble (in particular if\FNH@msgbk
+ footnote numbers do not show at bottom of page)}%
\fi
- \let\FNH@prefntext\@empty\let\FNH@postfntext\@empty
+ \let\FNH@prefntext \FNH@prefntext@fallback
+ \let\FNH@postfntext\FNH@postfntext@fallback
}%
+\def\FNH@prefntext@fallback{% from article class code with \@nameuse added
+ \parindent 1em\noindent
+ \hb@xt@1.8em{\hss\@textsuperscript{\normalfont\@nameuse{@thefnmark}}}%
+}%
+\let\FNH@postfntext@fallback\@empty
\def\makesavenoteenv{\@ifnextchar[\FNH@msne@ii\FNH@msne@i}%]
\def\FNH@msne@i #1{%
\expandafter\let\csname FNH$#1\expandafter\endcsname %$
@@ -350,6 +361,17 @@
\noexpand\if@endpe\noexpand\@endpetrue\noexpand\fi
}%
}%
+\@ifl@t@r\fmtversion{2020/10/01}{%
+ \def\FNH@msne@i#1{%
+ \AddToHook{env/#1/before}{\savenotes}%
+ \AddToHook{env/#1/after}{\spewnotes}%
+ }%
+ \def\FNH@msne@ii[#1]#2{%
+ \newenvironment{#1}{\begin{savenotes}\begin{#2}}%
+ {\end{#2}\end{savenotes}}%
+ }%
+ }%
+ {}%
\endinput
%%
%% End of file `footnotehyper.sty'.