From b1ce47fe4d0e1f06d1b019c3c6eb5f1b0ecd5e14 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 15 Jul 2017 21:27:01 +0000 Subject: l3 (15jul17) git-svn-id: svn://tug.org/texlive/trunk@44813 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/l3kernel/l3seq.dtx | 97 +++++++++++------------ 1 file changed, 48 insertions(+), 49 deletions(-) (limited to 'Master/texmf-dist/source/latex/l3kernel/l3seq.dtx') diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx index 3af96d7ad28..9d724ec4715 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2017/05/29} +% \date{Released 2017/07/15} % % \maketitle % @@ -62,8 +62,8 @@ % \cs{seq_new:N} \meta{sequence} % \end{syntax} % Creates a new \meta{sequence} or raises an error if the name is -% already taken. The declaration is global. The \meta{sequence} will -% initially contain no items. +% already taken. The declaration is global. The \meta{sequence} +% initially contains no items. % \end{function} % % \begin{function}{\seq_clear:N, \seq_clear:c, \seq_gclear:N, \seq_gclear:c} @@ -141,7 +141,7 @@ % \end{syntax} % Concatenates the content of \meta{sequence_2} and \meta{sequence_3} % together and saves the result in \meta{sequence_1}. The items in -% \meta{sequence_2} will be placed at the left side of the new sequence. +% \meta{sequence_2} are placed at the left side of the new sequence. % \end{function} % % \begin{function}[EXP, pTF, added=2012-03-03] @@ -204,8 +204,8 @@ % Stores the left-most item from a \meta{sequence} in the % \meta{token list variable} without removing it from the % \meta{sequence}. The \meta{token list variable} is assigned locally. -% If \meta{sequence} is empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% If \meta{sequence} is empty the \meta{token list variable} +% is set to the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[updated = 2012-05-19]{\seq_get_right:NN, \seq_get_right:cN} @@ -215,8 +215,8 @@ % Stores the right-most item from a \meta{sequence} in the % \meta{token list variable} without removing it from the % \meta{sequence}. The \meta{token list variable} is assigned locally. -% If \meta{sequence} is empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% If \meta{sequence} is empty the \meta{token list variable} +% is set to the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[updated = 2012-05-14]{\seq_pop_left:NN, \seq_pop_left:cN} @@ -227,8 +227,8 @@ % \meta{token list variable}, \emph{i.e.}~removes the item from the % sequence and stores it in the \meta{token list variable}. % Both of the variables are assigned locally. If \meta{sequence} is -% empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% empty the \meta{token list variable} is set to +% the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[updated = 2012-05-14]{\seq_gpop_left:NN, \seq_gpop_left:cN} @@ -240,8 +240,8 @@ % sequence and stores it in the \meta{token list variable}. % The \meta{sequence} is modified globally, while the assignment of % the \meta{token list variable} is local. -% If \meta{sequence} is empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% If \meta{sequence} is empty the \meta{token list variable} is set to +% the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[updated = 2012-05-19]{\seq_pop_right:NN, \seq_pop_right:cN} @@ -252,8 +252,8 @@ % \meta{token list variable}, \emph{i.e.}~removes the item from the % sequence and stores it in the \meta{token list variable}. % Both of the variables are assigned locally. If \meta{sequence} is -% empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% empty the \meta{token list variable} is set to +% the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[updated = 2012-05-19]{\seq_gpop_right:NN, \seq_gpop_right:cN} @@ -265,8 +265,8 @@ % sequence and stores it in the \meta{token list variable}. % The \meta{sequence} is modified globally, while the assignment of % the \meta{token list variable} is local. -% If \meta{sequence} is empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% If \meta{sequence} is empty the \meta{token list variable} is set to +% the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[added = 2014-07-17, EXP]{\seq_item:Nn, \seq_item:cn} @@ -274,17 +274,17 @@ % \cs{seq_item:Nn} \meta{sequence} \Arg{integer expression} % \end{syntax} % Indexing items in the \meta{sequence} from~$1$ at the top (left), this -% function will evaluate the \meta{integer expression} and leave the +% function evaluates the \meta{integer expression} and leaves the % appropriate item from the sequence in the input stream. If the % \meta{integer expression} is negative, indexing occurs from the -% bottom (right) of the sequence. When the \meta{integer expression} +% bottom (right) of the sequence. If the \meta{integer expression} % is larger than the number of items in the \meta{sequence} (as -% calculated by \cs{seq_count:N}) then the function will expand to +% calculated by \cs{seq_count:N}) then the function expands to % nothing. % \begin{texnote} % The result is returned within the \tn{unexpanded} % primitive (\cs{exp_not:n}), which means that the \meta{item} -% will not expand further when appearing in an \texttt{x}-type +% does not expand further when appearing in an \texttt{x}-type % argument expansion. % \end{texnote} % \end{function} @@ -515,8 +515,8 @@ % \cs{seq_map_break:} % \end{syntax} % Used to terminate a \cs[no-index]{seq_map_\ldots} function before all -% entries in the \meta{sequence} have been processed. This will -% normally take place within a conditional statement, for example +% entries in the \meta{sequence} have been processed. This +% normally takes place within a conditional statement, for example % \begin{verbatim} % \seq_map_inline:Nn \l_my_seq % { @@ -527,12 +527,12 @@ % } % } % \end{verbatim} -% Use outside of a \cs[no-index]{seq_map_\ldots} scenario will lead to low +% Use outside of a \cs[no-index]{seq_map_\ldots} scenario leads to low % level \TeX{} errors. % \begin{texnote} % When the mapping is broken, additional tokens may be inserted by the % internal macro \cs{__prg_break_point:Nn} before further items are taken -% from the input stream. This will depend on the design of the mapping +% from the input stream. This depends on the design of the mapping % function. % \end{texnote} % \end{function} @@ -543,8 +543,8 @@ % \end{syntax} % Used to terminate a \cs[no-index]{seq_map_\ldots} function before all % entries in the \meta{sequence} have been processed, inserting -% the \meta{tokens} after the mapping has ended. This will -% normally take place within a conditional statement, for example +% the \meta{tokens} after the mapping has ended. This +% normally takes place within a conditional statement, for example % \begin{verbatim} % \seq_map_inline:Nn \l_my_seq % { @@ -555,13 +555,13 @@ % } % } % \end{verbatim} -% Use outside of a \cs[no-index]{seq_map_\ldots} scenario will lead to low +% Use outside of a \cs[no-index]{seq_map_\ldots} scenario leads to low % level \TeX{} errors. % \begin{texnote} % When the mapping is broken, additional tokens may be inserted by the % internal macro \cs{__prg_break_point:Nn} before the \meta{tokens} are % inserted into the input stream. -% This will depend on the design of the mapping function. +% This depends on the design of the mapping function. % \end{texnote} % \end{function} % @@ -571,7 +571,7 @@ % \end{syntax} % Leaves the number of items in the \meta{sequence} in the input % stream as an \meta{integer denotation}. The total number of items -% in a \meta{sequence} will include those which are empty and duplicates, +% in a \meta{sequence} includes those which are empty and duplicates, % \emph{i.e.}~every item in a \meta{sequence} is unique. % \end{function} % @@ -589,7 +589,7 @@ % sequence has exactly two items, then they are placed in the input stream % separated by the \meta{separator between two}. If the sequence has % a single item, it is placed in the input stream, and an empty sequence -% produces no output. An error will be raised if the variable does +% produces no output. An error is raised if the variable does % not exist or if it is invalid. % % For example, @@ -597,13 +597,13 @@ % \seq_set_split:Nnn \l_tmpa_seq { | } { a | b | c | {de} | f } % \seq_use:Nnnn \l_tmpa_seq { ~and~ } { ,~ } { ,~and~ } % \end{verbatim} -% will insert \enquote{\texttt{a, b, c, de, and f}} in the input +% inserts \enquote{\texttt{a, b, c, de, and f}} in the input % stream. The first separator argument is not used in this case % because the sequence has more than $2$ items. % \begin{texnote} % The result is returned within the \tn{unexpanded} % primitive (\cs{exp_not:n}), which means that the \meta{items} -% will not expand further when appearing in an \texttt{x}-type +% do not expand further when appearing in an \texttt{x}-type % argument expansion. % \end{texnote} % \end{function} @@ -615,7 +615,7 @@ % Places the contents of the \meta{seq~var} in the input stream, with % the \meta{separator} between the items. If the sequence has % a single item, it is placed in the input stream with no \meta{separator}, -% and an empty sequence produces no output. An error will be raised if +% and an empty sequence produces no output. An error is raised if % the variable does not exist or if it is invalid. % % For example, @@ -623,12 +623,12 @@ % \seq_set_split:Nnn \l_tmpa_seq { | } { a | b | c | {de} | f } % \seq_use:Nn \l_tmpa_seq { ~and~ } % \end{verbatim} -% will insert \enquote{\texttt{a and b and c and de and f}} in the input +% inserts \enquote{\texttt{a and b and c and de and f}} in the input % stream. % \begin{texnote} % The result is returned within the \tn{unexpanded} % primitive (\cs{exp_not:n}), which means that the \meta{items} -% will not expand further when appearing in an \texttt{x}-type +% do not expand further when appearing in an \texttt{x}-type % argument expansion. % \end{texnote} % \end{function} @@ -649,8 +649,8 @@ % Reads the top item from a \meta{sequence} into the % \meta{token list variable} without removing it from the % \meta{sequence}. The \meta{token list variable} is assigned locally. -% If \meta{sequence} is empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% If \meta{sequence} is empty the \meta{token list variable} is set to +% the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[updated = 2012-05-14]{\seq_pop:NN, \seq_pop:cN} @@ -659,8 +659,8 @@ % \end{syntax} % Pops the top item from a \meta{sequence} into the % \meta{token list variable}. Both of the variables are assigned -% locally. If \meta{sequence} is empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% locally. If \meta{sequence} is empty the \meta{token list variable} +% is set to the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[updated = 2012-05-14]{\seq_gpop:NN, \seq_gpop:cN} @@ -670,8 +670,8 @@ % Pops the top item from a \meta{sequence} into the % \meta{token list variable}. The \meta{sequence} is modified globally, % while the \meta{token list variable} is assigned locally. If -% \meta{sequence} is empty the \meta{token list variable} will -% contain the special marker \cs{q_no_value}. +% \meta{sequence} is empty the \meta{token list variable} is set to +% the special marker \cs{q_no_value}. % \end{function} % % \begin{function}[TF, added = 2012-05-14, updated = 2012-05-19]{\seq_get:NN, \seq_get:cN} @@ -869,7 +869,7 @@ % \cs{__seq_item:n} \Arg{item} % \end{syntax} % The internal token used to begin each sequence entry. If expanded -% outside of a mapping or manipulation function, an error will be +% outside of a mapping or manipulation function, an error is % raised. The definition should always be set globally. % \end{function} % @@ -1304,11 +1304,10 @@ % \texttt{x}-type expansion uses \cs{str_if_eq:nnT} to find potential % matches. If one is found, the expansion is halted and the necessary % set up takes place to use the \cs{tl_if_eq:NNT} test. The \texttt{x}-type -% is started again, including all of the items copied already. This will -% happen repeatedly until the entire sequence has been scanned. The code +% is started again, including all of the items copied already. This +% happens repeatedly until the entire sequence has been scanned. The code % is set up to avoid needing and intermediate scratch list: the lead-off -% \texttt{x}-type expansion (|#1 #2 {#2}|) will ensure that nothing is -% lost. +% \texttt{x}-type expansion (|#1 #2 {#2}|) ensures that nothing is lost. % \begin{macrocode} \cs_new_protected:Npn \seq_remove_all:Nn { \@@_remove_all_aux:NNn \tl_set:Nx } @@ -1436,7 +1435,7 @@ % argument with the test sequence. If the two items are equal, the % mapping is terminated and \cs{group_end:} \cs{prg_return_true:} % is inserted after skipping over the rest of the recursion. On the -% other hand, if there is no match then the loop will break returning +% other hand, if there is no match then the loop breaks, returning % \cs{prg_return_false:}. % Everything is inside a group so that \cs{@@_item:n} is preserved % in nested situations. @@ -1591,7 +1590,7 @@ % supplied by the |{ \if_false: } \fi:| \ldots % |\if_false: { \fi: }| construct. Using an \texttt{x}-type % expansion and a \enquote{non-expanding} definition for \cs{@@_item:n}, -% the left-most $n - 1$ entries in a sequence of $n$ items will be stored +% the left-most $n - 1$ entries in a sequence of $n$ items are stored % back in the sequence. That needs a loop of unknown length, hence using the % strange \cs{if_false:} way of including braces. When the last item % of the sequence is reached, the closing brace for the assignment is @@ -1687,7 +1686,7 @@ % \begin{macro}[aux]{\@@_item:wNn, \@@_item:nN, \@@_item:nnn} % The idea here is to find the offset of the item from the left, then use % a loop to grab the correct item. If the resulting offset is too large, -% then the stop code |{ ? \__prg_break: } { }| will be used by the auxiliary, +% then the stop code |{ ? \__prg_break: } { }| is used by the auxiliary, % terminating the loop and returning nothing at all. % \begin{macrocode} \cs_new:Npn \seq_item:Nn #1 -- cgit v1.2.3