move smash patches into sockets

This commit is contained in:
Ulrike Fischer 2025-01-28 12:40:09 +01:00
parent 6b34c20542
commit 585c5c75e3
2 changed files with 54 additions and 22 deletions

View File

@ -1,6 +1,11 @@
\ProvidesExplPackage {luamml-patches-kernel} {2024-10-30} {0.2.0} \ProvidesExplPackage {luamml-patches-kernel} {2024-10-30} {0.2.0}
{Feel free to add a description here} {Feel free to add a description here}
\IfPackageAtLeastTF{latex-lab-testphase-math}{2025-01-24}
{}
{
\PackageInfo{luamml}{patching~\string\mathsm@sh}
\cs_set:Npn \mathsm@sh #1 #2 { \cs_set:Npn \mathsm@sh #1 #2 {
\setbox \z@ \hbox { \setbox \z@ \hbox {
$ $
@ -22,9 +27,6 @@
} }
} }
\IfPackageAtLeastTF{latex-lab-testphase-text}{2025-01-27}
{}
{
\PackageInfo{luamml}{patching~\string\mathph@nt} \PackageInfo{luamml}{patching~\string\mathph@nt}
\cs_set:Npn \mathph@nt #1 #2 { \cs_set:Npn \mathph@nt #1 #2 {
\setbox \z@ = \hbox { \setbox \z@ = \hbox {

View File

@ -666,7 +666,37 @@
\AssignSocketPlug{tagsupport/math/luamml/finph@nt}{luamml} \AssignSocketPlug{tagsupport/math/luamml/finph@nt}{luamml}
%</luatex> %</luatex>
% \end{macrocode} % \end{macrocode}
% \subsubsection{Math smash socket}
% This socket is used around \cs{finsm@sh}.
% It should provided until 2025-06-01
% \begin{macrocode}
\str_if_exist:cF { l__socket_tagsupport/math/luamml/finsm@sh_plug_str }
{
\NewSocket{tagsupport/math/luamml/finsm@sh}{2}
\NewSocketPlug{tagsupport/math/luamml/finsm@sh}{default}{#2}
\AssignSocketPlug{tagsupport/math/luamml/finsm@sh}{default}
}
% \end{macrocode}
% %
% \begin{macrocode}
%<*luatex>
\NewSocketPlug{tagsupport/math/luamml/finsm@sh}{luamml}
{
\luamml_annotate:nen {2}
{
nucleus = true,
core =
consume_label('mathsmash',
function(padded)
padded.height, padded.depth = 0, 0~
end),
}
{ #2 }
}
\AssignSocketPlug{tagsupport/math/luamml/finsm@sh}{luamml}
%</luatex>
% \end{macrocode}
% \subsection{Patching} % \subsection{Patching}
% For some packages, we ship with patches to make them more compatible and to % For some packages, we ship with patches to make them more compatible and to
% demonstrate how other code can be patched to work with \texttt{luamml}. % demonstrate how other code can be patched to work with \texttt{luamml}.