[latex3-commits] [latex3/latex3] templates: Update for likely \New... in lttemplate (8d39eda1a)
github at latex-project.org
github at latex-project.org
Wed Jan 31 21:34:42 CET 2024
Repository : https://github.com/latex3/latex3
On branch : templates
Link : https://github.com/latex3/latex3/commit/8d39eda1a3bfcfe67e51b134e3a58ab7e423f2e5
>---------------------------------------------------------------
commit 8d39eda1a3bfcfe67e51b134e3a58ab7e423f2e5
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Jan 31 20:34:42 2024 +0000
Update for likely \New... in lttemplate
>---------------------------------------------------------------
8d39eda1a3bfcfe67e51b134e3a58ab7e423f2e5
l3packages/xtemplate/xtemplate.dtx | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/l3packages/xtemplate/xtemplate.dtx b/l3packages/xtemplate/xtemplate.dtx
index 79eb56103..269fe010f 100644
--- a/l3packages/xtemplate/xtemplate.dtx
+++ b/l3packages/xtemplate/xtemplate.dtx
@@ -693,25 +693,43 @@
%<@@=template>
% \end{macrocode}
%
-% \begin{macro}{\DeclareObjectType}
% \begin{macro}{\DeclareRestrictedTemplate}
+% \begin{macro}{\DeclareObjectType}
+% \begin{macro}{\DeclareTemplateInterface}
+% \begin{macro}{\DeclareTemplateCode}
+% \begin{macro}{\DeclareInstance}
% 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} }
+\cs_new_protected:Npn \DeclareTemplateInterface #1#2#3#4
+ { \@@_declare_template_keys:nnnn {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \DeclareTemplateCode #1#2#3#4#5
+ { \@@_declare_template_code:nnnnn {#1} {#2} {#3} {#4} {#5} }
+\cs_new_protected:Npn \DeclareInstance #1#2#3#4
+ { \@@_declare_instance:nnnn {#1} {#3} {#2} {#4} }
+\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
%</package>
% \end{macrocode}
More information about the latex3-commits
mailing list.