summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/hyperref
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref')
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hluatex.dtx4
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx2
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx2
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref.dtx85
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref.ins8
-rw-r--r--Master/texmf-dist/source/latex/hyperref/nameref.dtx23
6 files changed, 72 insertions, 52 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hluatex.dtx b/Master/texmf-dist/source/latex/hyperref/hluatex.dtx
index 6c335e5df4f..ceb34a2477e 100644
--- a/Master/texmf-dist/source/latex/hyperref/hluatex.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hluatex.dtx
@@ -1,6 +1,6 @@
% \iffalse
% Source File: hluatex.dtx
-% 2023-05-16 v7.00y
+% 2023-06-25 v7.01a
%
% Copyright
% 2016-2019 Oberdiek Package Support Group
@@ -31,7 +31,7 @@
%
% \begin{macrocode}
%<*luatex>
-%% 2023-05-16 v7.00y
+%% 2023-06-25 v7.01a
%% force unicode encoding, see issue #101
%% code mostly copied from hxetex.def
\HyPsd@LoadUnicode
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx
index a13e0b9da7d..ebb0c1225da 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 2023-05-16 v7.00y}
+% \date{Version 2023-06-25 v7.01a}
%
% \maketitle
% \begin{documentation}
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx
index 7aaad9ac182..34fee796594 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx
@@ -55,7 +55,7 @@
% }^^A
% }
%
-% \date{Version 2023-05-16 v7.00y}
+% \date{Version 2023-06-25 v7.01a}
%
% \maketitle
% \begin{documentation}
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
index df20f32b364..0549c93050c 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
@@ -51,7 +51,7 @@
%<puvnenc>\ProvidesFile{puvnenc.def}
%<puarenc>\ProvidesFile{puarenc.def}
%<psdextra>\ProvidesFile{psdextra.def}
-%<!none&!packageEnd> [2023-05-16 v7.00y %
+%<!none&!packageEnd> [2023-06-25 v7.01a %
%<package> Hypertext links for LaTeX]
%<nohyperref> Dummy hyperref (SR)]
%<driver> Hyperref documentation driver file]
@@ -10416,7 +10416,13 @@
% that the hyper stuff is not executed twice, so we use the AMS
% |\ifmeasuring@|, initialized if AMS math is not used.
% \begin{macrocode}
-\@ifpackageloaded{amsmath}{}{\newif\ifmeasuring@\measuring@false}
+\newif\ifmeasuring@\measuring@false
+\newcommand\Hy@ifnotmeasuring[1]{#1}
+\AddToHook{package/amsmath/after}
+ {
+ \renewcommand\Hy@ifnotmeasuring[1]
+ {\ifmeasuring@ \else #1\fi}
+ }
% \end{macrocode}
%
% \begin{macro}{\hyper@refstepcounter}
@@ -10424,12 +10430,10 @@
\def\hyper@refstepcounter#1{%
\HyCnt@ProvideTheHCounter{#1}%
\hyper@makecurrent{#1}%
- \ifmeasuring@
- \else
- \Hy@raisedlink{%
+ \Hy@ifnotmeasuring
+ {\Hy@raisedlink{%
\hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- \fi
+ }}%
}
% \end{macrocode}
% \end{macro}
@@ -10797,9 +10801,11 @@
% Overload equation, temporarily reverting to original
% |\refstepcounter|. If, however, it is in AMS math, we do not
% do anything, as the tag mechanism is used there (see section \ref{ams}).
-% The exception is that we move the equation incrementation inside
-% the math environment to avoid specials outside and a wrong vertical
-% spacing of equation environments.
+% change 2023-06-14: previously hyperref contained code that moved
+% the equation incrementation inside the math environment to
+% avoid specials outside and a wrong vertical spacing of equation environments.
+% Since 2021/08/24 this code is now in amsmath directly and so has been removed here.
+%
% This and more math related patches can be suppressed with
% |\hyper@nopatch@mathenv|
% \begin{macrocode}
@@ -10807,29 +10813,17 @@
\let\H@equation\equation
\let\H@endequation\endequation
% \end{macrocode}
-%
+%
% \begin{macrocode}
\@ifundefined{hyper@nopatch@mathenv}{%
- \@ifpackageloaded{amsmath}{%
- \long\def\Hy@temp{%
- \incr@eqnum
- \mathdisplay@push
- \st@rredfalse \global\@eqnswtrue
- \mathdisplay{equation}%
- }%
- \ifx\Hy@temp\equation
- \expandafter\ifx\csname if@fleqn\expandafter\endcsname
- \csname iftrue\endcsname
- \else
- \long\def\equation{%
- \mathdisplay@push
- \st@rredfalse \global\@eqnswtrue
- \mathdisplay{equation}%
- \incr@eqnum
- }%
- \fi
- \fi
- }{%
+% \end{macrocode}
+% If amsmath was loaded before the following does nothing.
+% If amsmath is loaded later it will overwrite the definition again,
+% which is what is wanted here.
+% If it is not loaded the new definition of equation
+% will be used.
+% \begin{macrocode}
+ \@ifpackageloaded{amsmath}{}{%
\def\equation{%
\let\refstepcounter\H@refstepcounter
\H@equation
@@ -10942,18 +10936,23 @@
% \end{macrocode}
%
% Support for amsmath's \texttt{subequations}:
+% change 2023-06-14: we use hooks to no longer depend on
+% amsmath being loaded before hyperref.
+% Once amsmath sets the theH-representation itself this
+% can go completely.
% \begin{macrocode}
-\ifcsname subequations\endcsname
- \let\HyOrg@subequations\subequations
- \def\subequations{%
+\AddToHook{cmd/subequations/before}
+ {%
\stepcounter{equation}%
\protected@edef\theHparentequation{\theHequation}%
\addtocounter{equation}{-1}%
- \HyOrg@subequations
- \def\theHequation{\theHparentequation\alph{equation}}%
- \ignorespaces
- }%
-\fi
+ }
+
+\AddToHook{cmd/subequations/after}
+ {%
+ \def\theHequation{\theHparentequation\alph{equation}}%
+ \ignorespaces
+ }
% \end{macrocode}
%
% Support for theorems. We move the target into the para hook to
@@ -12007,10 +12006,11 @@
%
% If |\hyper@nopatch@amsmath@tag| is defined we don't patch but assume
% that kernel code adds anchors to equations.
+% change 2023-06-14: use a hook to make it independent of loading order.
% \begin{macrocode}
\@ifundefined{hyper@nopatch@amsmath@tag}
{%
- \@ifpackageloaded{amsmath}{%
+ \AddToHook{package/amsmath/after}{%
\def\Hy@make@anchor{%
\Hy@MakeCurrentHrefAuto{AMS}%
\Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
@@ -12088,10 +12088,13 @@
}%
}%
%</check>
+% \end{macrocode}
+% change 2023-06-14: use hook to make independent of loading order
+% \begin{macrocode}
%<*packageEnd>
\@ifundefined{hyper@nopatch@counter}
{
- \@ifpackageloaded{amsmath}{%
+ \AddToHook{package/amsmath/after}{%
\renewcommand*{\numberwithin}[3][\arabic]{%
\@ifundefined{c@#2}{\@nocounterr{#2}}{%
\@ifundefined{c@#3}{\@nocnterr{#3}}{%
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.ins b/Master/texmf-dist/source/latex/hyperref/hyperref.ins
index 130c1c13e24..fd8308eda1b 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref.ins
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref.ins
@@ -31,7 +31,7 @@
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2021/02/04}
+\def\filedate{2023/05/29}
\def\batchfile{hyperref.ins}
\input docstrip
@@ -57,10 +57,10 @@
\preamble
Copyright
-1995-2001 Sebastian Rahtz, with portions written by David Carlisle and Heiko Oberdiek,
-2001-2015 Heiko Oberdiek.
+1995-2001 Sebastian Rahtz, with portions written by David Carlisle and Heiko Oberdiek
+2001-2015 Heiko Oberdiek
2016-2019 Oberdiek Package Support Group
-2019-2022 LaTeX Project
+2019-2023 LaTeX Project
https://github.com/latex3/hyperref/issues
This file is part of the `Hyperref Bundle'.
diff --git a/Master/texmf-dist/source/latex/hyperref/nameref.dtx b/Master/texmf-dist/source/latex/hyperref/nameref.dtx
index e370a40fe11..d50f4fee362 100644
--- a/Master/texmf-dist/source/latex/hyperref/nameref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/nameref.dtx
@@ -33,7 +33,7 @@
%<driver>\ProvidesFile{nameref.drv}
% \fi
% \ProvidesFile{nameref.dtx}
- [2023-05-16 v2.51 Cross-referencing by name of section]%
+ [2023-06-18 v2.52 Cross-referencing by name of section]%
%
%
% \iffalse
@@ -274,8 +274,10 @@
% \begin{macro}{\label@hook}
% Starting with LaTeX 2023-06-01 it is not longer needed to
% redefine \cs{label} as the kernel provides a hook and
-% stores \cs{@currentlabelname}. We still support
-% \cs{label@hook} for now as it is used below in \cs{slabel}
+% stores \cs{@currentlabelname}. But as there are packages like ntheorem
+% and revtex which overwrites the kernel definition and then break nameref
+% and hyperref we add a guard.
+% We still support \cs{label@hook} for now as it is used below in \cs{slabel}
% and also in hyperref.
% \begin{macrocode}
\providecommand*{\label@hook}{}
@@ -284,6 +286,21 @@
}
\@ifl@t@r\fmtversion{2023-06-01}
{
+ \def\NR@label@copy#1{\@bsphack
+ \begingroup
+ \UseHookWithArguments{label}{1}{#1}%
+ \protected@write\@auxout{}%
+ {\string\newlabel{#1}{{\@currentlabel}{\thepage}%
+ {\@currentlabelname}{\@currentHref}{\@kernel@reserved@label@data}}}%
+ \endgroup
+ \@esphack}
+ \ifx\label\NR@label@copy
+ \else
+ \PackageWarning{nameref}{The definition of \string\label\space has changed!
+ \MessageBreak Check your packages!
+ \MessageBreak Replacing it with the kernel definition}
+ \let\label\NR@label@copy
+ \fi
\AddToHookWithArguments{label}{\def\label@name{#1}\label@hook}
}
{