summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3color.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3color.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3color.dtx21
1 files changed, 15 insertions, 6 deletions
diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx
index 4b94bf8059..8fc7268cdb 100644
--- a/macros/latex/contrib/l3kernel/l3color.dtx
+++ b/macros/latex/contrib/l3kernel/l3color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-15}
+% \date{Released 2022-08-05}
%
% \maketitle
%
@@ -1456,25 +1456,34 @@
% need separate treatment. To avoid repeatedly collecting the same
% token, we first check for an alignment tab: assuming we don't have
% one of those, we can \enquote{recycle} \cs{l_peek_token} safely.
+% As we have an explicit \cs{c_alignment_token}, there needs to be
+% an align-safe group present.
% \begin{macrocode}
\cs_new_protected:Npn \@@_math_scan:w
{
\peek_remove_filler:n
{
+ \group_align_safe_begin:
\peek_catcode:NTF \c_alignment_token
- { \@@_math_scan_end: }
- { \@@_math_scan_auxi: }
+ {
+ \group_align_safe_end:
+ \@@_math_scan_end:
+ }
+ {
+ \group_align_safe_end:
+ \@@_math_scan_auxi:
+ }
}
}
% \end{macrocode}
% Dealing with literal |_| and |^| is easy, and as we have exactly two cases,
% we can hard-code this. We use a hard-coded list for limits: these are all
-% primitives. The \cs{use_none:n} herealso removes the test token so it is
+% primitives. The \cs{use_none:n} here also removes the test token so it is
% left just in the right place.
% \begin{macrocode}
\cs_new_protected:Npn \@@_math_scan_auxi:
{
- \token_case_meaning:NnTF \l_peek_token
+ \token_case_catcode:NnTF \l_peek_token
{
\c_math_subscript_token { }
\c_math_superscript_token { }
@@ -1549,7 +1558,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_math_scripts:Nw #1
{
- #1
+ #1
\c_group_begin_token
\c_group_begin_token
\seq_get:NN \g_@@_math_seq \l_@@_current_tl