[latex3-commits] [git/LaTeX3-latex3-latex2e] starredrefs: Use expl3 syntax (42fdaeec)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Apr 16 02:34:40 CEST 2022


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

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

commit 42fdaeec53fb390cad7ca1e0a5e1701c8d50306f
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Apr 15 21:34:40 2022 -0300

    Use expl3 syntax


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

42fdaeec53fb390cad7ca1e0a5e1701c8d50306f
 base/ltxref.dtx | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/base/ltxref.dtx b/base/ltxref.dtx
index 596eb2fd..afd9f47d 100644
--- a/base/ltxref.dtx
+++ b/base/ltxref.dtx
@@ -258,10 +258,20 @@
 % As the commands are now protected we also need expandable versions for use
 % in \cs{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}}
+\ExplSyntaxOn
+\cs_new:Npn \@kernel at pageref@exp #1
+  {
+    \cs_if_exist:cTF {r@#1}
+      { \exp_last_unbraced:Nv \use_ii:nn {r@#1} }
+      { 0 }
+  }
+\cs_new:Npn \@kernel at ref@exp #1
+  {
+    \cs_if_exist:cTF {r@#1}
+      { \exp_last_unbraced:Nv \use_i:nn {r@#1} }
+      { 0 }
+  }
+\ExplSyntaxOff
 %    \end{macrocode}
 %    \begin{macrocode}
 %</2ekernel|latexrelease>





More information about the latex3-commits mailing list.