inner table sockets

This commit is contained in:
Ulrike Fischer 2025-02-01 23:57:08 +01:00
parent bdd3cd7480
commit ece360295a
2 changed files with 34 additions and 4 deletions

View File

@ -91,11 +91,11 @@
\cs_set:Npn \endaligned {
\crcr
\__luamml_amsmath_save_inner_table:n \@currenvir
\UseExpandableTaggingSocket{math/luamml/mtable/innertable/save}
\egroup
\restorecolumn@
\egroup
\__luamml_amsmath_finalize_inner_table:
\UseTaggingSocket{math/luamml/mtable/innertable/finalize}
}
% gather
@ -394,10 +394,10 @@
\crcr
}{%
\crcr
\__luamml_amsmath_save_smallmatrix:
\UseExpandableTaggingSocket{math/luamml/mtable/smallmatrix/save}
\egroup
\egroup
\__luamml_amsmath_finalize_inner_table:
\UseTaggingSocket{math/luamml/mtable/innertable/finalize}
\UseTaggingSocket{ math/luamml/annotate/false } {}{ \, }
}

View File

@ -663,6 +663,36 @@
%</luatex>
% \end{macrocode}
%
% These sockets save an inner table
% \begin{macrocode}
\str_if_exist:cF { l__socket_tagsupport/math/luamml/mtable/innertable/save_plug_str }
{
\NewSocket{tagsupport/math/luamml/mtable/innertable/save}{0}
\NewSocket{tagsupport/math/luamml/mtable/smallmatrix/save}{0}
\NewSocket{tagsupport/math/luamml/mtable/innertable/finalize}{0}
}
% \end{macrocode}
% \begin{macrocode}
%<*luatex>
\NewSocketPlug{tagsupport/math/luamml/mtable/innertable/save}{luamml}
{
\__luamml_amsmath_save_inner_table:n \@currenvir
}
\AssignSocketPlug{tagsupport/math/luamml/mtable/innertable/save}{luamml}
\NewSocketPlug{tagsupport/math/luamml/mtable/smallmatrix/save}{luamml}
{
\__luamml_amsmath_save_smallmatrix:
}
\AssignSocketPlug{tagsupport/math/luamml/mtable/smallmatrix/save}{luamml}
\NewSocketPlug{tagsupport/math/luamml/mtable/innertable/finalize}{luamml}
{
\__luamml_amsmath_finalize_inner_table:
}
\AssignSocketPlug{tagsupport/math/luamml/mtable/innertable/finalize}{luamml}
%</luatex>
% \end{macrocode}
%
% This socket finalize the \texttt{mtable} in alignments like align or gather.
% It takes an argument, the environment.