summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty24
1 files changed, 20 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
index 519f8af04a4..62bd5832c9c 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
@@ -32,7 +32,7 @@
}%
\endinput
}
-\ProvidesExplPackage{xtemplate}{2023-01-16}{}
+\ProvidesExplPackage{xtemplate}{2023-02-01}{}
{L3 Experimental prototype document functions}
\cs_generate_variant:Nn \keys_define:nn { nx }
\cs_generate_variant:Nn \tl_trim_spaces:n { e }
@@ -766,7 +766,21 @@
}
}
}
-\cs_new_protected:Npn \__xtemplate_edit_instance:nnnn #1#2#3
+\cs_new_protected:Npn \__xtemplate_copy_instance:nnnn #1#2#3#4
+ {
+ \__xtemplate_if_instance_exist:nnnTF {#1} {#2} {#3}
+ {
+ \__xtemplate_recover_values:n { #1 / #2 / #3 }
+ \__xtemplate_store_values:n { #1 / #2 / #4 }
+ \cs_set_eq:cc { \c__xtemplate_instances_root_tl #1 / #2 / #4 }
+ { \c__xtemplate_instances_root_tl #1 / #2 / #3 }
+ }
+ {
+ \msg_error:nnxx { xtemplate } { unknown-instance }
+ {#1} {#3}
+ }
+ }
+\cs_new_protected:Npn \__xtemplate_edit_instance:nnnn #1#2#3#4
{
\__xtemplate_if_instance_exist:nnnTF {#1} {#2} {#3}
{
@@ -774,7 +788,7 @@
\prop_get:NnN \l__xtemplate_values_prop { from~template }
\l__xtemplate_tmp_tl
\__xtemplate_edit_instance_aux:nonnn {#1} \l__xtemplate_tmp_tl
- {#2} {#3}
+ {#2} {#3} {#4}
}
{
\msg_error:nnxx { xtemplate } { unknown-instance }
@@ -1318,6 +1332,8 @@
{ \__xtemplate_declare_instance:nnnnn {#1} {#3} { } {#2} {#4} }
\cs_new_protected:Npn \DeclareCollectionInstance #1#2#3#4#5
{ \__xtemplate_declare_instance:nnnnn {#2} {#4} {#1} {#3} {#5} }
+\cs_new_protected:Npn \DeclareInstanceCopy #1#2#3
+ { \__xtemplate_copy_instance:nnnn {#1} { } {#2} {#3} }
\cs_new_protected:Npn \EditTemplateDefaults #1#2#3
{ \__xtemplate_edit_defaults:nnn {#1} {#2} {#3} }
\cs_new_protected:Npn \EditInstance #1#2#3
@@ -1352,7 +1368,7 @@
\cs_new_protected:Npn \AssignTemplateKeys
{ \__xtemplate_assignments_pop: }
\cs_new_protected:Npn \SetTemplateKeys #1#2#3
- { \keys_set:nn { template / #1 / #2 } {#3} }
+ { \keys_set_known:nnN { template / #1 / #2 } {#3} \l__xtemplate_tmp_clist }
\cs_new_eq:NN \ShowTemplateKeytypes \ShowTemplateInterface
%%
%%