[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Pre-load xparse if expl3 doesn't provde \NewDocumentCommand (03060bc4)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Mar 5 14:13:59 CET 2020
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/03060bc40a642fff80b44abd9c8edc1993c74414
>---------------------------------------------------------------
commit 03060bc40a642fff80b44abd9c8edc1993c74414
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Mar 5 13:13:59 2020 +0000
Pre-load xparse if expl3 doesn't provde \NewDocumentCommand
There will be a slight variation once l3kernel is updated,
as the latter won't provide g/l/u types, but users of those
already have \RequirePackage{xparse} anyway.
>---------------------------------------------------------------
03060bc40a642fff80b44abd9c8edc1993c74414
base/changes.txt | 4 ++++
base/ltexpl.dtx | 19 +++++++++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 89757269..d280862e 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,10 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2019-11-14 Joseph Wright <joseph.wright at morningstar2.co.uk>
+
+ * ltexpl.dtx: Pre-load xparse where expl3 does not define \NewDocumentCommand
+
2020-03-02 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* ltfssini.dtx (section{Custom series settings for main document families}):
diff --git a/base/ltexpl.dtx b/base/ltexpl.dtx
index 754459ed..4ad79996 100644
--- a/base/ltexpl.dtx
+++ b/base/ltexpl.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltexpl.dtx}
- [2020-03-02 v1.0b LaTeX Kernel (expl3-dependent code)]
+ [2020-03-05 v1.1 LaTeX Kernel (expl3-dependent code)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -74,6 +74,8 @@
% refined version!
% \changes{v1.0a}{2020/03/02}
% {Don't load expl3 if already in the format (gh/295)}
+% \changes{v1.1}{2020/03/05}
+% {Load xparse if \cs{NewDocumentCommand} is not defined by expl3.ltx}
% \begin{macrocode}
\expandafter\ifx\csname tex\string _let:D\endcsname\relax
\IfFileExists{expl3.ltx}
@@ -83,18 +85,27 @@
\ifdefined\filesize 1\fi
\ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
>0 %
+ \expandafter\@firstofone
\else
\message{Skipping expl3-dependent extensions}
%<2ekernel> \expandafter\endinput
-%<latexrelease> \expandafter\@gobbletwo
+%<latexrelease> \expandafter\@gobble
\fi
}
{%
\message{Skipping expl3-dependent extensions}%
%<2ekernel> \endinput
-%<latexrelease> \@gobbletwo
+%<latexrelease> \@gobble
+ }%
+ {%
+ \input{expl3.ltx}
+ \ifdefined\NewDocumentCommand
+ \else
+ \IfFileExists{xparse.sty}
+ {\RequirePackage{xparse}}
+ {}%
+ \fi
}%
- \input{expl3.ltx}
\else
\GenericInfo{}{Skipping: expl3 code already part of the format}
\fi
More information about the latex3-commits
mailing list.