diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3packages')
5 files changed, 70 insertions, 124 deletions
diff --git a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx index 1041469c9bb..18465e22d54 100644 --- a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx +++ b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx @@ -23,8 +23,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2017/04/01] -%<package>\@ifpackagelater{expl3}{2017/04/01} +\RequirePackage{expl3}[2017/05/13] +%<package>\@ifpackagelater{expl3}{2017/05/13} %<package> {} %<package> {% %<package> \PackageError{l3keys2e}{Support package l3kernel too old} @@ -60,7 +60,7 @@ % }^^A % } % -% \date{Released 2017/04/01} +% \date{Released 2017/05/13} % % \maketitle % @@ -131,7 +131,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3keys2e}{2017/04/01}{} +\ProvidesExplPackage{l3keys2e}{2017/05/13}{} {LaTeX2e option processing using LaTeX3 keys} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx b/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx index 481b56eec02..0196c9cd775 100644 --- a/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx @@ -23,8 +23,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2017/04/01] -%<package>\@ifpackagelater{expl3}{2017/04/01} +\RequirePackage{expl3}[2017/05/13] +%<package>\@ifpackagelater{expl3}{2017/05/13} %<package> {} %<package> {% %<package> \PackageError{xfpu}{Support package l3kernel too old} @@ -62,7 +62,7 @@ % }^^A % } % -% \date{Released 2017/04/01} +% \date{Released 2017/05/13} % % \maketitle % @@ -143,7 +143,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfp}{2017/04/01}{} +\ProvidesExplPackage{xfp}{2017/05/13}{} {L3 Floating point unit} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx index 06c10494676..2556fa267bf 100644 --- a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx @@ -24,8 +24,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2017/04/01] -%<package>\@ifpackagelater{expl3}{2017/04/01} +\RequirePackage{expl3}[2017/05/13] +%<package>\@ifpackagelater{expl3}{2017/05/13} %<package> {} %<package> {% %<package> \PackageError{xfrac}{Support package l3kernel too old} @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2017/04/01} +% \date{Released 2017/05/13} % % \maketitle % @@ -533,7 +533,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfrac}{2017/04/01}{} +\ProvidesExplPackage{xfrac}{2017/05/13}{} {L3 Experimental split-level fractions} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx index 46243389c01..95e08f91fdb 100644 --- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx @@ -27,8 +27,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2017/04/01] -%<package>\@ifpackagelater{expl3}{2017/04/01} +\RequirePackage{expl3}[2017/05/13] +%<package>\@ifpackagelater{expl3}{2017/05/13} %<package> {} %<package> {% %<package> \PackageError{xparse}{Support package l3kernel too old} @@ -67,7 +67,7 @@ % }^^A % } % -% \date{Released 2017/04/01} +% \date{Released 2017/05/13} % % \maketitle % @@ -179,12 +179,12 @@ % |-NoValue-| if not present. % \item[G] As for \texttt{g} but returns \meta{default} if no value % is given: \texttt{G}\marg{default}. -% \item[e] An optional set of \emph{embellishments}, each of which requires a -% \emph{value}. If a key is not present, |-NoValue-| is returned. -% The returned data is a token list comprising one braced entry per key, -% ordered as for the key list in the argument specification. Given as -% \texttt{e}\marg{tokens}. All \meta{tokens} must be distinct. -% \emph{This is an experimental type}. +% \item[e] A set of optional \emph{embellishments}, each of which +% requires a \emph{value}: \texttt{e}\marg{tokens}. If an +% embellishment is not present, |-NoValue-| is returned. Each +% embellishment gives one argument, ordered as for the list of +% \meta{tokens} in the argument specification. All \meta{tokens} +% must be distinct. \emph{This is an experimental type}. % \item[E] As for \texttt{e} but returns one or more \meta{defaults} % if values are not given: \texttt{E}\marg{tokens}\marg{defaults}. See % Section~\ref{sec:embellishment} for more details. @@ -776,7 +776,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xparse}{2017/04/01}{} +\ProvidesExplPackage{xparse}{2017/05/13}{} {L3 Experimental document command parser} % \end{macrocode} % @@ -828,9 +828,10 @@ % \end{variable} % % \begin{variable}{\l_@@_current_arg_int} -% The number of the current argument being set up: this is used for creating -% the expandable auxiliary functions, and also to indicate if all arguments -% are \texttt{m}-type. +% The number of the current argument being set up: this is used to +% make sure there are at most 9 arguments, then for creating the +% expandable auxiliary functions and knowing how many arguments the +% code function should take. % \begin{macrocode} \int_new:N \l_@@_current_arg_int % \end{macrocode} @@ -1292,7 +1293,7 @@ % \end{macro} % % \begin{macro}{\@@_defaults:} -% \begin{macro}[aux]{\@@_defaults_def:, \@@_defaults_def:nn, \@@_defaults_def:nnn, \@@_defaults_def_aux:nn} +% \begin{macro}[aux]{\@@_defaults_def:, \@@_defaults_def:nn, \@@_defaults_def:nnn} % \begin{macro}[aux]{\@@_defaults_aux:, \@@_defaults_error:w} % First construct \cs{@@_tmp:w} (see below) that will receive % the arguments found so far and determine default values for any @@ -1332,13 +1333,7 @@ % |{#|\meta{arg number}|}| for arguments found in the input (whose % default will not be used) and otherwise % |{|\cs{exp_not:n}\Arg{default}|}| for arguments whose default will -% be used. The case of \texttt{E}-type arguments, detected by -% \cs{tl_if_head_is_group:nTF}, is special because we may need to -% partly use an argument found in the input and partly some default. -% This case is delayed until \cs{@@_tmp:w} is called: then we -% map through the original argument and its corresponding list of -% defaults; for each item (corresponding to one embellishment) if a -% value has already been found use it otherwise use the default. +% be used. % \begin{macrocode} \cs_new_protected:Npn \@@_defaults_def: { @@ -1357,36 +1352,18 @@ } \cs_new_protected:Npn \@@_defaults_def:nnn #1#2#3 { - \tl_if_head_is_group:nTF {#3} + \tl_put_right:Nx \l_@@_tmpa_tl { - \tl_put_right:Nn \l_@@_tmpa_tl - { + { + \exp_not:N \exp_not:n { - \exp_args:Nf \@@_tl_mapthread_function:nnN - { \tl_item:Nn \l_@@_args_tl {#1} } - {#3} - \@@_defaults_def_aux:nn + \@@_if_no_value:nTF {#2} + { \exp_not:o {#3} } + { \exp_not:n { ## #1 } } } - } - } - { - \@@_if_no_value:nTF {#2} - { - \tl_put_right:Nx \l_@@_tmpa_tl - { { \exp_not:N \exp_not:n { \exp_not:o {#3} } } } - } - { - \tl_put_right:Nn \l_@@_tmpa_tl - { { \exp_not:n { ## #1 } } } - } + } } } -\cs_new:Npn \@@_defaults_def_aux:nn #1#2 - { - \@@_if_no_value:nTF {#1} - { { \exp_not:n {#2} } } - { { \exp_not:n {#1} } } - } % \end{macrocode} % \end{macro} % \end{macro} @@ -1442,7 +1419,6 @@ % \begin{macro}[EXP,aux]{\@@_end_expandable_defaults:nnnNNn} % \begin{macro}[EXP,aux]{\@@_end_expandable_defaults:nnw} % \begin{macro}[EXP,aux]{\@@_end_expandable_defaults:nw} -% \begin{macro}[EXP,aux]{\@@_end_expandable_defaults_E:nnw} % Followed by a function |#1| to determine default values (or |?| if % there are no defaults), the code % |#2|, arguments that have been grabbed, then \cs{q_@@} and two generic @@ -1485,28 +1461,9 @@ } \cs_new:Npn \@@_end_expandable_defaults:nnw #1#2 { - \tl_if_head_is_group:nTF {#1} - { - \@@_end_expandable_defaults_E:nnw { } - #1 \q_nil \q_mark - #2 \q_nil - } - { - \@@_if_no_value:nTF {#2} - { \exp_args:No \@@_end_expandable_defaults:nw {#1} } - { \@@_end_expandable_defaults:nw {#2} } - } - } -\cs_new:Npn \@@_end_expandable_defaults_E:nnw #1#2#3 \q_mark #4 - { - \quark_if_nil:nTF {#2} - { \@@_end_expandable_defaults:nw {#1} } - { - \@@_if_no_value:nTF {#4} - { \@@_end_expandable_defaults_E:nnw { #1 {#2} } } - { \@@_end_expandable_defaults_E:nnw { #1 {#4} } } - #3 \q_mark - } + \@@_if_no_value:nTF {#2} + { \exp_args:No \@@_end_expandable_defaults:nw {#1} } + { \@@_end_expandable_defaults:nw {#2} } } \cs_new:Npn \@@_end_expandable_defaults:nw #1#2 \@@_end_expandable_defaults:nnnNNn #3 @@ -1518,7 +1475,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \subsection{Normalizing the argument specifications} % @@ -1715,7 +1671,9 @@ % forbidden types for expandable commands. For \texttt{E}-type % require that there is at least one embellishment, that each one is a % single token, and that there aren't more optional arguments than -% embellishments. Then store the data in \cs{l_@@_arg_spec_tl}, and +% embellishments; also remember that each embellishment counts as one +% argument for \cs{l_@@_current_arg_int}. Then in each case +% store the data in \cs{l_@@_arg_spec_tl}, and % for later checks store in \cs{l_@@_last_delimiters_tl} the tokens % whose presence determines whether there is an optional argument (for % braces store |{}|, seen later as an empty delimiter). @@ -1741,6 +1699,7 @@ \@@_add_arg_spec:n { E {#1} {#2} } \tl_put_right:Nn \l_@@_last_delimiters_tl {#1} \bool_set_false:N \l_@@_grab_expandably_bool + \int_add:Nn \l_@@_current_arg_int { \tl_count:n {#1} - 1 } \@@_normalize_arg_spec_loop:n } \cs_new_protected:Npn \@@_normalize_E_unique_check:w #1#2 \q_stop @@ -1993,7 +1952,6 @@ \cs_new_protected:Npn \@@_prepare_signature_bypass:N #1 { \quark_if_recursion_tail_stop:N #1 - \int_incr:N \l_@@_current_arg_int \use:c { @@_add @@ -2015,11 +1973,12 @@ % type. All of the functions then call the loop function % \cs{@@_prepare_signature:N}. Default values of arguments are % collected by \cs{@@_add_default:n} rather than being stored with the -% argument. +% argument; this function and \cs{@@_add_default:} are also responsible +% for keeping track of \cs{l_@@_current_arg_int}. % % \begin{macro}{\@@_add_type_+:w} -% Making the next argument long means setting the flag and knocking one back -% off the total argument count. The \texttt{m} arguments are recorded here as +% Making the next argument long means setting the flag. The \texttt{m} +% arguments are recorded here as % this has to be done for every case where there is then a long argument. % \begin{macrocode} \cs_new_protected:cpn { @@_add_type_+:w } @@ -2027,7 +1986,6 @@ \@@_flush_m_args: \bool_set_true:N \l_@@_long_bool \bool_set_true:N \l_@@_prefixed_bool - \int_decr:N \l_@@_current_arg_int \@@_prepare_signature_bypass:N } % \end{macrocode} @@ -2044,7 +2002,6 @@ \@@_flush_m_args: \bool_set_true:N \l_@@_prefixed_bool \bool_set_true:N \l_@@_process_some_bool - \int_decr:N \l_@@_current_arg_int \tl_put_left:Nn \l_@@_process_one_tl { {#1} } \@@_prepare_signature_bypass:N } @@ -2214,7 +2171,7 @@ % the signature is done here. For mandatory arguments, the only question % is whether to add a long grabber. For optional arguments, there is % also a check to see if any mandatory arguments are still to be added. -% This is used to determine whether to skip spaces or not where +% This is used to determine whether to skip spaces or not when % searching for the argument. % \begin{macrocode} \cs_new_protected:Npn \@@_add_grabber_mandatory:N #1 @@ -2253,45 +2210,39 @@ % \end{macro} % % \begin{macro}{\@@_add_default:n, \@@_add_default:, \@@_add_default_E:nn} -% \begin{macro}[aux]{\@@_add_default_E_aux:n} % Store the default value of an argument, or rather code that gives % that default value (it may involve other arguments). This is % \cs{c_@@_no_value_tl} for arguments with no actual default or with -% default |-NoValue-|; \cs{prg_do_nothing:} followed by a default -% value for most others, and a token list of braced arguments for -% \texttt{E}-type arguments. For \texttt{E}-type arguments, pad the -% defaults |#2| with some |{-NoValue-}| until there are as many as -% embellishments~|#1|. These functions are also used when defining -% expandable commands. +% default |-NoValue-|; and (in a brace group) \cs{prg_do_nothing:} +% followed by a default value for others. For \texttt{E}-type +% arguments, pad the defaults |#2| with some \cs{c_@@_no_value_tl} +% until there are as many as embellishments~|#1|. These functions are +% also used when defining expandable commands. % \begin{macrocode} \cs_new_protected:Npn \@@_add_default:n #1 { \@@_if_no_value:nTF {#1} { \@@_add_default: } { + \int_incr:N \l_@@_current_arg_int \bool_set_true:N \l_@@_defaults_bool \tl_put_right:Nn \l_@@_defaults_tl { { \prg_do_nothing: #1 } } } } \cs_new_protected:Npn \@@_add_default: - { \tl_put_right:Nn \l_@@_defaults_tl { \c_@@_no_value_tl } } + { + \int_incr:N \l_@@_current_arg_int + \tl_put_right:Nn \l_@@_defaults_tl { \c_@@_no_value_tl } + } \cs_new_protected:Npn \@@_add_default_E:nn #1#2 { - \bool_set_true:N \l_@@_defaults_bool - \tl_put_right:Nx \l_@@_defaults_tl - { - { - \tl_map_function:nN {#2} \@@_add_default_E_aux:n - \prg_replicate:nn - { \tl_count:n {#1} - \tl_count:n {#2} } - { { \c_@@_no_value_tl } } - } - } + \tl_map_function:nN {#2} \@@_add_default:n + \prg_replicate:nn + { \tl_count:n {#1} - \tl_count:n {#2} } + { \@@_add_default: } } -\cs_new:Npn \@@_add_default_E_aux:n #1 { \exp_not:n { {#1} } } % \end{macrocode} % \end{macro} -% \end{macro} % % \subsection{Setting up expandable types} % @@ -2310,7 +2261,6 @@ \cs_new_protected:cpn { @@_add_expandable_type_+:w } { \bool_set_true:N \l_@@_long_bool - \int_decr:N \l_@@_current_arg_int \@@_prepare_signature:N } % \end{macrocode} @@ -2377,7 +2327,7 @@ % the auxiliary and the token in \cs{l_@@_tmpb_tl}, before appending % the whole set of these pairs to the signature, and an equal number % of |-NoValue-| markers (regardless of the default values of -% arguments). +% arguments). Set the current argument appropriately. % \begin{macrocode} \cs_new_protected:Npn \@@_add_expandable_type_E:w #1#2 { @@ -2766,18 +2716,14 @@ \tl_set:Nn \l_@@_signature_tl {#2} \cs_set_protected:Npn \@@_grab_E_finalise: { - \tl_clear:N \l_@@_tmpa_tl \tl_map_inline:nn {#1} { \prop_get:NnNF \l_@@_tmp_prop {####1} \l_@@_tmpb_tl { \tl_set_eq:NN \l_@@_tmpb_tl \c_@@_no_value_tl } - \tl_set:Nx \l_@@_tmpa_tl - { - \exp_not:V \l_@@_tmpa_tl - { \exp_not:V \l_@@_tmpb_tl } - } + \tl_put_right:Nx \l_@@_args_tl + { { \exp_not:V \l_@@_tmpb_tl } } } - \@@_add_arg:V \l_@@_tmpa_tl + \l_@@_signature_tl \@@_run_code: } \@@_grab_E_loop:nnN {#4} { } #1 \q_recursion_tail \q_recursion_stop } @@ -3570,7 +3516,7 @@ \cs_new:Npn \@@_expandable_grab_E_find:nnw #1#2#3 \q_nil #4 \q_@@ #5#6#7#8 { \@@_expandable_grab_E_aux:w {#1} { #2 {#8} #3 } #4 \q_@@ #5 #6 #7 } \cs_new:Npn \@@_expandable_grab_E_end:nnw #1#2#3 \q_@@ #4#5#6 - { #3 {#2} \q_@@ #4 #5 {#1} } + { #3 #2 \q_@@ #4 #5 {#1} } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx index d210104e72e..069612e4d0d 100644 --- a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx @@ -27,8 +27,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2017/04/01] -%<package>\@ifpackagelater{expl3}{2017/04/01} +\RequirePackage{expl3}[2017/05/13] +%<package>\@ifpackagelater{expl3}{2017/05/13} %<package> {} %<package> {% %<package> \PackageError{xtemplate}{Support package l3kernel too old} @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2017/04/01} +% \date{Released 2017/05/13} % % \maketitle % @@ -682,7 +682,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xtemplate}{2017/04/01}{} +\ProvidesExplPackage{xtemplate}{2017/05/13}{} {L3 Experimental prototype document functions} % \end{macrocode} % |