From bffbeb435746ef4bfc3abbbce80006f657360f3a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 11 May 2020 20:47:47 +0000 Subject: l3kernel (11may20) git-svn-id: svn://tug.org/texlive/trunk@55101 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/l3kernel/l3text-purify.dtx | 45 +++++++++++++--------- 1 file changed, 26 insertions(+), 19 deletions(-) (limited to 'Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx') diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx index 0de48966179..070e41956fb 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-05-05} +% \date{Released 2020-05-11} % % \maketitle % @@ -53,7 +53,7 @@ % % \begin{implementation} % -% \section{\pkg{l3text} implementation} +% \section{\pkg{l3text-purify} implementation} % % \begin{macrocode} %<*initex|package> @@ -65,6 +65,13 @@ % % \subsection{Purifying text} % +% \begin{macro}[EXP]{\@@_if_recursion_tail_stop:N} +% Functions to query recursion quarks. +% \begin{macrocode} +\__kernel_quark_new_test:N \@@_if_recursion_tail_stop:N +% \end{macrocode} +% \end{macro} +% % \begin{macro}[rEXP]{\text_purify:n, \@@_purify:n} % \begin{macro}[rEXP]{\@@_purify_loop:w} % \begin{macro}[rEXP]{\@@_purify_group:n} @@ -98,13 +105,13 @@ \group_align_safe_end: } \cs_new:Npn \@@_purify:n #1 - { \@@_purify_loop:w #1 \q_recursion_tail \q_recursion_stop } + { \@@_purify_loop:w #1 \q_@@_recursion_tail \q_@@_recursion_stop } % \end{macrocode} % The main loop is a standard \enquote{tl action}. Unlike the expansion % or case changing, here any groups have to be run inline. Most of the % business end is as before in the \texttt{N}-type token processing. % \begin{macrocode} -\cs_new:Npn \@@_purify_loop:w #1 \q_recursion_stop +\cs_new:Npn \@@_purify_loop:w #1 \q_@@_recursion_stop { \tl_if_head_is_N_type:nTF {#1} { \@@_purify_N_type:N } @@ -113,7 +120,7 @@ { \@@_purify_group:n } { \@@_purify_space:w } } - #1 \q_recursion_stop + #1 \q_@@_recursion_stop } \cs_new:Npn \@@_purify_group:n #1 { \@@_purify_loop:w #1 } \exp_last_unbraced:NNo \cs_new:Npn \@@_purify_space:w \c_space_tl @@ -128,30 +135,30 @@ % \begin{macrocode} \cs_new:Npn \@@_purify_N_type:N #1 { - \quark_if_recursion_tail_stop:N #1 + \@@_if_recursion_tail_stop:N #1 \@@_purify_N_type_aux:N #1 } \cs_new:Npn \@@_purify_N_type_aux:N #1 { \exp_after:wN \@@_purify_math_search:NNN \exp_after:wN #1 \l_text_math_delims_tl - \q_recursion_tail ? - \q_recursion_stop + \q_@@_recursion_tail ? + \q_@@_recursion_stop } \cs_new:Npn \@@_purify_math_search:NNN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #2 + \@@_if_recursion_tail_stop_do:Nn #2 { \@@_purify_math_cmd: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 { \@@_purify_math_start:NNw #2 #3 } } { \@@_purify_math_search:NNN #1 } } -\cs_new:Npn \@@_purify_math_start:NNw #1#2#3 \q_recursion_stop +\cs_new:Npn \@@_purify_math_start:NNw #1#2#3 \q_@@_recursion_stop { - \@@_purify_math_loop:NNw #1#2#3 \q_recursion_stop + \@@_purify_math_loop:NNw #1#2#3 \q_@@_recursion_stop \@@_purify_math_result:n { } } \cs_new:Npn \@@_purify_math_store:n #1 @@ -165,7 +172,7 @@ } \cs_new:Npn \@@_purify_math_stop:Nw #1 \@@_purify_math_result:n #2 { \exp_not:n {#1#2} } -\cs_new:Npn \@@_purify_math_loop:NNw #1#2#3 \q_recursion_stop +\cs_new:Npn \@@_purify_math_loop:NNw #1#2#3 \q_@@_recursion_stop { \tl_if_head_is_N_type:nTF {#3} { \@@_purify_math_N_type:NNN } @@ -174,11 +181,11 @@ { \@@_purify_math_group:NNn } { \@@_purify_math_space:NNw } } - #1#2#3 \q_recursion_stop + #1#2#3 \q_@@_recursion_stop } \cs_new:Npn \@@_purify_math_N_type:NNN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #3 + \@@_if_recursion_tail_stop_do:Nn #3 { \@@_purify_math_stop:Nw #1 } \token_if_eq_meaning:NNTF #3 #2 { \@@_purify_math_end:w } @@ -206,15 +213,15 @@ \cs_new:Npn \@@_purify_math_cmd:N #1 { \exp_after:wN \@@_purify_math_cmd:NN \exp_after:wN #1 - \l_text_math_arg_tl \q_recursion_tail \q_recursion_stop + \l_text_math_arg_tl \q_@@_recursion_tail \q_@@_recursion_stop } \cs_new:Npn \@@_purify_math_cmd:NN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \@@_if_recursion_tail_stop_do:Nn #2 { \@@_purify_replace:N #1 } \cs_if_eq:NNTF #2 #1 { - \use_i_delimit_by_q_recursion_stop:nw + \@@_use_i_delimit_by_q_recursion_stop:nw { \@@_purify_math_cmd:n } } { \@@_purify_math_cmd:NN #1 } @@ -264,7 +271,7 @@ } \cs_new:Npn \@@_purify_protect:N #1 { - \quark_if_recursion_tail_stop:N #1 + \@@_if_recursion_tail_stop:N #1 \@@_purify_loop:w } % \end{macrocode} -- cgit v1.2.3