[latex3-commits] [git/LaTeX3-latex3-latex3] main: Create template keys for variables (0fb65dcef)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed May 25 16:36:37 CEST 2022


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/0fb65dcefef54ebe3f81bd4e9a8a00be7b71f987

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

commit 0fb65dcefef54ebe3f81bd4e9a8a00be7b71f987
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed May 25 15:36:37 2022 +0100

    Create template keys for variables
    
    Part way to what we want


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

0fb65dcefef54ebe3f81bd4e9a8a00be7b71f987
 l3packages/xtemplate/xtemplate.dtx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/l3packages/xtemplate/xtemplate.dtx b/l3packages/xtemplate/xtemplate.dtx
index ca56d8281..94b74f54f 100644
--- a/l3packages/xtemplate/xtemplate.dtx
+++ b/l3packages/xtemplate/xtemplate.dtx
@@ -687,6 +687,7 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\cs_generate_variant:Nn \keys_define:nn { nx }
 \cs_generate_variant:Nn \tl_trim_spaces:n { e }
 %    \end{macrocode}
 %
@@ -1635,6 +1636,11 @@
           {
             \cs_if_exist:NF #3
               { \use:c { \@@_map_var_type: _new:N } #3 }
+            \keys_define:nx { template / #1 }
+              {
+                \l_@@_key_name_tl
+                  . \@@_map_var_type: _set:N = \exp_not:N #3
+              }
             \prop_put:Non \l_@@_vars_prop
               \l_@@_key_name_tl {#2#3}
           }





More information about the latex3-commits mailing list.