[latex3-commits] [git/LaTeX3-latex3-latex2e] starredrefs: add expandable ref versions (ec7ee9b3)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Apr 13 18:10:56 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : starredrefs
Link       : https://github.com/latex3/latex2e/commit/ec7ee9b395c52ed0beebf1b1bfbb351d22a58b13

>---------------------------------------------------------------

commit ec7ee9b395c52ed0beebf1b1bfbb351d22a58b13
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Apr 13 18:10:56 2022 +0200

    add expandable ref versions


>---------------------------------------------------------------

ec7ee9b395c52ed0beebf1b1bfbb351d22a58b13
 base/ltxref.dtx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/base/ltxref.dtx b/base/ltxref.dtx
index fb588b4b..8c387765 100644
--- a/base/ltxref.dtx
+++ b/base/ltxref.dtx
@@ -253,6 +253,14 @@
 \NewDocumentCommand\pageref{s}
    {\IfBooleanTF{#1}{\@kernel at spageref}{\@kernel at pageref}}
 %    \end{macrocode}
+% As the commands are now protected we also need expandable version for use
+% in ifthenelse:
+%    \begin{macrocode}
+\def\@kernel at pageref@exp#1{\csname cs_if_exist:cTF\endcsname
+   {r@#1}{\csname tl_item:cn\endcsname{r@#1}{2}}{0}}
+\def\@kernel at ref@exp#1{\csname cs_if_exist:cTF\endcsname
+   {r@#1}{\csname tl_item:cn\endcsname{r@#1}{1}}{0}}
+%    \end{macrocode}
 %    \begin{macrocode}
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease





More information about the latex3-commits mailing list.