[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: don't patch ifthenelse if kernel support is there (76ac551)
Ulrike Fischer
fischer at troubleshooting-tex.de
Wed Apr 13 21:02:23 CEST 2022
Repository : https://github.com/latex3/hyperref
On branch : cleanup-patches
Link : https://github.com/latex3/hyperref/commit/76ac551e2fe27bdffc0a5c7cb1b997296cdfab6c
>---------------------------------------------------------------
commit 76ac551e2fe27bdffc0a5c7cb1b997296cdfab6c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Wed Apr 13 21:02:23 2022 +0200
don't patch ifthenelse if kernel support is there
>---------------------------------------------------------------
76ac551e2fe27bdffc0a5c7cb1b997296cdfab6c
nameref.dtx | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/nameref.dtx b/nameref.dtx
index 1c61f79..4316ccf 100644
--- a/nameref.dtx
+++ b/nameref.dtx
@@ -760,21 +760,24 @@
% to provide expandable versions without link of \cmd{\ref}
% and \cmd{\pageref}. As possible target I could only find
% \cmd{\begingroup}:
-% \begin{macrocode}
-\@ifpackageloaded{ifthen}{%
- \let\NROrg at ifthenelse\ifthenelse
- \def\ifthenelse{%
- \let\begingroup\NR at TE@begingroup
- \NROrg at ifthenelse
- }%
- \let\NROrg at begingroup\begingroup
- \def\NR at TE@begingroup{%
- \let\begingroup\NROrg at begingroup
- \begingroup
- \def\ref##1{\getrefbykeydefault{##1}{}{??}}%
- \def\pageref##1{\getrefbykeydefault{##1}{page}{0}}%
- }%
-}{}
+% Changed/disabled 2022-04-13: ifthen takes care itself to
+% change \cmd{\pageref} to an expandable version.
+% \begin{macrocode}
+\@ifundefined{@kernel at pageref@exp}
+ {\@ifpackageloaded{ifthen}{%
+ \let\NROrg at ifthenelse\ifthenelse
+ \def\ifthenelse{%
+ \let\begingroup\NR at TE@begingroup
+ \NROrg at ifthenelse
+ }%
+ \let\NROrg at begingroup\begingroup
+ \def\NR at TE@begingroup{%
+ \let\begingroup\NROrg at begingroup
+ \begingroup
+ \def\ref##1{\getrefbykeydefault{##1}{}{??}}%
+ \def\pageref##1{\getrefbykeydefault{##1}{page}{0}}%
+ }%
+ }{}}{}
% \end{macrocode}
%
% \subsection{Compatibility with varioref}
More information about the latex3-commits
mailing list.