summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-02-25 22:06:25 +0000
committerKarl Berry <karl@freefriends.org>2023-02-25 22:06:25 +0000
commit87f7da60bedb9baa17b3cf395c4ca4ac8cc7f8f4 (patch)
treed85c4ebd9e71e59717141a7b01df709d1e10f8f9 /Master/texmf-dist/tex
parent3aa8d9864cfba44da31702861cb6a211fc1c8935 (diff)
footnoterange (25feb23) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2022.final@66156 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/footnoterange/footnoterange.sty129
1 files changed, 63 insertions, 66 deletions
diff --git a/Master/texmf-dist/tex/latex/footnoterange/footnoterange.sty b/Master/texmf-dist/tex/latex/footnoterange/footnoterange.sty
index 632ba4c46bd..066a2e02550 100644
--- a/Master/texmf-dist/tex/latex/footnoterange/footnoterange.sty
+++ b/Master/texmf-dist/tex/latex/footnoterange/footnoterange.sty
@@ -9,18 +9,14 @@
%% This is a generated file.
%%
%% Project: footnoterange
-%% Version: 2019/11/24 v1.0c
+%% Version: 2023-02-25 v1.1a
+%% Info: References to ranges of footnotes
%%
-%% Copyright (C) 2012 - 2019 by
-%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+%% Copyright (C) 2012 - 2023 by
+%% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
%% Portions of code copyrighted by other people as marked;
%% lines marked "FMi": code by Frank Mittelbach, thanks!
%%
-%% The usual disclaimer applies:
-%% If it doesn't work right that's your problem.
-%% (Nevertheless, please send an e-mail to the maintainer
-%% when you find an error in this package.)
-%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
@@ -29,7 +25,7 @@
%% and the latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
+%% LaTeX version 2005-12-01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
@@ -42,17 +38,27 @@
%% footnoterange-example.tex, footnoterange-example.pdf.
%%
%% In memoriam
-%% Claudia Simone Barth + 1996/01/30
-%% Tommy Muench + 2014/01/02
-%% Hans-Klaus Muench + 2014/08/24
+%% Claudia Simone Barth + 1996-01-30
+%% Tommy Muench + 2014-01-02
+%% Hans-Klaus Muench + 2014-08-24
%%
-\NeedsTeXFormat{LaTeX2e}[2011/06/27]
-\ProvidesPackage{footnoterange}[2019/11/24 v1.0c
- References to ranges of footnotes (HMM)]
-%% Provides the footnoterange and footnoterange* environments to
-%% refer to ranges of footnotes.
-\RequirePackage{ltxcmds}[2011/11/09]% v1.22; for "\ltx@ifpackageloaded"
-\RequirePackage{letltxmacro}[2010/09/02]% v1.4; for "\GlobalLetLtxMacro"
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\ProvidesPackage{footnoterange}[2023-02-25 v1.1a %
+ References to ranges of footnotes (HMM)]
+%% Provides the footnoterange and footnoterange* environments
+%% to refer to ranges of footnotes.
+
+\@ifl@t@r\fmtversion{2022/11/01}{% would have understood
+ % \IfFormatAtLeastTF{2022-11-01}{<true code>}{<false code>}
+ }{\PackageError{footnoterange}{%
+ Newer LaTeX format needed or older footnoterange package%
+ }{Needed LaTeX format version: 2022-11-01 or newer.\MessageBreak%
+ Found\space\space LaTeX format version: \fmtversion.\MessageBreak%
+ Either update your TeX distribution\MessageBreak%
+ or use an archived version of footnoterange\MessageBreak%
+ (see section History in the documentation).\MessageBreak%
+ }
+ }
\newcommand{\fnr@ifhyperrfn}{%
\ifHy@hyperfootnotes% option hyperfootnotes=true
@@ -70,33 +76,31 @@
\nolinebreak%
% no \footnotemark here
\addtocounter\@mpfn{+1}%
- \ltx@ifpackageloaded{hyperref}{\fnr@ifhyperrfn}{\relax}%
+ \IfPackageLoadedTF{hyperref}{\fnr@ifhyperrfn}{\relax}%
\xdef\fnr@opt{#1}% contains the optional argument
\xdef\fnr@arabic{\arabic\@mpfn}%
\protected@edef\fnr@formated{\thefootnote}%
- \ifx\fnr@opt\empty%
+ \ifx\fnr@opt\empty\relax%
\footnotetext{\label{fnr:\fnr@arabic}#2}%
\else%
\PackageWarning{footnoterange}{%
Custom footnote-numbers used in a footnoterange\MessageBreak%
environment: Footnote with natural number\MessageBreak%
\ifx\fnr@formated\fnr@arabic%
- \fnr@arabic\space%
+ \fnr@arabic%
\else%
\space\fnr@arabic\space (\fnr@formated )%
\fi%
\MessageBreak%
was renumbered to \fnr@opt\MessageBreak%
}%
- \ltx@ifpackageloaded{hyperref}{% hyperref loaded
- \footnotetext[#1]{\phantomsection\label{fnr:\fnr@arabic}#2}%
- }{% hyperref not loaded
- \footnotetext[#1]{\label{fnr:\fnr@arabic}#2}%
- }%
+ \IfPackageLoadedTF{hyperref}{%
+ \footnotetext[#1]{\phantomsection\label{fnr:\fnr@arabic}#2}%
+ }{\footnotetext[#1]{\label{fnr:\fnr@arabic}#2}%
+ }%
\fi%
}
-
\newcommand{\fnr@ifhyperfnrA}{%
\ifHy@hyperfootnotes% option hyperfootnotes=true
\hbox{\hyperref[fnr:\fnr@first]{%
@@ -115,10 +119,12 @@
\@textsuperscript{\normalfont \ref*{fnr:\arabic\@mpfn}}}}%
\else% option hyperfootnotes=false
\hbox{\@textsuperscript{\normalfont \ref*{fnr:\fnr@first}%
- --\ref*{fnr:\arabic\@mpfn}}}%
+ --\ref*{fnr:\arabic\@mpfn}}}%
\fi%
}
+\AddToHook{begindocument}{\NewCommandCopy{\fnr@origfnmark}{\footnotemark}}
+
\newenvironment{footnoterange}{%
% at begin of the footnoterange environment
\ifhmode \unskip \fi% FMi
@@ -127,8 +133,8 @@
\addtocounter\@mpfn{-1}%
\let\fnr@origfn\footnote%
\let\footnote\fnr@rangefootnote%
- \GlobalLetLtxMacro{\fnr@origfnmark}{\footnotemark}%
- \GlobalLetLtxMacro{\footnotemark}{\fnr@rangefootnotemark}%
+ \RenewCommandCopy{\fnr@origfnmark}{\footnotemark}%
+ \RenewCommandCopy{\footnotemark}{\fnr@rangefootnotemark}%
\ignorespaces% FMi
}{% at end of the footnoterange environment
\ifhmode% FMi
@@ -138,23 +144,19 @@
\xdef\fnr@aftergroup{\relax}%
\fi% FMi
\let\footnote\fnr@origfn%
- \GlobalLetLtxMacro{\footnotemark}{\fnr@origfnmark}%
- \ifx\fnr@first\fnr@arabic% There is only one reference in the environment.
+ \RenewCommandCopy{\footnotemark}{\fnr@origfnmark}%
+ \ifx\fnr@first\fnr@arabic\relax% There is only one reference in the environment.
\PackageInfo{footnoterange}{%
Environment footnoterange used,\MessageBreak%
- but only one footnote (number \fnr@first ) is contained%
- \MessageBreak%
- }%
- \ltx@ifpackageloaded{hyperref}{\fnr@ifhyperfnrA% hyperref package loaded
- }{% hyperref package not loaded
- \hbox{\@textsuperscript{\normalfont \ref{fnr:\fnr@first}}}%
- }%
+ but only one footnote (number \fnr@first ) is contained\MessageBreak}%
+ \IfPackageLoadedTF{hyperref}{\fnr@ifhyperfnrA%
+ }{\hbox{\@textsuperscript{\normalfont \ref{fnr:\fnr@first}}}%
+ }%
\else%
- \ltx@ifpackageloaded{hyperref}{\fnr@ifhyperfnrN% hyperref package loaded
- }{% hyperref package not loaded
- \hbox{\@textsuperscript{\normalfont \ref{fnr:\fnr@first}%
- --\ref{fnr:\arabic\@mpfn}}}%
- }%
+ \IfPackageLoadedTF{hyperref}{\fnr@ifhyperfnrN%
+ }{\hbox{\@textsuperscript{\normalfont \ref{fnr:\fnr@first}%
+ --\ref{fnr:\arabic\@mpfn}}}%
+ }%
\fi%
\aftergroup\fnr@aftergroup% FMi
}
@@ -167,8 +169,8 @@
\addtocounter\@mpfn{-1}%
\let\fnr@origfn\footnote%
\let\footnote\fnr@rangefootnote%
- \GlobalLetLtxMacro{\fnr@origfnmark}{\footnotemark}%
- \GlobalLetLtxMacro{\footnotemark}{\fnr@rangefootnotemark}%
+ \RenewCommandCopy{\fnr@origfnmark}{\footnotemark}%
+ \RenewCommandCopy{\footnotemark}{\fnr@rangefootnotemark}%
\ignorespaces% FMi
}{% at end of the footnoterange* environment
\ifhmode% FMi
@@ -178,31 +180,26 @@
\xdef\fnr@aftergroup{\relax}%
\fi% FMi
\let\footnote\fnr@origfn%
- \GlobalLetLtxMacro{\footnotemark}{\fnr@origfnmark}%
- \ifx\fnr@first\fnr@arabic% There is only one reference in the environment.
+ \RenewCommandCopy{\footnotemark}{\fnr@origfnmark}%
+ \ifx\fnr@first\fnr@arabic\relax% There is only one reference in the environment.
\PackageInfo{footnoterange}{%
Environment footnoterange used,\MessageBreak%
- but only one footnote (number \fnr@first ) is contained%
- \MessageBreak%
- }%
- \ltx@ifpackageloaded{hyperref}{% hyperref package loaded
- \hbox{\@textsuperscript{\normalfont \ref*{fnr:\fnr@first}}}%
- }{% hyperref package not loaded
- \hbox{\@textsuperscript{\normalfont \ref{fnr:\fnr@first}}}%
- }%
+ but only one footnote (number \fnr@first ) is contained\MessageBreak}%
+ \IfPackageLoadedTF{hyperref}{%
+ \hbox{\@textsuperscript{\normalfont \ref*{fnr:\fnr@first}}}%
+ }{\hbox{\@textsuperscript{\normalfont \ref{fnr:\fnr@first}}}%
+ }%
\else%
- \ltx@ifpackageloaded{hyperref}{% hyperref package loaded
- \hbox{\@textsuperscript{\normalfont \ref*{fnr:\fnr@first}%
- --\ref*{fnr:\arabic\@mpfn}}}%
- }{% hyperref package not loaded
- \hbox{\@textsuperscript{\normalfont \ref{fnr:\fnr@first}%
- --\ref{fnr:\arabic\@mpfn}}}%
- }%
+ \IfPackageLoadedTF{hyperref}{%
+ \hbox{\@textsuperscript{\normalfont \ref*{fnr:\fnr@first}%
+ --\ref*{fnr:\arabic\@mpfn}}}%
+ }{\hbox{\@textsuperscript{\normalfont \ref{fnr:\fnr@first}%
+ --\ref{fnr:\arabic\@mpfn}}}%
+ }%
\fi%
\aftergroup\fnr@aftergroup% FMi
}
-
\newcommand{\fnr@rangefootnotemark}[1][\empty]{%
\PackageError{footnoterange}{%
\string\footnotemark\space not supported in footnoterange(*) environment%
@@ -215,7 +212,7 @@
with your own fixing code).%
}%
\xdef\fnr@mopt{#1}%
- \ifx\fnr@mopt\empty%
+ \ifx\fnr@mopt\empty\relax%
\fnr@origfnmark%
\else%
\fnr@origfnmark[#1]%