diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3token.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3token.dtx | 333 |
1 files changed, 163 insertions, 170 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index 293de965779..e267c8c07f5 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx @@ -9,7 +9,7 @@ %% %% http://www.latex-project.org/lppl.txt %% -%% This file is part of the "expl3 bundle" (The Work in LPPL) +%% This file is part of the "l3kernel bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% %% The released version of this bundle is available from CTAN. @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3token.dtx 2691 2011-08-29 20:08:46Z joseph $ +\GetIdInfo$Id: l3token.dtx 2819 2011-09-12 17:26:47Z will $ {L3 Experimental token manipulation} %</driver|package> %<*driver> @@ -107,7 +107,7 @@ % \begin{verbatim} % \cs_new:Npn \show_until_if:w #1 \if:w { \tl_show:n {#1} } % \show_until_if:w \tex_if:D \if_charcode:w \if:w -% \end{verbatim} +% \end{verbatim} % % \section{Character tokens} % @@ -179,7 +179,7 @@ % The first \meta{integer expression} % is the character code and the second is the category code to apply. % The setting applies within the current \TeX{} group. In general, the -% symbolic functions \cs{char_make_\meta{type}} should be preferred, +% symbolic functions \cs{char_set_catcode_\meta{type}} should be preferred, % but there are cases where these lower-level functions may be useful. % \end{function} % @@ -343,6 +343,11 @@ % This will be an implicit representation of \meta{token2}. % \end{function} % +% ^^A Because it's late I can't figure out a better way to handle this: +% \ExplSyntaxOn +% \cs_set_eq:NN \c_alignment_token @ +% \cs_set_eq:NN \c_parameter_token @ +% \ExplSyntaxOff % \begin{variable} % { % \c_group_begin_token, @@ -358,7 +363,11 @@ % by their name. They are used internally for test purposes but % are also available to the programmer for other uses. % \end{variable} -% +% \ExplSyntaxOn +% \cs_set_eq:NN \c_alignment_token @ +% \cs_set_eq:NN \c_parameter_token # +% \ExplSyntaxOff +% % \begin{variable} % { % \c_catcode_letter_token, @@ -368,15 +377,15 @@ % by their name. They are used internally for test purposes and should % not be used other than for category code tests. % \end{variable} -% +% % \begin{variable}{\c_catcode_active_tl} % A token list containing an active token. This is used internally % for test purposes and should not be used other than in % appropriately-constructed category code tests. % \end{variable} -% +% % \section{Converting tokens} -% +% % \begin{function}[EXP]{\token_to_meaning:N} % \begin{syntax} % \cs{token_to_meaning:N} \meta{token} @@ -391,7 +400,7 @@ % This is the \TeX{} primitive \tn{meaning}. % \end{texnote} % \end{function} -% +% % \begin{function}[EXP]{\token_to_str:N, \token_to_str:c} % \begin{syntax} % \cs{token_to_str:N} \meta{token} @@ -402,7 +411,7 @@ % category code $12$ (the escape character is part of the % \meta{token}). This function requires only a single expansion. % \begin{texnote} -% \cs{token_to_str:N} is the \TeX{} primitive \cs{string} renamed. +% \cs{token_to_str:N} is the \TeX{} primitive \tn{string} renamed. % \end{texnote} % \end{function} % @@ -410,9 +419,8 @@ % % \begin{function}[EXP,pTF]{\token_if_group_begin:N} % \begin{syntax} -% \cs{token_if_group_begin_p:N} \meta{token} -% \cs{token_if_group_begin:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_group_begin_p:N} \meta{token} \\ +% \cs{token_if_group_begin:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of a begin group token % (|{| when normal \TeX{} category codes are in ^^A } @@ -423,9 +431,8 @@ % % \begin{function}[EXP,pTF]{\token_if_group_end:N} % \begin{syntax} -% \cs{token_if_group_end_p:N} \meta{token} -% \cs{token_if_group_end:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_group_end_p:N} \meta{token} \\ +% \cs{token_if_group_end:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of an end group token % (^^A { @@ -436,9 +443,8 @@ % % \begin{function}[EXP,pTF]{\token_if_math_toggle:N} % \begin{syntax} -% \cs{token_if_math_toggle_p:N} \meta{token} -% \cs{token_if_math_toggle:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_math_toggle_p:N} \meta{token} \\ +% \cs{token_if_math_toggle:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of a math shift token % (|$| when normal \TeX{} category codes are in force). @@ -446,9 +452,8 @@ % % \begin{function}[EXP,pTF]{\token_if_alignment:N} % \begin{syntax} -% \cs{token_if_alignment_p:N} \meta{token} -% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_alignment_p:N} \meta{token} \\ +% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of an alignment token % (|&| when normal \TeX{} category codes are in force). @@ -456,9 +461,8 @@ % % \begin{function}[EXP,pTF]{\token_if_parameter:N} % \begin{syntax} -% \cs{token_if_parameter_p:N} \meta{token} -% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_parameter_p:N} \meta{token} \\ +% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of a macro parameter token % (|#| when normal \TeX{} category codes are in force). @@ -466,9 +470,8 @@ % % \begin{function}[EXP,pTF]{\token_if_math_superscript:N} % \begin{syntax} -% \cs{token_if_math_superscript_p:N} \meta{token} -% \cs{token_if_math_superscript:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_math_superscript_p:N} \meta{token} \\ +% \cs{token_if_math_superscript:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of a superscript token % (|^| when normal \TeX{} category codes are in force). @@ -476,9 +479,8 @@ % % \begin{function}[EXP,pTF]{\token_if_math_subscript:N} % \begin{syntax} -% \cs{token_if_math_subscript_p:N} \meta{token} -% \cs{token_if_math_subscript:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_math_subscript_p:N} \meta{token} \\ +% \cs{token_if_math_subscript:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of a subscript token % (|_| when normal \TeX{} category codes are in force). @@ -486,9 +488,8 @@ % % \begin{function}[EXP,pTF]{\token_if_space:N} % \begin{syntax} -% \cs{token_if_space_p:N} \meta{token} -% \cs{token_if_space:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_space_p:N} \meta{token} \\ +% \cs{token_if_space:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of a space token. % Note that an explicit space token with character code $32$ cannot @@ -497,18 +498,16 @@ % % \begin{function}[EXP,pTF]{\token_if_letter:N} % \begin{syntax} -% \cs{token_if_letter_p:N} \meta{token} -% \cs{token_if_letter:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_letter_p:N} \meta{token} \\ +% \cs{token_if_letter:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of a letter token. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_other:N} % \begin{syntax} -% \cs{token_if_other_p:N} \meta{token} -% \cs{token_if_other:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_other_p:N} \meta{token} \\ +% \cs{token_if_other:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of an \enquote{other} % token. @@ -516,43 +515,39 @@ % % \begin{function}[EXP,pTF]{\token_if_active:N} % \begin{syntax} -% \cs{token_if_active_p:N} \meta{token} -% \cs{token_if_active:NTF} \meta{token} \Arg{true code} -% ~~\Arg{false code} +% \cs{token_if_active_p:N} \meta{token} \\ +% \cs{token_if_active:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of an active character. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_eq_catcode:NN} % \begin{syntax} -% \cs{token_if_eq_catcode_p:NN} \meta{token1} \meta{token2} -% \cs{token_if_eq_catcode:NNTF} \meta{token1} \meta{token2} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_eq_catcode_p:NN} \meta{token1} \meta{token2} \\ +% \cs{token_if_eq_catcode:NNTF} \meta{token1} \meta{token2} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the two \meta{tokens} have the same category code. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_eq_charcode:NN} % \begin{syntax} -% \cs{token_if_eq_charcode_p:NN} \meta{token1} \meta{token2} -% \cs{token_if_eq_charcode:NNTF} \meta{token1} \meta{token2} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_eq_charcode_p:NN} \meta{token1} \meta{token2} \\ +% \cs{token_if_eq_charcode:NNTF} \meta{token1} \meta{token2} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the two \meta{tokens} have the same character code. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_eq_meaning:NN} % \begin{syntax} -% \cs{token_if_eq_meaning_p:NN} \meta{token1} \meta{token2} -% \cs{token_if_eq_meaning:NNTF} \meta{token1} \meta{token2} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_eq_meaning_p:NN} \meta{token1} \meta{token2} \\ +% \cs{token_if_eq_meaning:NNTF} \meta{token1} \meta{token2} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the two \meta{tokens} have the same meaning when expanded. % \end{function} % -% \begin{function}[EXP,pTF]{\token_if_macro:N} +% \begin{function}[updated = 2001-05-23, EXP,pTF]{\token_if_macro:N} % \begin{syntax} -% \cs{token_if_macro_p:N} \meta{token} +% \cs{token_if_macro_p:N} \meta{token} \\ % \cs{token_if_macro:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is a \TeX{} macro. @@ -560,7 +555,7 @@ % % \begin{function}[EXP,pTF]{\token_if_cs:N} % \begin{syntax} -% \cs{token_if_cs_p:N} \meta{token} +% \cs{token_if_cs_p:N} \meta{token} \\ % \cs{token_if_cs:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is a control sequence. @@ -568,9 +563,8 @@ % % \begin{function}[EXP,pTF]{\token_if_expandable:N} % \begin{syntax} -% \cs{token_if_expandable_p:N} \meta{token} -% \cs{token_if_expandable:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_expandable_p:N} \meta{token} \\ +% \cs{token_if_expandable:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is expandable. This test returns \meta{false} % for an undefined token. @@ -578,18 +572,16 @@ % % \begin{function}[EXP,pTF]{\token_if_long_macro:N} % \begin{syntax} -% \cs{token_if_long_macro_p:N} \meta{token} -% \cs{token_if_long_macro:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_long_macro_p:N} \meta{token} \\ +% \cs{token_if_long_macro:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is a long macro. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_protected_macro:N} % \begin{syntax} -% \cs{token_if_protected_macro_p:N} \meta{token} -% \cs{token_if_protected_macro:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \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}. @@ -597,73 +589,65 @@ % %% \begin{function}[EXP,pTF]{\token_if_protected_long_macro:N} % \begin{syntax} -% \cs{token_if_protected_long_macro_p:N} \meta{token} -% \cs{token_if_protected_long_macro:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_protected_long_macro_p:N} \meta{token} \\ +% \cs{token_if_protected_long_macro:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is a protected long macro. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_chardef:N} % \begin{syntax} -% \cs{token_if_chardef_p:N} \meta{token} -% \cs{token_if_chardef:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_chardef_p:N} \meta{token} \\ +% \cs{token_if_chardef:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is defined to be a chardef. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_mathchardef:N} % \begin{syntax} -% \cs{token_if_mathchardef_p:N} \meta{token} -% \cs{token_if_mathchardef:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_mathchardef_p:N} \meta{token} \\ +% \cs{token_if_mathchardef:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is defined to be a mathchardef. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_dim_register:N} % \begin{syntax} -% \cs{token_if_dim_register_p:N} \meta{token} -% \cs{token_if_dim_register:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_dim_register_p:N} \meta{token} \\ +% \cs{token_if_dim_register:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is defined to be a dimension register. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_int_register:N} % \begin{syntax} -% \cs{token_if_int_register_p:N} \meta{token} -% \cs{token_if_int_register:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_int_register_p:N} \meta{token} \\ +% \cs{token_if_int_register:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is defined to be a integer register. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_skip_register:N} % \begin{syntax} -% \cs{token_if_skip_register_p:N} \meta{token} -% \cs{token_if_skip_register:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_skip_register_p:N} \meta{token} \\ +% \cs{token_if_skip_register:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is defined to be a skip register. % \end{function} % % \begin{function}[EXP,pTF]{\token_if_toks_register:N} % \begin{syntax} -% \cs{token_if_toks_register_p:N} \meta{token} -% \cs{token_if_toks_register:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_toks_register_p:N} \meta{token} \\ +% \cs{token_if_toks_register:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is defined to be a toks register % (not used by\LaTeX3). % \end{function} % -% \begin{function}[EXP,pTF]{\token_if_primitive:N} +% \begin{function}[updated = 2001-05-23, EXP,pTF]{\token_if_primitive:N} % \begin{syntax} -% \cs{token_if_primitive_p:N} \meta{token} -% \cs{token_if_primitive:NTF} \meta{token} -% ~~\Arg{true code} \Arg{false code} +% \cs{token_if_primitive_p:N} \meta{token} \\ +% \cs{token_if_primitive:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token} is an engine primitive. % \end{function} @@ -713,7 +697,7 @@ % as described above. % \end{variable} % -% \begin{function}[TF]{\peek_catcode:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode:N} % \begin{syntax} % \cs{peek_catcode:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} @@ -725,10 +709,9 @@ % result of the test). % \end{function} % -% \begin{function}[TF]{\peek_catcode_ignore_spaces:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode_ignore_spaces:N} % \begin{syntax} -% \cs{peek_catcode_ignore_spaces:NTF} \meta{test token} -% ~~\Arg{true code} \Arg{false code} +% \cs{peek_catcode_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} % 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 @@ -738,10 +721,9 @@ % result of the test). % \end{function} % -% \begin{function}[TF]{\peek_catcode_remove:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode_remove:N} % \begin{syntax} -% \cs{peek_catcode_remove:NTF} \meta{test token} -% ~~\Arg{true code} \Arg{false code} +% \cs{peek_catcode_remove:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} % 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 @@ -752,10 +734,10 @@ % appropriate to the result of the test). % \end{function} % -% \begin{function}[TF]{\peek_catcode_remove_ignore_spaces:N} +% \begin{function}[updated = 2011-07-02, TF] +% {\peek_catcode_remove_ignore_spaces:N} % \begin{syntax} -% \cs{peek_catcode_remove_ignore_spaces:NTF} \meta{test token} -% ~~\Arg{true code} \Arg{false code} +% \cs{peek_catcode_remove_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} % 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 @@ -766,10 +748,9 @@ % appropriate to the result of the test). % \end{function} % -% \begin{function}[TF]{\peek_charcode:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode:N} % \begin{syntax} -% \cs{peek_charcode:NTF} \meta{test token} -% ~~\Arg{true code} \Arg{false code} +% \cs{peek_charcode:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} % 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 @@ -779,10 +760,9 @@ % result of the test). % \end{function} % -% \begin{function}[TF]{\peek_charcode_ignore_spaces:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode_ignore_spaces:N} % \begin{syntax} -% \cs{peek_charcode_ignore_spaces:NTF} \meta{test token} -% ~~\Arg{true code} \Arg{false code} +% \cs{peek_charcode_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} % 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 @@ -792,10 +772,9 @@ % result of the test). % \end{function} % -% \begin{function}[TF]{\peek_charcode_remove:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode_remove:N} % \begin{syntax} -% \cs{peek_charcode_remove:NTF} \meta{test token} -% ~~\Arg{true code} \Arg{false code} +% \cs{peek_charcode_remove:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} % 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 @@ -806,7 +785,8 @@ % appropriate to the result of the test). % \end{function} % -% \begin{function}[TF]{\peek_charcode_remove_ignore_spaces:N} +% \begin{function}[updated = 2011-07-02, TF] +% {\peek_charcode_remove_ignore_spaces:N} % \begin{syntax} % \cs{peek_charcode_remove_ignore_spaces:NTF} \meta{test token} % ~~\Arg{true code} \Arg{false code} @@ -820,7 +800,7 @@ % appropriate to the result of the test). % \end{function} % -% \begin{function}[TF]{\peek_meaning:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning:N} % \begin{syntax} % \cs{peek_meaning:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} @@ -832,10 +812,9 @@ % result of the test). % \end{function} % -% \begin{function}[TF]{\peek_meaning_ignore_spaces:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning_ignore_spaces:N} % \begin{syntax} -% \cs{peek_meaning_ignore_spaces:NTF} \meta{test token} -% ~~\Arg{true code} \Arg{false code} +% \cs{peek_meaning_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the next \meta{token} in the input stream has the same % meaning as the \meta{test token} (as defined by the test @@ -845,10 +824,9 @@ % result of the test). % \end{function} % -% \begin{function}[TF]{\peek_meaning_remove:N} +% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning_remove:N} % \begin{syntax} -% \cs{peek_meaning_remove:NTF} \meta{test token} -% ~~\Arg{true code} \Arg{false code} +% \cs{peek_meaning_remove:NTF} \meta{test token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the next \meta{token} in the input stream has the same % meaning as the \meta{test token} (as defined by the test @@ -859,7 +837,8 @@ % appropriate to the result of the test). % \end{function} % -% \begin{function}[TF]{\peek_meaning_remove_ignore_spaces:N} +% \begin{function}[updated = 2011-07-02, TF] +% {\peek_meaning_remove_ignore_spaces:N} % \begin{syntax} % \cs{peek_meaning_remove_ignore_spaces:NTF} \meta{test token} % ~~\Arg{true code} \Arg{false code} @@ -928,7 +907,7 @@ % 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 % \end{function} -% +% % \section{Experimental token functions} % % \begin{function}{\char_active_set:Npn, \char_active_set:Npx} @@ -941,7 +920,7 @@ % \emph{etc.}) will be replaced by those absorbed % This definition is local to the current \TeX{} group. % \end{function} -% +% % \begin{function}{\char_active_gset:Npn, \char_active_gset:Npx} % \begin{syntax} % \cs{char_active_gset:Npn} \meta{char} \meta{parameters} \Arg{code} @@ -961,7 +940,7 @@ % \meta{fiucntion} (which may itself be an active character). This % definition is local to the current \TeX{} group. % \end{function} -% +% % \begin{function}{\char_active_gset_eq:NN} % \begin{syntax} % \cs{char_active_gset_eq:NN} \meta{char} \meta{function} @@ -971,7 +950,7 @@ % definition is global. % \end{function} % -% \begin{function}[TF]{\peek_N_type:} +% \begin{function}[added = 2011-08-14,TF]{\peek_N_type:} % \begin{syntax} % \cs{peek_N_type:TF} \Arg{true code} \Arg{false code} % \end{syntax} @@ -1032,18 +1011,18 @@ % \char_set_catcode_group_begin:N , % \char_set_catcode_group_end:N , % \char_set_catcode_math_toggle:N , -% \char_set_catcode_alignment:N , +% \char_set_catcode_alignment:N , % \char_set_catcode_end_line:N , % \char_set_catcode_parameter:N , % \char_set_catcode_math_superscript:N , -% \char_set_catcode_math_subscript:N , +% \char_set_catcode_math_subscript:N , % \char_set_catcode_ignore:N , -% \char_set_catcode_space:N , +% \char_set_catcode_space:N , % \char_set_catcode_letter:N , -% \char_set_catcode_other:N , +% \char_set_catcode_other:N , % \char_set_catcode_active:N , -% \char_set_catcode_comment:N , -% \char_set_catcode_invalid:N +% \char_set_catcode_comment:N , +% \char_set_catcode_invalid:N % } % \begin{macrocode} \cs_new_protected_nopar:Npn \char_set_catcode_escape:N #1 @@ -1087,18 +1066,18 @@ % \char_set_catcode_group_begin:n , % \char_set_catcode_group_end:n , % \char_set_catcode_math_toggle:n , -% \char_set_catcode_alignment:n , +% \char_set_catcode_alignment:n , % \char_set_catcode_end_line:n , % \char_set_catcode_parameter:n , % \char_set_catcode_math_superscript:n , -% \char_set_catcode_math_subscript:n , +% \char_set_catcode_math_subscript:n , % \char_set_catcode_ignore:n , -% \char_set_catcode_space:n , +% \char_set_catcode_space:n , % \char_set_catcode_letter:n , -% \char_set_catcode_other:n , +% \char_set_catcode_other:n , % \char_set_catcode_active:n , -% \char_set_catcode_comment:n , -% \char_set_catcode_invalid:n +% \char_set_catcode_comment:n , +% \char_set_catcode_invalid:n % } % \begin{macrocode} \cs_new_protected_nopar:Npn \char_set_catcode_escape:n #1 @@ -1230,7 +1209,7 @@ \group_end: % \end{macrocode} % \end{macro} -% +% % \begin{variable}{\c_catcode_active_tl} % Not an implicit token! % \begin{macrocode} @@ -1303,7 +1282,7 @@ \cs_set_eq:NN \c_parameter_token \scan_stop: \prg_new_conditional:Npnn \token_if_parameter:N #1 { p , T , F , TF } { - \if_catcode:w \exp_not:N #1 \c_parameter_token + \if_catcode:w \exp_not:N #1 \c_parameter_token \prg_return_true: \else: \prg_return_false: \fi: } \group_end: @@ -1422,7 +1401,7 @@ % When a token is a macro, |\token_to_meaning:N| will always output % something like |\long macro:#1->#1| so we could naively check to % see if the meaning contains |->|. However, this can fail the five -% \cs{tex_...mark:D} primitives, whose meaning has the form +% \tn{...mark} primitives, whose meaning has the form % |...mark:|\meta{user material}. The problem is that the % \meta{user material} can contain |->|. % @@ -1541,7 +1520,7 @@ \group_end: % \end{macrocode} % First up is checking if something has been defined with -% |\tex_chardef:D| or |\tex_mathchardef:D|. This is easy since \TeX{} +% \tn{chardef} or \tn{mathchardef}. This is easy since \TeX{} % thinks of such tokens as hexadecimal so it stores them as % |\char"|\meta{hex~number} or |\mathchar"|\meta{hex~number}. % \begin{macrocode} @@ -1682,20 +1661,20 @@ % % Ten exceptions: on the one hand, \cs{c_undefined:D} is not a % primitive, but its meaning is |undefined|, only letters; -% on the other hand, \cs{tex_space:D}, \cs{tex_italiccorr:D}, -% \cs{tex_hyphen:D}, \cs{tex_firstmark:D}, \cs{tex_topmark:D}, -% \cs{tex_botmark:D}, \cs{tex_splitfirstmark:D}, \cs{tex_splitbotmark:D}, -% and \cs{tex_nullfont:D} are primitives, but have non-letters +% on the other hand, \tn{space}, \tn{italiccorr}, +% \tn{hyphen}, \tn{firstmark}, \tn{topmark}, +% \tn{botmark}, \tn{splitfirstmark}, \tn{splitbotmark}, +% and \tn{nullfont} are primitives, but have non-letters % in their meaning. % % We start by removing the two first (non-space) characters from % the meaning. This removes the escape character (which may be -% inexistent depending on \cs{tex_endlinechar:D}), and takes care -% of three of the exceptions: \cs{tex_space:D}, \cs{tex_italiccorr:D} -% and \cs{tex_hyphen:D}, whose meaning is at most two characters. -% This leaves a string terminated by some |:|, and \cs{q_stop}. +% inexistent 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}. % -% The meaning of each one of the five \cs{tex_...mark:D} primitives +% The meaning of each one of the five \tn{...mark} primitives % has the form \meta{letters}|:|\meta{user material}. In other words, % the first non-letter is a colon. We remove everything after the first % colon. @@ -1703,10 +1682,10 @@ % We are now left with a string, which we must analyze. For primitives, % it contains only letters. For non-primitives, it contains either % |"|, or a space, or a digit. Two exceptions remain: \cs{c_undefined:D}, -% which is not a primitive, and \cs{tex_nullfont:D}, which is a primitive. +% which is not a primitive, and \tn{nullfont}, which is a primitive. % % Spaces cannot be grabbed in an undelimited way, so we check them -% separately. If there is a space, we test for \cs{tex_nullfont:D}. +% separately. If there is a space, we test for \tn{nullfont}. % Otherwise, we go through characters one by one, and stop at the % first character less than |`A| (this is not quite a test for % \enquote{only letters}, but is close enough to work in this context). @@ -1830,13 +1809,13 @@ % % \begin{macro}{\peek_after:Nw} % \begin{macro}{\peek_after:Nw} -% Simple wrappers for \cs{tex_futurelet:D}: no arguments absorbed +% Simple wrappers for \tn{futurelet}: no arguments absorbed % here. % \begin{macrocode} \cs_new_protected_nopar:Npn \peek_after:Nw { \tex_futurelet:D \l_peek_token } \cs_new_protected_nopar:Npn \peek_gafter:Nw - { \pref_global:D \tex_futurelet:D \g_peek_token } + { \tex_global:D \tex_futurelet:D \g_peek_token } % \end{macrocode} % \end{macro} % \end{macro} @@ -2144,7 +2123,7 @@ % \end{macro} % \end{macro} % \end{macro} -% +% % \subsection{Experimental token functions} % % \begin{macro}{\char_active_set:Npn,\char_active_set:Npx} @@ -2153,7 +2132,7 @@ % \begin{macrocode} \group_begin: \char_set_catcode_active:N \^^@ - \cs_set:Npn \char_tmp:NN #1#2 + \cs_set:Npn \char_tmp:NN #1#2 { \cs_new:Npn #1 ##1 { @@ -2216,11 +2195,13 @@ % \begin{macro}{\char_set_sfcode:w} % Primitives renamed. % \begin{macrocode} +%<*deprecated> \cs_new_eq:NN \char_set_catcode:w \tex_catcode:D \cs_new_eq:NN \char_set_mathcode:w \tex_mathcode:D \cs_new_eq:NN \char_set_lccode:w \tex_lccode:D \cs_new_eq:NN \char_set_uccode:w \tex_uccode:D \cs_new_eq:NN \char_set_sfcode:w \tex_sfcode:D +%</deprecated> % \end{macrocode} % \end{macro} % \end{macro} @@ -2240,6 +2221,7 @@ % \begin{macro}{\char_show_value_sfcode:w} % More |w| functions we should not have. % \begin{macrocode} +%<*deprecated> \cs_new_nopar:Npn \char_value_catcode:w { \tex_the:D \char_set_catcode:w } \cs_new_nopar:Npn \char_show_value_catcode:w { \tex_showthe:D \char_set_catcode:w } @@ -2255,6 +2237,7 @@ \cs_new_nopar:Npn \char_value_sfcode:w { \tex_the:D \char_set_sfcode:w } \cs_new_nopar:Npn \char_show_value_sfcode:w { \tex_showthe:D \char_set_sfcode:w } +%</deprecated> % \end{macrocode} % \end{macro} % \end{macro} @@ -2271,54 +2254,60 @@ % \begin{macro}{\peek_gafter:NN} % The second argument here must be |w|. % \begin{macrocode} +%<*deprecated> \cs_new_eq:NN \peek_after:NN \peek_after:Nw \cs_new_eq:NN \peek_gafter:NN \peek_gafter:Nw +%</deprecated> % \end{macrocode} % \end{macro} % \end{macro} -% +% % Functions deprecated 2011-05-28 for removal by 2011-08-31. -% +% % \begin{macro}{\c_alignment_tab_token} % \begin{macro}{\c_math_shift_token} % \begin{macro}{\c_letter_token} % \begin{macro}{\c_other_char_token} % \begin{macrocode} +%<*deprecated> \cs_new_eq:NN \c_alignment_tab_token \c_alignment_token \cs_new_eq:NN \c_math_shift_token \c_math_toggle_token \cs_new_eq:NN \c_letter_token \c_catcode_letter_token \cs_new_eq:NN \c_other_char_token \c_catcode_other_token +%</deprecated> % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} -% +% % \begin{macro}{\c_active_char_token} % An odd one: this was never a |token|! % \begin{macrocode} +%<*deprecated> \cs_new_eq:NN \c_active_char_token \c_catcode_active_tl +%</deprecated> % \end{macrocode} % \end{macro} -% +% % \begin{macro} % { % \char_make_escape:N , % \char_make_group_begin:N , % \char_make_group_end:N , % \char_make_math_toggle:N , -% \char_make_alignment:N , +% \char_make_alignment:N , % \char_make_end_line:N , % \char_make_parameter:N , % \char_make_math_superscript:N , -% \char_make_math_subscript:N , +% \char_make_math_subscript:N , % \char_make_ignore:N , -% \char_make_space:N , +% \char_make_space:N , % \char_make_letter:N , -% \char_make_other:N , +% \char_make_other:N , % \char_make_active:N , -% \char_make_comment:N , -% \char_make_invalid:N +% \char_make_comment:N , +% \char_make_invalid:N % } % \begin{macro} % { @@ -2326,21 +2315,22 @@ % \char_make_group_begin:n , % \char_make_group_end:n , % \char_make_math_toggle:n , -% \char_make_alignment:n , +% \char_make_alignment:n , % \char_make_end_line:n , % \char_make_parameter:n , % \char_make_math_superscript:n , -% \char_make_math_subscript:n , +% \char_make_math_subscript:n , % \char_make_ignore:n , -% \char_make_space:n , +% \char_make_space:n , % \char_make_letter:n , -% \char_make_other:n , +% \char_make_other:n , % \char_make_active:n , -% \char_make_comment:n , -% \char_make_invalid:n +% \char_make_comment:n , +% \char_make_invalid:n % } -% Two renames in one block! +% Two renames in one block! % \begin{macrocode} +%<*deprecated> \cs_new_eq:NN \char_make_escape:N \char_set_catcode_escape:N \cs_new_eq:NN \char_make_begin_group:N \char_set_catcode_group_begin:N \cs_new_eq:NN \char_make_end_group:N \char_set_catcode_group_end:N @@ -2377,15 +2367,17 @@ \cs_new_eq:NN \char_make_active:n \char_set_catcode_active:n \cs_new_eq:NN \char_make_comment:n \char_set_catcode_comment:n \cs_new_eq:NN \char_make_invalid:n \char_set_catcode_invalid:n +%</deprecated> % \end{macrocode} % \end{macro} % \end{macro} -% +% % \begin{macro}[pTF]{\token_if_alignment_tab:N} % \begin{macro}[pTF]{\token_if_math_shift:N} % \begin{macro}[pTF]{\token_if_other_char:N} % \begin{macro}[pTF]{\token_if_active_char:N} % \begin{macrocode} +%<*deprecated> \cs_new_eq:NN \token_if_alignment_tab_p:N \token_if_alignment_p:N \cs_new_eq:NN \token_if_alignment_tab:NT \token_if_alignment:NT \cs_new_eq:NN \token_if_alignment_tab:NF \token_if_alignment:NF @@ -2402,6 +2394,7 @@ \cs_new_eq:NN \token_if_active_char:NT \token_if_active:NT \cs_new_eq:NN \token_if_active_char:NF \token_if_active:NF \cs_new_eq:NN \token_if_active_char:NTF \token_if_active:NTF +%</deprecated> % \end{macrocode} % \end{macro} % \end{macro} |