move \__luamml_amsmath_finalize_table:n into socket
This commit is contained in:
parent
dc22fa31a4
commit
88ab616a78
@ -160,7 +160,7 @@
|
|||||||
\cs_set:Npn \endgather {
|
\cs_set:Npn \endgather {
|
||||||
\math@cr
|
\math@cr
|
||||||
\black@ \totwidth@
|
\black@ \totwidth@
|
||||||
\__luamml_amsmath_finalize_table:n {gather}
|
\UseExpandableTaggingSocket{math/luamml/mtable/finalize} {gather}
|
||||||
\egroup
|
\egroup
|
||||||
$$
|
$$
|
||||||
\ignorespacesafterend
|
\ignorespacesafterend
|
||||||
@ -258,7 +258,7 @@
|
|||||||
\cs_set:Npn \endalign {
|
\cs_set:Npn \endalign {
|
||||||
\math@cr
|
\math@cr
|
||||||
\black@ \totwidth@
|
\black@ \totwidth@
|
||||||
\__luamml_amsmath_finalize_table:n {align}
|
\UseTaggingSocket{math/luamml/mtable/finalize} {align}
|
||||||
\egroup
|
\egroup
|
||||||
\ifingather@
|
\ifingather@
|
||||||
\restorealignstate@
|
\restorealignstate@
|
||||||
@ -334,7 +334,7 @@
|
|||||||
\fi
|
\fi
|
||||||
\hfilneg
|
\hfilneg
|
||||||
\math@cr
|
\math@cr
|
||||||
\__luamml_amsmath_finalize_table:n {multline}
|
\UseExpandableTaggingSocket {math/luamml/mtable/finalize} {multline}
|
||||||
\egroup
|
\egroup
|
||||||
$$
|
$$
|
||||||
}
|
}
|
||||||
@ -343,7 +343,8 @@
|
|||||||
\hfilneg
|
\hfilneg
|
||||||
\hskip\multlinegap
|
\hskip\multlinegap
|
||||||
\math@cr
|
\math@cr
|
||||||
\__luamml_amsmath_finalize_table:n {multline}
|
\UseExpandableTaggingSocket {math/luamml/mtable/finalize} {multline}
|
||||||
|
%\__luamml_amsmath_finalize_table:n {multline}
|
||||||
\egroup
|
\egroup
|
||||||
$$
|
$$
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
\ProvidesExplPackage {luamml-patches-lab-math} {2024-10-30} {0.2.0}
|
\ProvidesExplPackage {luamml-patches-lab-math} {2024-10-30} {0.2.0}
|
||||||
{Feel free to add a description here}
|
{Feel free to add a description here}
|
||||||
|
|
||||||
|
% This definition is identical to the one in latex-lab-math.
|
||||||
|
% The redefinition and the whole patch file can be removed in 2025-06-01
|
||||||
\AddToHook{begindocument} {
|
\AddToHook{begindocument} {
|
||||||
\cs_set:Npn \common@align@ending {
|
\cs_set:Npn \common@align@ending {
|
||||||
\math@cr
|
\math@cr
|
||||||
\black@ \totwidth@
|
\black@ \totwidth@
|
||||||
\__luamml_amsmath_finalize_table:n {align}
|
\UseExpandableTaggingSocket{math/luamml/mtable/finalize}{align}
|
||||||
\egroup
|
\egroup
|
||||||
\ifingather@
|
\ifingather@
|
||||||
\restorealignstate@
|
\restorealignstate@
|
||||||
|
23
luamml.dtx
23
luamml.dtx
@ -527,6 +527,29 @@
|
|||||||
% In various places luamml has to add code to kernel commands. This is done through
|
% In various places luamml has to add code to kernel commands. This is done through
|
||||||
% sockets which are predeclared in lttagging.
|
% sockets which are predeclared in lttagging.
|
||||||
%
|
%
|
||||||
|
% \subsubsection{amsmath alignments}
|
||||||
|
%
|
||||||
|
% This socket finalize the \texttt{mtable} in alignments like align or gather.
|
||||||
|
% It takes an argument, the environment.
|
||||||
|
% It should be used normally with \cs{UseExpandableTaggingSocket}.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\str_if_exist:cF { l__socket_tagsupport/math/luamml/mtable/finalize_plug_str }
|
||||||
|
{
|
||||||
|
\NewSocket{tagsupport/math/luamml/mtable/finalize}{1}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/mtable/finalize}{noop}
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
%<*luatex>
|
||||||
|
\NewSocketPlug{tagsupport/math/luamml/mtable/finalize}{luamml}
|
||||||
|
{
|
||||||
|
\__luamml_amsmath_finalize_table:n {#1}
|
||||||
|
}
|
||||||
|
%</luatex>
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
|
%
|
||||||
% \subsubsection{Horizontal boxes}
|
% \subsubsection{Horizontal boxes}
|
||||||
% This socket annotates an \cs{hbox} inside box commands used in math.
|
% This socket annotates an \cs{hbox} inside box commands used in math.
|
||||||
% We test for the socket until the release 2025-06-01.
|
% We test for the socket until the release 2025-06-01.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user