Skip to content

Commit 01898b3

Browse files
committed
move smallmatrix patch
1 parent dfdd79a commit 01898b3

File tree

2 files changed

+94
-42
lines changed

2 files changed

+94
-42
lines changed

required/latex-lab/latex-lab-amsmath.dtx

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,54 @@
215215
\egroup
216216
\UseTaggingSocket{math/luamml/mtable/innertable/finalize}
217217
}
218-
}
218+
219219
% \end{macrocode}
220+
% \subsubsection{smallmatrix}
221+
% \begin{macrocode}
222+
\renewenvironment {smallmatrix} {
223+
\UseTaggingSocket{ math/luamml/annotate/false } {} { \null\, }
224+
\vcenter \bgroup
225+
\Let@
226+
\restore@math@cr
227+
\default@tag
228+
\baselineskip 6 \ex@
229+
\lineskip 1.5 \ex@
230+
\lineskiplimit \lineskip
231+
\ialign \bgroup
232+
\hfil
233+
$
234+
\m@th
235+
\scriptstyle
236+
##
237+
% No \scriptsize here since we want to add the mstyle nodes
238+
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
239+
$
240+
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
241+
\hfil
242+
&&
243+
\thickspace
244+
\hfil
245+
$
246+
\m@th
247+
\scriptstyle
248+
##
249+
% No \scriptsize here since we want to add the mstyle nodes
250+
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
251+
$
252+
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
253+
\hfil
254+
\crcr
255+
}{%
256+
\crcr
257+
\UseExpandableTaggingSocket{math/luamml/mtable/smallmatrix/save}
258+
\egroup
259+
\egroup
260+
\UseTaggingSocket{math/luamml/mtable/innertable/finalize}
261+
\UseTaggingSocket{ math/luamml/annotate/false } {}{ \, }
262+
}
263+
}
264+
% \end{macrocode}
265+
%
220266
% \subsection{\cs{intertext}}
221267
% The \cs{intertext} command errors with active tagging as it is processed twice
222268
% which leads to duplicated structures.

texmf/tex/lualatex/luamml/luamml-patches-amsmath.sty

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -359,47 +359,53 @@
359359
360360
% Finally some slightly different stuff.
361361
% While {matrix} is covered by {array}, we still have {smallmatrix}:
362-
\renewenvironment {smallmatrix} {
363-
\UseTaggingSocket{ math/luamml/annotate/false } {} { \null\, }
364-
\vcenter \bgroup
365-
\Let@
366-
\restore@math@cr
367-
\default@tag
368-
\baselineskip 6 \ex@
369-
\lineskip 1.5 \ex@
370-
\lineskiplimit \lineskip
371-
\ialign \bgroup
372-
\hfil
373-
$
374-
\m@th
375-
\scriptstyle
376-
##
377-
% No \scriptsize here since we want to add the mstyle nodes
378-
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
379-
$
380-
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
381-
\hfil
382-
&&
383-
\thickspace
384-
\hfil
385-
$
386-
\m@th
387-
\scriptstyle
388-
##
389-
% No \scriptsize here since we want to add the mstyle nodes
390-
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
391-
$
392-
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
393-
\hfil
394-
\crcr
395-
}{%
396-
\crcr
397-
\UseExpandableTaggingSocket{math/luamml/mtable/smallmatrix/save}
398-
\egroup
399-
\egroup
400-
\UseTaggingSocket{math/luamml/mtable/innertable/finalize}
401-
\UseTaggingSocket{ math/luamml/annotate/false } {}{ \, }
402-
}
362+
363+
\IfPackageAtLeastTF{latex-lab-testphase-math}{2025-01-24}
364+
{}
365+
{ \PackageInfo{luamml}{patching~smallmatrix}
366+
367+
\renewenvironment {smallmatrix} {
368+
\UseTaggingSocket{ math/luamml/annotate/false } {} { \null\, }
369+
\vcenter \bgroup
370+
\Let@
371+
\restore@math@cr
372+
\default@tag
373+
\baselineskip 6 \ex@
374+
\lineskip 1.5 \ex@
375+
\lineskiplimit \lineskip
376+
\ialign \bgroup
377+
\hfil
378+
$
379+
\m@th
380+
\scriptstyle
381+
##
382+
% No \scriptsize here since we want to add the mstyle nodes
383+
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
384+
$
385+
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
386+
\hfil
387+
&&
388+
\thickspace
389+
\hfil
390+
$
391+
\m@th
392+
\scriptstyle
393+
##
394+
% No \scriptsize here since we want to add the mstyle nodes
395+
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
396+
$
397+
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
398+
\hfil
399+
\crcr
400+
}{%
401+
\crcr
402+
\UseExpandableTaggingSocket{math/luamml/mtable/smallmatrix/save}
403+
\egroup
404+
\egroup
405+
\UseTaggingSocket{math/luamml/mtable/innertable/finalize}
406+
\UseTaggingSocket{ math/luamml/annotate/false } {}{ \, }
407+
}
408+
}
403409
404410
% {cases} is defined by the kernel, but we patch the overwritten version by amsmath.
405411
\cs_set:Npn \env@cases {

0 commit comments

Comments
 (0)