[latex3-commits] [git/LaTeX3-latex3-latex3] cmd: There is no \providecommand at this point (01cee9f1e)

PhelypeOleinik phelype.oleinik at latex-project.org
Sun Jan 24 22:06:22 CET 2021


Repository : https://github.com/latex3/latex3
On branch  : cmd
Link       : https://github.com/latex3/latex3/commit/01cee9f1e4c6ffa492e7e92baa6437a3c02586a1

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

commit 01cee9f1e4c6ffa492e7e92baa6437a3c02586a1
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Sun Jan 24 18:06:22 2021 -0300

    There is no \providecommand at this point
    
    nor \@ifl at t@r


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

01cee9f1e4c6ffa492e7e92baa6437a3c02586a1
 l3packages/xparse/xparse.dtx | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index cc3d92078..cd58b706a 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -998,16 +998,28 @@
 % argument types from \pkg{xparse-2020-10-01}.  If we're in |2ekernel|
 % mode, it means rolling forward so load only the code code from
 % |xparse-generic.tex|.
+%
+% In |2ekernel| mode we anticipate the definition of two macros to parse
+% dates so that we can compare \cs{fmtdate} properly.
 %    \begin{macrocode}
-\providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
+%<*2ekernel>
+\def\@parse at version#1/#2/#3#4#5\@nil{%
+  \@parse at version@dash#1-#2-#3#4\@nil}
+\def\@parse at version@dash#1-#2-#3#4#5\@nil{%
+  \if\relax#2\relax\else#1\fi#2#3#4 }
+%</2ekernel>
 \ExplSyntaxOn
 \cs_if_free:NTF \NewDocumentCommand
   {
     \ExplSyntaxOff
-    \IfFormatAtLeastTF{2020/10/01}
-%<2ekernel>      { \@@@@input xparse-generic.tex ~ }
-%<package>      { \RequirePackage{xparse-2020-10-01} }
-      { \RequirePackage{xparse-2018-04-12} }
+    \ifnum\expandafter
+        \@parse at version\fmtversion//00\@nil <
+        \@parse at version 2020-10-01//00\@nil
+      \RequirePackage{xparse-2018-04-12}
+    \else
+%<2ekernel>      \@@@@input xparse-generic.tex ~
+%<package>      \RequirePackage{xparse-2020-10-01}
+    \fi
     \file_input_stop:
   }
 %    \begin{macrocode}





More information about the latex3-commits mailing list.