[latex3-commits] [latex3/latex3] main: Update for likely \New... in lttemplate (ed0518d9e)
github at latex-project.org
github at latex-project.org
Tue Feb 13 13:59:32 CET 2024
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/ed0518d9e6036f2961ebf93b2342a8acd8d81160
>---------------------------------------------------------------
commit ed0518d9e6036f2961ebf93b2342a8acd8d81160
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Jan 31 20:34:42 2024 +0000
Update for likely \New... in lttemplate
>---------------------------------------------------------------
ed0518d9e6036f2961ebf93b2342a8acd8d81160
l3packages/xtemplate/xtemplate.dtx | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/l3packages/xtemplate/xtemplate.dtx b/l3packages/xtemplate/xtemplate.dtx
index 79eb56103..7e0e75c74 100644
--- a/l3packages/xtemplate/xtemplate.dtx
+++ b/l3packages/xtemplate/xtemplate.dtx
@@ -693,22 +693,28 @@
%<@@=template>
% \end{macrocode}
%
-% \begin{macro}{\DeclareObjectType}
% \begin{macro}{\DeclareRestrictedTemplate}
+% \begin{macro}{\DeclareObjectType}
% If the new kernel code is not loaded, make a couple of compatibility
% additions. Otherwise, hand over to the frozen version.
% \begin{macrocode}
-\@ifundefined{DeclareTemplateType}
- {\input{xtemplate-2023-10-10.sty}}
+\@ifundefined{NewTemplateType}
+ {%
+ \input{xtemplate-2023-10-10.sty}%
+ \endinput
+ }
{%
\ProvidesExplPackage{xtemplate}{2023-10-10}{}
{L3 Experimental prototype document functions}
- \let\DeclareObjectType\DeclareTemplateType
\long\protected\def\DeclareRestrictedTemplate#1#2#3#4{%
\DeclareTemplateCopy{#1}{#3}{#2}%
\EditTemplateDefaults{#1}{#3}{#4}%
}%
}
+\ExplSyntaxOn
+\cs_new_protected:Npn \DeclareObjectType #1#2
+ { \@@_declare_type:nn {#1} {#2} }
+\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
% \end{macro}
More information about the latex3-commits
mailing list.