diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx | 60 |
1 files changed, 14 insertions, 46 deletions
diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx index 75f8e78ee47..eb9ae86e940 100644 --- a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx @@ -4,7 +4,7 @@ % % Copyright (C) 1999 Frank Mittelbach, Chris Rowley, David Carlisle % (C) 2004-2010 Frank Mittelbach, The LaTeX Project -% (C) 2011-2022 The LaTeX Project +% (C) 2011-2023 The LaTeX Project %\ % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2022-12-17} +% \date{Released 2023-01-16} % % \maketitle % @@ -244,8 +244,6 @@ % boolean & \texttt{true} or \texttt{false} \\ % choice\Arg{choices} % & A list of pre-defined \meta{choices} \\ -% code -% & Generalised key type: use |#1| as the input to the key \\ % commalist & A comma-separated list \\ % function\Arg{$N$} % & A function definition with $N$ arguments @@ -331,8 +329,6 @@ % choice % & List of choice implementations % (see Section~\ref{sec:choices-key}) \\ -% code -% & \meta{code} using |#1| as input to the key \\ % commalist & Comma list, \emph{e.g}.~\cs{l_tmpa_clist} \\ % function % & Function taking $N$ arguments, \emph{e.g}.~\cs{use_i:nn} \\ @@ -706,7 +702,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xtemplate}{2022-12-17}{} +\ProvidesExplPackage{xtemplate}{2023-01-16}{} {L3 Experimental prototype document functions} % \end{macrocode} % @@ -1448,16 +1444,16 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_store_value_code:n, \@@_store_value_choice:n, +% \begin{macro}{\@@_store_value:n, \@@_store_value_choice:n, % \@@_store_value_function:n, \@@_store_value_instance:n} % With no need to worry about delayed evaluation, these keytypes all % just store the input directly. % \begin{macrocode} -\cs_new_protected:Npn \@@_store_value_code:n #1 +\cs_new_protected:Npn \@@_store_value:n #1 { \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#1} } -\cs_new_eq:NN \@@_store_value_choice:n \@@_store_value_code:n -\cs_new_eq:NN \@@_store_value_function:n \@@_store_value_code:n -\cs_new_eq:NN \@@_store_value_instance:n \@@_store_value_code:n +\cs_new_eq:NN \@@_store_value_choice:n \@@_store_value:n +\cs_new_eq:NN \@@_store_value_function:n \@@_store_value:n +\cs_new_eq:NN \@@_store_value_instance:n \@@_store_value:n % \end{macrocode} % \end{macro} % @@ -1612,16 +1608,6 @@ \str_case:VnF \l_@@_keytype_tl { { choice } { \@@_implement_choices:nn {#1} {#3} } - { code } - { - \@@_parse_vars_elt_key:nn {#1} - { - .cs_ \str_if_eq:nnT {#1} { global } { g } - set_protected:Np = \exp_not:N #3 - } - \prop_put:Non \l_@@_vars_prop - \l_@@_key_name_tl {#2#3} - } { function } { \cs_if_exist:NF #3 @@ -1630,9 +1616,12 @@ { .code:n = { - \exp_not:c - { cs_ \str_if_eq:nnT {#1} { global } { g } seq_eq:NN } - \exp_not:N #3 ####1 + \cs_generate_from_arg_count:NNnn + \exp_not:N #3 + \exp_not:c + { cs_ \str_if_eq:nnT {#1} { global } { g } set:Npn } + { \exp_not:o \l_@@_keytype_arg_tl } + {####1} } } \prop_put:Non \l_@@_vars_prop @@ -2206,26 +2195,6 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\@@_assign_code:} -% \begin{macro}{\@@_assign_code:n} -% Assigning general code to a key needs a scratch function to be created -% and run when \cs{AssignTemplateKeys} is called. So the appropriate -% definition then use is created in the token list variable. -% \begin{macrocode} -\cs_new_protected:Npn \@@_assign_code: - { - \tl_put_right:Nx \l_@@_assignments_tl - { - \cs_set_protected:Npn \@@_assign_code:n \exp_not:n {##1} - { \exp_not:o \l_@@_var_tl } - \@@_assign_code:n { \exp_not:o \l_@@_value_tl } - } - } -\cs_new_protected:Npn \@@_assign_code:n #1 { } -% \end{macrocode} -% \end{macro} -% \end{macro} -% % \begin{macro}{\@@_assign_function:} % \begin{macro}{\@@_assign_function_aux:N} % This looks a bit messy but is only actually one function. @@ -2751,7 +2720,6 @@ Valid~key-types~are:\\ -~boolean;\\ -~choice;\\ - -~code;\\ -~commalist;\\ -~function;\\ -~instance;\\ |