From 3d4d7ecd22cd774d6cabf05158746eae60d6d0eb Mon Sep 17 00:00:00 2001 From: Ulrike Fischer Date: Sun, 2 Feb 2025 01:27:50 +0100 Subject: [PATCH] move smallmatrix patch --- luamml-patches-amsmath.sty | 88 ++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/luamml-patches-amsmath.sty b/luamml-patches-amsmath.sty index 8443d64..1bb3d91 100644 --- a/luamml-patches-amsmath.sty +++ b/luamml-patches-amsmath.sty @@ -359,47 +359,53 @@ % Finally some slightly different stuff. % While {matrix} is covered by {array}, we still have {smallmatrix}: -\renewenvironment {smallmatrix} { - \UseTaggingSocket{ math/luamml/annotate/false } {} { \null\, } - \vcenter \bgroup - \Let@ - \restore@math@cr - \default@tag - \baselineskip 6 \ex@ - \lineskip 1.5 \ex@ - \lineskiplimit \lineskip - \ialign \bgroup - \hfil - $ - \m@th - \scriptstyle - ## - % No \scriptsize here since we want to add the mstyle nodes - \UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}} - $ - \UseTaggingSocket{math/luamml/mtable/finalizecol}{last} - \hfil - && - \thickspace - \hfil - $ - \m@th - \scriptstyle - ## - % No \scriptsize here since we want to add the mstyle nodes - \UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}} - $ - \UseTaggingSocket{math/luamml/mtable/finalizecol}{last} - \hfil - \crcr -}{% - \crcr - \UseExpandableTaggingSocket{math/luamml/mtable/smallmatrix/save} - \egroup - \egroup - \UseTaggingSocket{math/luamml/mtable/innertable/finalize} - \UseTaggingSocket{ math/luamml/annotate/false } {}{ \, } -} + +\IfPackageAtLeastTF{latex-lab-testphase-math}{2025-01-24} + {} + { \PackageInfo{luamml}{patching~smallmatrix} + + \renewenvironment {smallmatrix} { + \UseTaggingSocket{ math/luamml/annotate/false } {} { \null\, } + \vcenter \bgroup + \Let@ + \restore@math@cr + \default@tag + \baselineskip 6 \ex@ + \lineskip 1.5 \ex@ + \lineskiplimit \lineskip + \ialign \bgroup + \hfil + $ + \m@th + \scriptstyle + ## + % No \scriptsize here since we want to add the mstyle nodes + \UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}} + $ + \UseTaggingSocket{math/luamml/mtable/finalizecol}{last} + \hfil + && + \thickspace + \hfil + $ + \m@th + \scriptstyle + ## + % No \scriptsize here since we want to add the mstyle nodes + \UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}} + $ + \UseTaggingSocket{math/luamml/mtable/finalizecol}{last} + \hfil + \crcr + }{% + \crcr + \UseExpandableTaggingSocket{math/luamml/mtable/smallmatrix/save} + \egroup + \egroup + \UseTaggingSocket{math/luamml/mtable/innertable/finalize} + \UseTaggingSocket{ math/luamml/annotate/false } {}{ \, } + } + } % {cases} is defined by the kernel, but we patch the overwritten version by amsmath. \cs_set:Npn \env@cases {