diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3token.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3token.dtx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index 3485c03c978..ac7ed290c36 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3token.dtx 6465 2016-03-26 16:15:09Z joseph $ +\GetIdInfo$Id: l3token.dtx 6470 2016-04-03 11:29:18Z joseph $ {L3 Experimental token manipulation} %</driver|package> %<*driver> @@ -1411,8 +1411,21 @@ \tl_set:Nx \l_@@_tmp_tl { \l_@@_tmp_tl } \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 +% a primitive \tn{halign} even when skipping false branches, some precautions +% are required. \TeX{} will be 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). +% \begin{macrocode} \char_set_catcode_alignment:n { 0 } - \tl_put_right:Nn \l_@@_tmp_tl { \or: ^^@ } + \tl_put_right:Nn \l_@@_tmp_tl + { + \or: + \etex_unexpanded:D \exp_after:wN + { \exp_after:wN ^^@ \exp_after:wN } + } \tl_put_right:Nn \l_@@_tmp_tl { \or: } \char_set_catcode_parameter:n { 0 } \tl_put_right:Nn \l_@@_tmp_tl { \or: ^^@ } |