diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3token.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3token.dtx | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index 3d9f02a2b1c..ecbc69d46b4 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2017/05/29} +% \date{Released 2017/07/15} % % \maketitle % @@ -57,11 +57,11 @@ % comes to document commands) is looking ahead in the token stream to % see if a certain character is present and maybe even remove it or % disregard other tokens while scanning. This module provides -% functions for both and as such will have two primary function +% functions for both and as such has two primary function % categories: |\token_| for anything that deals with tokens and % |\peek_| for looking ahead in the token stream. % -% Most functions we will describe here can be used on control sequences, +% Most functions we describe here can be used on control sequences, % as those are tokens as well. % % It is important to distinguish two aspects of a token: its @@ -78,7 +78,7 @@ % character code. They have the same meaning hence behave identically % in many situations. However, \TeX{} distinguishes them when searching % for a delimited argument. Namely, the example function -% |\show_until_if:w| defined below will take everything until \cs{if:w} +% |\show_until_if:w| defined below takes everything until \cs{if:w} % as an argument, despite the presence of other copies of \cs{if:w} % under different names. % \begin{verbatim} @@ -139,7 +139,7 @@ % \item $11$ (letter) % \item $12$ (other) % \end{itemize} -% and other values will raise an error. +% and other values raise an error. % % The \meta{charcode} may be any one valid for the engine in use. Note % however that for \XeTeX{} releases prior to 0.99992 only the 8-bit @@ -243,7 +243,7 @@ % \cs{char_set_lccode:nn} \Arg{intexpr_1} \Arg{intexpr_2} % \end{syntax} % Sets up the behaviour of the \meta{character} when -% found inside \cs{tl_to_lowercase:n}, such that \meta{character_1} +% found inside \cs{tl_lower_case:n}, such that \meta{character_1} % will be converted into \meta{character_2}. The two \meta{characters} % may be specified using an \meta{integer expression} for the character code % concerned. This may include the \TeX{} |`|\meta{character} @@ -280,7 +280,7 @@ % \cs{char_set_uccode:nn} \Arg{intexpr_1} \Arg{intexpr_2} % \end{syntax} % Sets up the behaviour of the \meta{character} when -% found inside \cs{tl_to_uppercase:n}, such that \meta{character_1} +% found inside \cs{tl_upper_case:n}, such that \meta{character_1} % will be converted into \meta{character_2}. The two \meta{characters} % may be specified using an \meta{integer expression} for the character code % concerned. This may include the \TeX{} |`|\meta{character} @@ -396,7 +396,7 @@ % \cs{token_new:Nn} \meta{token_1} \Arg{token_2} % \end{syntax} % Defines \meta{token_1} to globally be a snapshot of \meta{token_2}. -% This will be an implicit representation of \meta{token_2}. +% This is an implicit representation of \meta{token_2}. % \end{function} % % \begin{variable} @@ -439,9 +439,9 @@ % \end{syntax} % Inserts the current meaning of the \meta{token} into the input % stream as a series of characters of category code $12$ (other). -% This will be the primitive \TeX{} description of the \meta{token}, +% This is the primitive \TeX{} description of the \meta{token}, % thus for example both functions defined by \cs{cs_set_nopar:Npn} -% and token list variables defined using \cs{tl_new:N} will be described +% and token list variables defined using \cs{tl_new:N} are described % as |macro|s. % \begin{texnote} % This is the \TeX{} primitive \tn{meaning}. @@ -453,8 +453,8 @@ % \cs{token_to_str:N} \meta{token} % \end{syntax} % Converts the given \meta{token} into a series of characters with -% category code $12$ (other). The current escape character will be -% the first character in the sequence, although this will also have +% category code $12$ (other). If the \meta{token} is a control +% sequence, this will start with the current escape character with % category code $12$ (the escape character is part of the % \meta{token}). This function requires only a single expansion. % \begin{texnote} @@ -630,8 +630,8 @@ % \cs{token_if_protected_macro_p:N} \meta{token} \\ % \cs{token_if_protected_macro:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} -% Tests if the \meta{token} is a protected macro: a macro which -% is both protected and long will return logical \texttt{false}. +% Tests if the \meta{token} is a protected macro: for a macro which +% is both protected and long this returns \texttt{false}. % \end{function} % % \begin{function}[EXP,pTF, updated=2012-01-20]{\token_if_protected_long_macro:N} @@ -650,7 +650,7 @@ % Tests if the \meta{token} is defined to be a chardef. % \begin{texnote} % Booleans, boxes and small integer constants are implemented as -% chardefs. +% \tn{chardef}s. % \end{texnote} % \end{function} % @@ -678,7 +678,7 @@ % Tests if the \meta{token} is defined to be a integer register. % \begin{texnote} % Constant integers may be implemented as integer registers, -% chardefs, or mathchardefs depending on their value. +% \tn{chardef}s, or \tn{mathchardef}s depending on their value. % \end{texnote} % \end{function} % @@ -730,7 +730,7 @@ % \end{syntax} % Locally sets the test variable \cs{l_peek_token} equal to \meta{token} % (as an implicit token, \emph{not} as a token list), and then -% expands the \meta{function}. The \meta{token} will remain in +% expands the \meta{function}. The \meta{token} remains in % the input stream as the next item after the \meta{function}. % The \meta{token} here may be \verb*| |, |{| or |}| (assuming % normal \TeX{} category codes), \emph{i.e.}~it is not necessarily the @@ -743,7 +743,7 @@ % \end{syntax} % Globally sets the test variable \cs{g_peek_token} equal to \meta{token} % (as an implicit token, \emph{not} as a token list), and then -% expands the \meta{function}. The \meta{token} will remain in +% expands the \meta{function}. The \meta{token} remains in % the input stream as the next item after the \meta{function}. % The \meta{token} here may be \verb*| |, |{| or |}| (assuming % normal \TeX{} category codes), \emph{i.e.}~it is not necessarily the @@ -767,7 +767,7 @@ % Tests if the next \meta{token} in the input stream has the same % category code as the \meta{test token} (as defined by the test % \cs{token_if_eq_catcode:NNTF}). Spaces are respected by the test -% and the \meta{token} will be left in the input stream after +% and the \meta{token} is left in the input stream after % the \meta{true code} or \meta{false code} (as appropriate to the % result of the test). % \end{function} @@ -780,7 +780,7 @@ % same category code as the \meta{test token} (as defined by the test % \cs{token_if_eq_catcode:NNTF}). Explicit and implicit space tokens % (with character code 32 and category code 10) are ignored and -% removed by the test and the \meta{token} will be left in the input +% removed by the test and the \meta{token} is left in the input % stream after the \meta{true code} or \meta{false code} (as % appropriate to the result of the test). % \end{function} @@ -792,8 +792,8 @@ % Tests if the next \meta{token} in the input stream has the same % category code as the \meta{test token} (as defined by the test % \cs{token_if_eq_catcode:NNTF}). Spaces are respected by the test -% and the \meta{token} will be removed from the input stream if the -% test is true. The function will then place either the +% and the \meta{token} is removed from the input stream if the +% test is true. The function then places either the % \meta{true code} or \meta{false code} in the input stream (as % appropriate to the result of the test). % \end{function} @@ -807,8 +807,8 @@ % same category code as the \meta{test token} (as defined by the test % \cs{token_if_eq_catcode:NNTF}). Explicit and implicit space tokens % (with character code 32 and category code 10) are ignored and -% removed by the test and the \meta{token} will be removed from the -% input stream if the test is true. The function will then place +% removed by the test and the \meta{token} is removed from the +% input stream if the test is true. The function then places % either the \meta{true code} or \meta{false code} in the input stream % (as appropriate to the result of the test). % \end{function} @@ -820,7 +820,7 @@ % Tests if the next \meta{token} in the input stream has the same % character code as the \meta{test token} (as defined by the test % \cs{token_if_eq_charcode:NNTF}). Spaces are respected by the test -% and the \meta{token} will be left in the input stream after +% and the \meta{token} is left in the input stream after % the \meta{true code} or \meta{false code} (as appropriate to the % result of the test). % \end{function} @@ -833,7 +833,7 @@ % same character code as the \meta{test token} (as defined by the test % \cs{token_if_eq_charcode:NNTF}). Explicit and implicit space tokens % (with character code 32 and category code 10) are ignored and removed by -% the test and the \meta{token} will be left in the input stream after +% the test and the \meta{token} is left in the input stream after % the \meta{true code} or \meta{false code} (as appropriate to the % result of the test). % \end{function} @@ -845,8 +845,8 @@ % Tests if the next \meta{token} in the input stream has the same % character code as the \meta{test token} (as defined by the test % \cs{token_if_eq_charcode:NNTF}). Spaces are respected by the test -% and the \meta{token} will be removed from the input stream if the -% test is true. The function will then place either the +% and the \meta{token} is removed from the input stream if the +% test is true. The function then places either the % \meta{true code} or \meta{false code} in the input stream (as % appropriate to the result of the test). % \end{function} @@ -861,8 +861,8 @@ % same character code as the \meta{test token} (as defined by the test % \cs{token_if_eq_charcode:NNTF}). Explicit and implicit space tokens % (with character code 32 and category code 10) are ignored and -% removed by the test and the \meta{token} will be removed from the -% input stream if the test is true. The function will then place +% removed by the test and the \meta{token} is removed from the +% input stream if the test is true. The function then places % either the \meta{true code} or \meta{false code} in the input stream % (as appropriate to the result of the test). % \end{function} @@ -874,7 +874,7 @@ % Tests if the next \meta{token} in the input stream has the same % meaning as the \meta{test token} (as defined by the test % \cs{token_if_eq_meaning:NNTF}). Spaces are respected by the test -% and the \meta{token} will be left in the input stream after +% and the \meta{token} is left in the input stream after % the \meta{true code} or \meta{false code} (as appropriate to the % result of the test). % \end{function} @@ -887,7 +887,7 @@ % same meaning as the \meta{test token} (as defined by the test % \cs{token_if_eq_meaning:NNTF}). Explicit and implicit space tokens % (with character code 32 and category code 10) are ignored and -% removed by the test and the \meta{token} will be left in the input +% removed by the test and the \meta{token} is left in the input % stream after the \meta{true code} or \meta{false code} (as % appropriate to the result of the test). % \end{function} @@ -899,8 +899,8 @@ % Tests if the next \meta{token} in the input stream has the same % meaning as the \meta{test token} (as defined by the test % \cs{token_if_eq_meaning:NNTF}). Spaces are respected by the test -% and the \meta{token} will be removed from the input stream if the -% test is true. The function will then place either the +% and the \meta{token} is removed from the input stream if the +% test is true. The function then places either the % \meta{true code} or \meta{false code} in the input stream (as % appropriate to the result of the test). % \end{function} @@ -915,8 +915,8 @@ % same meaning as the \meta{test token} (as defined by the test % \cs{token_if_eq_meaning:NNTF}). Explicit and implicit space tokens % (with character code 32 and category code 10) are ignored and -% removed by the test and the \meta{token} will be removed from the -% input stream if the test is true. The function will then place +% removed by the test and the \meta{token} is removed from the +% input stream if the test is true. The function then places % either the \meta{true code} or \meta{false code} in the input stream % (as appropriate to the result of the test). % \end{function} @@ -932,18 +932,18 @@ % \begin{syntax} % \cs{token_get_arg_spec:N} \meta{token} % \end{syntax} -% If the \meta{token} is a macro, this function will leave +% If the \meta{token} is a macro, this function leaves % the primitive \TeX{} argument specification in input stream as % a string of tokens of category code $12$ (with spaces having category % code $10$). Thus for example for a token \cs{next} defined by % \begin{verbatim} % \cs_set:Npn \next #1#2 { x #1 y #2 } % \end{verbatim} -% will leave |#1#2| in the input stream. If the \meta{token} is -% not a macro then \cs{scan_stop:} will be left in the input stream. +% leaves |#1#2| in the input stream. If the \meta{token} is +% not a macro then \cs{scan_stop:} is left in the input stream. % \begin{texnote} % If the arg~spec. contains the string |->|, then the |spec| function -% will produce incorrect results. +% produces incorrect results. % \end{texnote} % \end{function} % @@ -951,18 +951,18 @@ % \begin{syntax} % \cs{token_get_replacement_spec:N} \meta{token} % \end{syntax} -% If the \meta{token} is a macro, this function will leave +% If the \meta{token} is a macro, this function leaves % the replacement text in input stream as % a string of tokens of category code $12$ (with spaces having category % code $10$). Thus for example for a token \cs{next} defined by % \begin{verbatim} % \cs_set:Npn \next #1#2 { x #1~y #2 } % \end{verbatim} -% will leave \verb|x#1 y#2| in the input stream. If the \meta{token} is -% not a macro then \cs{scan_stop:} will be left in the input stream. +% leaves \verb|x#1 y#2| in the input stream. If the \meta{token} is +% not a macro then \cs{scan_stop:} is left in the input stream. % \begin{texnote} % If the arg~spec. contains the string |->|, then the |spec| function -% will produce incorrect results. +% produces incorrect results. % \end{texnote} % \end{function} % @@ -970,15 +970,15 @@ % \begin{syntax} % \cs{token_get_prefix_spec:N} \meta{token} % \end{syntax} -% If the \meta{token} is a macro, this function will leave +% If the \meta{token} is a macro, this function leaves % the \TeX{} prefixes applicable in input stream as % a string of tokens of category code $12$ (with spaces having category % code $10$). Thus for example for a token \cs{next} defined by % \begin{verbatim} % \cs_set:Npn \next #1#2 { x #1~y #2 } % \end{verbatim} -% will leave |\long| in the input stream. If the \meta{token} is -% not a macro then \cs{scan_stop:} will be left in the input stream +% leaves |\long| in the input stream. If the \meta{token} is +% not a macro then \cs{scan_stop:} is left in the input stream % \end{function} % % \section{Description of all possible tokens} @@ -1011,7 +1011,7 @@ % There are also a few internal tokens. The following list may be % incomplete in some engines. % \begin{itemize} -% \item Expanding \tn{the}\th{font} results in a token that looks +% \item Expanding \tn{the}\tn{font} results in a token that looks % identical to the command that was used to select the current font % (such as \tn{tenrm}) but it differs from it in shape. % \item A \enquote{frozen} |\relax|, which differs from the primitive in @@ -1030,7 +1030,7 @@ % \end{itemize} % % The meaning of a (non-active) character token is fixed by its category -% code (and character code) and cannot be changed. We will call these +% code (and character code) and cannot be changed. We call these % tokens \emph{explicit} character tokens. Category codes that a % character token can have are listed below by giving a sample output of % the \TeX{} primitive \tn{meaning}, together with their \LaTeX3 names @@ -1055,7 +1055,7 @@ % % The meaning of a control sequence or active character can be identical % to that of any character token listed above (with any character code), -% and we will call such tokens \emph{implicit} character tokens. The +% and we call such tokens \emph{implicit} character tokens. The % meaning is otherwise in the following list: % \begin{itemize} % \item a macro, used in \LaTeX3 for most functions and some variables @@ -1499,9 +1499,9 @@ \char_set_catcode_math_toggle:n { 0 } \tl_put_right:Nn \l_@@_tmp_tl { \or: ^^@ } % \end{macrocode} -% As \TeX{} will be very unhappy if if finds an alignment character inside +% As \TeX{} is very unhappy if if finds an alignment character inside % a primitive \tn{halign} even when skipping false branches, some precautions -% are required. \TeX{} will be happy if the token is hidden inside +% are required. \TeX{} is happy if the token is hidden inside % \tn{unexpanded} (which needs to be the primitive). The expansion chain here % is required so that the conditional gets cleaned up correctly (other code % assumes there is exactly one token to skip during the clean-up). @@ -1715,7 +1715,7 @@ % avoid an error message: within a group we prevent % \cs{c_parameter_token} from behaving like a macro parameter character. % The definitions of \cs{prg_new_conditional:Npnn} are global, so they -% will remain after the group. +% remain after the group. % \begin{macrocode} \group_begin: \cs_set_eq:NN \c_parameter_token \scan_stop: @@ -1838,7 +1838,7 @@ % % \begin{macro}[pTF]{\token_if_macro:N} % \begin{macro}[aux]{\@@_if_macro_p:w} -% When a token is a macro, \cs{token_to_meaning:N} will always output +% When a token is a macro, \cs{token_to_meaning:N} always outputs % something like |\long macro:#1->#1| so we could naively check to % see if the meaning contains |->|. However, this can fail the five % \tn[no-index]{...mark} primitives, whose meaning has the form @@ -1901,8 +1901,8 @@ % \end{macro} % % \begin{macro}[pTF]{\token_if_expandable:N} -% Check if token is expandable. We use the fact that \TeX{} will -% temporarily convert \cs{exp_not:N} \meta{token} into \cs{scan_stop:} +% Check if token is expandable. We use the fact that \TeX{} +% temporarily converts \cs{exp_not:N} \meta{token} into \cs{scan_stop:} % if \meta{token} is expandable. An \texttt{undefined} token is not % considered as expandable. No problem nesting the conditionals, % since the third |#1| is only skipped if it is non-expandable (hence @@ -1938,7 +1938,7 @@ % argument begins with a particular string. Each auxiliary takes an % argument delimited by a string, a second one delimited by % \cs{q_stop}, and returns the first one and its delimiter. -% This result will eventually be compared to another string. +% This result is eventually compared to another string. % \begin{macrocode} \group_begin: \cs_set_protected:Npn \@@_tmp:w #1 @@ -2088,7 +2088,7 @@ % % We start by removing the two first (non-space) characters from % the meaning. This removes the escape character (which may be -% inexistent depending on \tn{endlinechar}), and takes care +% nonexistent depending on \tn{endlinechar}), and takes care % of three of the exceptions: \tn{space}, \tn{italiccorr} % and \tn{hyphen}, whose meaning is at most two characters. % This leaves a string terminated by some |:|, and \cs{q_stop}. @@ -2336,7 +2336,7 @@ % The catcode and charcode tests are very similar, and in order to use % the same auxiliaries we do something a little bit odd, firing % \cs{if_catcode:w} and \cs{if_charcode:w} before finding the operands -% for those tests, which will only be given in the |auxii:N| and +% for those tests, which are only given in the |auxii:N| and % |auxiii:| auxiliaries. For our purposes, three kinds of tokens may % follow the peeking function: % \begin{itemize} |