diff options
author | Karl Berry <karl@freefriends.org> | 2020-05-11 20:47:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-05-11 20:47:47 +0000 |
commit | bffbeb435746ef4bfc3abbbce80006f657360f3a (patch) | |
tree | 25bd4caaead6a06571d1376a8d442fe79e071d62 /Master/texmf-dist/source/latex/l3kernel/l3text.dtx | |
parent | a3fca75048862f5c0f86ec89c88da49a55beafb7 (diff) |
l3kernel (11may20)
git-svn-id: svn://tug.org/texlive/trunk@55101 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3text.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3text.dtx | 96 |
1 files changed, 71 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text.dtx index 73f20645612..5113e03cc9c 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3text.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-05-05} +% \date{Released 2020-05-11} % % \maketitle % @@ -277,6 +277,52 @@ %<@@=text> % \end{macrocode} % +% \subsection{Internal auxiliaries} +% +% \begin{variable}{\s_@@_stop} +% Internal scan marks. +% \begin{macrocode} +\scan_new:N \s_@@_stop +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\q_@@_nil} +% Internal quarks. +% \begin{macrocode} +\quark_new:N \q_@@_nil +% \end{macrocode} +% \end{variable} +% +% \begin{macro}[pTF]{\@@_quark_if_nil:n} +% Branching quark conditional. +% \begin{macrocode} +\__kernel_quark_new_conditional:Nn \@@_quark_if_nil:n { TF } +% \end{macrocode} +% \end{macro} +% +% \begin{variable}{\q_@@_recursion_tail,\q_@@_recursion_stop} +% Internal recursion quarks. +% \begin{macrocode} +\quark_new:N \q_@@_recursion_tail +\quark_new:N \q_@@_recursion_stop +% \end{macrocode} +% \end{variable} +% +% \begin{macro}[EXP]{\@@_use_i_delimit_by_q_recursion_stop:nw} +% Functions to gobble up to a quark. +% \begin{macrocode} +\cs_new:Npn \@@_use_i_delimit_by_q_recursion_stop:nw + #1 #2 \q_@@_recursion_stop {#1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP]{\@@_if_recursion_tail_stop_do:Nn} +% Functions to query recursion quarks. +% \begin{macrocode} +\__kernel_quark_new_test:N \@@_if_recursion_tail_stop_do:Nn +% \end{macrocode} +% \end{macro} +% % \subsection{Utilities} % % \begin{macro}[EXP] @@ -379,9 +425,9 @@ \if_catcode:w + #1 12 \else: 4 \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \exp_after:wN ; - \token_to_meaning:N #1 \q_stop + \token_to_meaning:N #1 \s_@@_stop } -\cs_new:Npn \@@_token_to_explicit_auxi:w #1 ; #2 \q_stop +\cs_new:Npn \@@_token_to_explicit_auxi:w #1 ; #2 \s_@@_stop { \char_generate:nn { @@ -453,7 +499,7 @@ { { \token_if_protected_macro_p:N #1 } { \token_if_protected_long_macro_p:N #1 } - { \token_if_eq_meaning_p:NN \q_recursion_tail #1 } + { \token_if_eq_meaning_p:NN \q_@@_recursion_tail #1 } } { \prg_return_false: } { \prg_return_true: } @@ -615,7 +661,7 @@ { \group_align_safe_begin: \@@_expand_loop:w #1 - \q_recursion_tail \q_recursion_stop + \q_@@_recursion_tail \q_@@_recursion_stop \@@_expand_result:n { } } % \end{macrocode} @@ -638,7 +684,7 @@ % recursively, while spaces are just passed through. Thus all of the % action is in handling \texttt{N}-type tokens. % \begin{macrocode} -\cs_new:Npn \@@_expand_loop:w #1 \q_recursion_stop +\cs_new:Npn \@@_expand_loop:w #1 \q_@@_recursion_stop { \tl_if_head_is_N_type:nTF {#1} { \@@_expand_N_type:N } @@ -647,7 +693,7 @@ { \@@_expand_group:n } { \@@_expand_space:w } } - #1 \q_recursion_stop + #1 \q_@@_recursion_stop } \cs_new:Npn \@@_expand_group:n #1 { @@ -675,7 +721,7 @@ % \begin{macrocode} \cs_new:Npx \@@_expand_N_type:N #1 { - \exp_not:N \quark_if_recursion_tail_stop_do:Nn #1 + \exp_not:N \@@_if_recursion_tail_stop_do:Nn #1 { \exp_not:N \@@_expand_end:w } \exp_not:N \bool_lazy_any:nTF { @@ -749,16 +795,16 @@ { \exp_after:wN \@@_expand_math_search:NNN \exp_after:wN #1 \l_text_math_delims_tl - \q_recursion_tail \q_recursion_tail - \q_recursion_stop + \q_@@_recursion_tail \q_@@_recursion_tail + \q_@@_recursion_stop } \cs_new:Npn \@@_expand_math_search:NNN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #2 + \@@_if_recursion_tail_stop_do:Nn #2 { \@@_expand_explicit:N #1 } \token_if_eq_meaning:NNTF #1 #2 { - \use_i_delimit_by_q_recursion_stop:nw + \@@_use_i_delimit_by_q_recursion_stop:nw { \@@_expand_store:n {#1} \@@_expand_math_loop:Nw #3 @@ -766,7 +812,7 @@ } { \@@_expand_math_search:NNN #1 } } -\cs_new:Npn \@@_expand_math_loop:Nw #1#2 \q_recursion_stop +\cs_new:Npn \@@_expand_math_loop:Nw #1#2 \q_@@_recursion_stop { \tl_if_head_is_N_type:nTF {#2} { \@@_expand_math_N_type:NN } @@ -775,11 +821,11 @@ { \@@_expand_math_group:Nn } { \@@_expand_math_space:Nw } } - #1#2 \q_recursion_stop + #1#2 \q_@@_recursion_stop } \cs_new:Npn \@@_expand_math_N_type:NN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \@@_if_recursion_tail_stop_do:Nn #2 { \@@_expand_end:w } \@@_expand_store:n {#2} \token_if_eq_meaning:NNTF #2 #1 @@ -820,7 +866,7 @@ \exp_after:wN \@@_expand_exclude:NN \l_text_math_arg_tl #1 - \q_recursion_tail \q_recursion_stop + \q_@@_recursion_tail \q_@@_recursion_stop %</initex> %<*package> \exp_args:Ne \@@_expand_exclude:nN @@ -836,12 +882,12 @@ \cs_new:Npn \@@_expand_exclude:nN #1#2 { \@@_expand_exclude:NN #2 #1 - \q_recursion_tail \q_recursion_stop + \q_@@_recursion_tail \q_@@_recursion_stop } %</package> \cs_new:Npn \@@_expand_exclude:NN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \@@_if_recursion_tail_stop_do:Nn #2 %<*initex> { \@@_expand_cs:N #1 } %</initex> @@ -850,7 +896,7 @@ %</package> \cs_if_eq:NNTF #2 #1 { - \use_i_delimit_by_q_recursion_stop:nw + \@@_use_i_delimit_by_q_recursion_stop:nw { \@@_expand_exclude:Nn #1 } } { \@@_expand_exclude:NN #1 } @@ -869,15 +915,15 @@ { \exp_after:wN \@@_expand_letterlike:NN \exp_after:wN #1 \l_text_letterlike_tl - \q_recursion_tail \q_recursion_stop + \q_@@_recursion_tail \q_@@_recursion_stop } \cs_new:Npn \@@_expand_letterlike:NN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \@@_if_recursion_tail_stop_do:Nn #2 { \@@_expand_cs:N #1 } \cs_if_eq:NNTF #2 #1 { - \use_i_delimit_by_q_recursion_stop:nw + \@@_use_i_delimit_by_q_recursion_stop:nw { \@@_expand_store:n {#1} \@@_expand_loop:w @@ -908,10 +954,10 @@ { \cs_to_str:N #1 } #1 } \cs_new:Npn \@@_expand_protect:nN #1#2 - { \@@_expand_protect:Nw #2 #1 \q_nil #1 ~ \q_nil \q_nil \q_stop } -\cs_new:Npn \@@_expand_protect:Nw #1 #2 ~ \q_nil #3 \q_nil #4 \q_stop + { \@@_expand_protect:Nw #2 #1 \q_@@_nil #1 ~ \q_@@_nil \q_@@_nil \s_@@_stop } +\cs_new:Npn \@@_expand_protect:Nw #1 #2 ~ \q_@@_nil #3 \q_@@_nil #4 \s_@@_stop { - \quark_if_nil:nTF {#4} + \@@_quark_if_nil:nTF {#4} { \cs_if_exist:cTF {#2} { \exp_args:Ne \@@_expand_store:n { \exp_not:c {#2} } } |