Skip to content

Commit

Permalink
move smallmatrix patch
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Feb 2, 2025
1 parent dfdd79a commit 01898b3
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 42 deletions.
48 changes: 47 additions & 1 deletion required/latex-lab/latex-lab-amsmath.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,54 @@
\egroup
\UseTaggingSocket{math/luamml/mtable/innertable/finalize}
}
}
% \end{macrocode}
% \subsubsection{smallmatrix}
% \begin{macrocode}
\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 } {}{ \, }
}
}
% \end{macrocode}
%
% \subsection{\cs{intertext}}
% The \cs{intertext} command errors with active tagging as it is processed twice
% which leads to duplicated structures.
Expand Down
88 changes: 47 additions & 41 deletions texmf/tex/lualatex/luamml/luamml-patches-amsmath.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 01898b3

Please sign in to comment.