diff --git a/luamml-patches-amsmath.sty b/luamml-patches-amsmath.sty index e4e5a6d..ea4c8a4 100644 --- a/luamml-patches-amsmath.sty +++ b/luamml-patches-amsmath.sty @@ -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 } {}{ \, } } diff --git a/luamml.dtx b/luamml.dtx index b0ae894..71f17d1 100644 --- a/luamml.dtx +++ b/luamml.dtx @@ -663,6 +663,36 @@ % % \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} +% +% \end{macrocode} + % % This socket finalize the \texttt{mtable} in alignments like align or gather. % It takes an argument, the environment.