more sockets, start to move amsmath env
This commit is contained in:
parent
c5ee5114fb
commit
e1741b13d5
@ -40,7 +40,7 @@
|
|||||||
{##}
|
{##}
|
||||||
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}}
|
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}}
|
||||||
$
|
$
|
||||||
\UseTaggingSocket{math/luamml/mtable/finalizecol}
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
|
||||||
\tabskip \z@skip
|
\tabskip \z@skip
|
||||||
& \column@plus
|
& \column@plus
|
||||||
$
|
$
|
||||||
@ -52,7 +52,7 @@
|
|||||||
}
|
}
|
||||||
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}}
|
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}}
|
||||||
$
|
$
|
||||||
\UseTaggingSocket{math/luamml/mtable/finalizecol}
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
|
||||||
\hfil
|
\hfil
|
||||||
\tabskip\alignsep@
|
\tabskip\alignsep@
|
||||||
\crcr
|
\crcr
|
||||||
@ -79,7 +79,7 @@
|
|||||||
##
|
##
|
||||||
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}}
|
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}}
|
||||||
$
|
$
|
||||||
\UseTaggingSocket{math/luamml/mtable/finalizecol}
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
|
||||||
\hfil
|
\hfil
|
||||||
\crcr
|
\crcr
|
||||||
\ams@return@opt@arg
|
\ams@return@opt@arg
|
||||||
@ -117,7 +117,7 @@
|
|||||||
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}}
|
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}}
|
||||||
$
|
$
|
||||||
}
|
}
|
||||||
\__luamml_amsmath_add_box_to_row:
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{box}
|
||||||
\calc@shift@gather
|
\calc@shift@gather
|
||||||
\set@gather@field
|
\set@gather@field
|
||||||
\tabskip\@centering
|
\tabskip\@centering
|
||||||
@ -132,7 +132,7 @@
|
|||||||
{ \place@tag@gather }
|
{ \place@tag@gather }
|
||||||
{
|
{
|
||||||
\place@tag@gather
|
\place@tag@gather
|
||||||
\__luamml_amsmath_set_tag:
|
\UseTaggingSocket{math/luamml/mtable/tag/set}
|
||||||
}
|
}
|
||||||
\tabskip \iftagsleft@
|
\tabskip \iftagsleft@
|
||||||
\gdisplaywidth@
|
\gdisplaywidth@
|
||||||
@ -150,15 +150,18 @@
|
|||||||
{ \luamml_ignore: }
|
{ \luamml_ignore: }
|
||||||
{ \__luamml_amsmath_original_gmeasure:n {#1} }
|
{ \__luamml_amsmath_original_gmeasure:n {#1} }
|
||||||
}
|
}
|
||||||
|
\IfPackageAtLeastTF{latex-lab-testphase-math}{2025-01-24}
|
||||||
\cs_set:Npn \endgather {
|
{}
|
||||||
\math@cr
|
{ \PackageInfo{luamml}{patching~\string\endgather}
|
||||||
\black@ \totwidth@
|
\cs_set:Npn \endgather {
|
||||||
\UseExpandableTaggingSocket{math/luamml/mtable/finalize} {gather}
|
\math@cr
|
||||||
\egroup
|
\black@ \totwidth@
|
||||||
$$
|
\UseExpandableTaggingSocket{math/luamml/mtable/finalize} {gather}
|
||||||
\ignorespacesafterend
|
\egroup
|
||||||
}
|
$$
|
||||||
|
\ignorespacesafterend
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
% align and friends
|
% align and friends
|
||||||
\cs_set:Npn \align@preamble {
|
\cs_set:Npn \align@preamble {
|
||||||
@ -181,7 +184,7 @@
|
|||||||
\ifmeasuring@
|
\ifmeasuring@
|
||||||
\savefieldlength@
|
\savefieldlength@
|
||||||
\else
|
\else
|
||||||
\__luamml_amsmath_add_box_to_row:
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{box}
|
||||||
\fi
|
\fi
|
||||||
\set@field
|
\set@field
|
||||||
\tabskip\z@skip
|
\tabskip\z@skip
|
||||||
@ -205,7 +208,7 @@
|
|||||||
\ifmeasuring@
|
\ifmeasuring@
|
||||||
\savefieldlength@
|
\savefieldlength@
|
||||||
\else
|
\else
|
||||||
\__luamml_amsmath_add_box_to_row:
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{box}
|
||||||
\fi
|
\fi
|
||||||
\set@field
|
\set@field
|
||||||
\hfil
|
\hfil
|
||||||
@ -230,7 +233,7 @@
|
|||||||
{ \make@display@tag }
|
{ \make@display@tag }
|
||||||
}
|
}
|
||||||
\place@tag
|
\place@tag
|
||||||
\__luamml_amsmath_set_tag:
|
\UseTaggingSocket{math/luamml/mtable/tag/set}
|
||||||
\fi
|
\fi
|
||||||
\ifst@rred
|
\ifst@rred
|
||||||
\else
|
\else
|
||||||
@ -240,14 +243,21 @@
|
|||||||
\cr
|
\cr
|
||||||
}
|
}
|
||||||
|
|
||||||
\cs_set:Npn \maketag@@@ #1 {
|
% This was lost anyway, as the latex-lab code overwrites
|
||||||
\hbox {
|
% the definition again.
|
||||||
\m@th
|
\IfPackageAtLeastTF{latex-lab-testphase-math}{2025-01-24}
|
||||||
\normalfont
|
{}
|
||||||
#1
|
{ \PackageInfo{luamml}{patching~\string\maketag@@@}
|
||||||
\__luamml_amsmath_save_tag:
|
\cs_set:Npn \maketag@@@ #1
|
||||||
}
|
{
|
||||||
}
|
\hbox {
|
||||||
|
\m@th
|
||||||
|
\normalfont
|
||||||
|
#1
|
||||||
|
\UseTaggingSocket{math/luamml/mtable/tag/save}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
\cs_set:Npn \endalign {
|
\cs_set:Npn \endalign {
|
||||||
\math@cr
|
\math@cr
|
||||||
@ -294,14 +304,14 @@
|
|||||||
\cs_set:Npn \endmultline@math {
|
\cs_set:Npn \endmultline@math {
|
||||||
\luamml_save:nNn {} \displaystyle {mtd}
|
\luamml_save:nNn {} \displaystyle {mtd}
|
||||||
$
|
$
|
||||||
\UseTaggingSocket{math/luamml/mtable/finalizecol}
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
|
||||||
}
|
}
|
||||||
|
|
||||||
\cs_set:Npn \rendmultline@ {
|
\cs_set:Npn \rendmultline@ {
|
||||||
\iftag@
|
\iftag@
|
||||||
\luamml_save:nNn {} \displaystyle {mtd}
|
\luamml_save:nNn {} \displaystyle {mtd}
|
||||||
$
|
$
|
||||||
\UseTaggingSocket{math/luamml/mtable/finalizecol}
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
|
||||||
\let \endmultline@math \relax
|
\let \endmultline@math \relax
|
||||||
\ifshifttag@
|
\ifshifttag@
|
||||||
\hskip \multlinegap
|
\hskip \multlinegap
|
||||||
@ -322,7 +332,7 @@
|
|||||||
\hskip \multlinetaggap
|
\hskip \multlinetaggap
|
||||||
\make@display@tag
|
\make@display@tag
|
||||||
\fi
|
\fi
|
||||||
\__luamml_amsmath_set_tag:
|
\UseTaggingSocket{math/luamml/mtable/tag/set}
|
||||||
\else
|
\else
|
||||||
\hskip \multlinegap
|
\hskip \multlinegap
|
||||||
\fi
|
\fi
|
||||||
@ -363,7 +373,7 @@
|
|||||||
% No \scriptsize here since we want to add the mstyle nodes
|
% No \scriptsize here since we want to add the mstyle nodes
|
||||||
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
|
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
|
||||||
$
|
$
|
||||||
\UseTaggingSocket{math/luamml/mtable/finalizecol}
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
|
||||||
\hfil
|
\hfil
|
||||||
&&
|
&&
|
||||||
\thickspace
|
\thickspace
|
||||||
@ -375,7 +385,7 @@
|
|||||||
% No \scriptsize here since we want to add the mstyle nodes
|
% No \scriptsize here since we want to add the mstyle nodes
|
||||||
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
|
\UseTaggingSocket{math/luamml/save/nn}{ {} {mtd}}
|
||||||
$
|
$
|
||||||
\UseTaggingSocket{math/luamml/mtable/finalizecol}
|
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
|
||||||
\hfil
|
\hfil
|
||||||
\crcr
|
\crcr
|
||||||
}{%
|
}{%
|
||||||
|
28
luamml.dtx
28
luamml.dtx
@ -650,14 +650,14 @@
|
|||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\str_if_exist:cF { l__socket_tagsupport/math/luamml/mtable/finalizecol_plug_str }
|
\str_if_exist:cF { l__socket_tagsupport/math/luamml/mtable/finalizecol_plug_str }
|
||||||
{
|
{
|
||||||
\NewSocket{tagsupport/math/luamml/mtable/finalizecol}{0}
|
\NewSocket{tagsupport/math/luamml/mtable/finalizecol}{1}
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
%<*luatex>
|
%<*luatex>
|
||||||
\NewSocketPlug{tagsupport/math/luamml/mtable/finalizecol}{luamml}
|
\NewSocketPlug{tagsupport/math/luamml/mtable/finalizecol}{luamml}
|
||||||
{
|
{
|
||||||
\__luamml_amsmath_add_last_to_row:
|
\use:c{__luamml_amsmath_add_#1_to_row:}
|
||||||
}
|
}
|
||||||
\AssignSocketPlug{tagsupport/math/luamml/mtable/finalizecol}{luamml}
|
\AssignSocketPlug{tagsupport/math/luamml/mtable/finalizecol}{luamml}
|
||||||
|
|
||||||
@ -685,7 +685,29 @@
|
|||||||
%</luatex>
|
%</luatex>
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
%
|
% These sockets save and set tags and labels in alignments.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\str_if_exist:cF { l__socket_tagsupport/math/luamml/mtable/tag/save_plug_str }
|
||||||
|
{
|
||||||
|
\NewSocket{tagsupport/math/luamml/mtable/tag/save}{0}
|
||||||
|
\NewSocket{tagsupport/math/luamml/mtable/tag/set}{0}
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \begin{macrocode}
|
||||||
|
%<*luatex>
|
||||||
|
\NewSocketPlug{tagsupport/math/luamml/mtable/tag/save}{luamml}
|
||||||
|
{
|
||||||
|
\__luamml_amsmath_save_tag:
|
||||||
|
}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/mtable/tag/save}{luamml}
|
||||||
|
\NewSocketPlug{tagsupport/math/luamml/mtable/tag/set}{luamml}
|
||||||
|
{
|
||||||
|
\__luamml_amsmath_set_tag:
|
||||||
|
}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/mtable/tag/set}{luamml}
|
||||||
|
|
||||||
|
%</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