move array sockets into main file
This commit is contained in:
parent
d3eb2bffdf
commit
bb3d4736a6
@ -1,45 +0,0 @@
|
|||||||
\ProvidesExplPackage {luamml-patches-array} {2024-10-30} {0.2.0}
|
|
||||||
{Feel free to add a description here}
|
|
||||||
|
|
||||||
\lua_now:n { require'luamml-array' }
|
|
||||||
|
|
||||||
\str_if_exist:cF { l__socket_tagsupport/math/luamml/array/save_plug_str }
|
|
||||||
{
|
|
||||||
\NewSocket{tagsupport/math/luamml/array/save}{0}
|
|
||||||
\NewSocket{tagsupport/math/luamml/array/finalize}{0}
|
|
||||||
\NewSocket{tagsupport/math/luamml/array/initcol}{0}
|
|
||||||
\NewSocket{tagsupport/math/luamml/array/savecol}{0}
|
|
||||||
\NewSocket{tagsupport/math/luamml/array/finalizecol}{1}
|
|
||||||
\AssignSocketPlug{tagsupport/math/luamml/array/finalizecol}{noop}
|
|
||||||
}
|
|
||||||
|
|
||||||
\NewSocketPlug{tagsupport/math/luamml/array/save}{default}
|
|
||||||
{
|
|
||||||
\__luamml_array_save_array:
|
|
||||||
}
|
|
||||||
|
|
||||||
\NewSocketPlug{tagsupport/math/luamml/array/finalize}{default}
|
|
||||||
{
|
|
||||||
\mode_if_math:T { \__luamml_array_finalize_array: }
|
|
||||||
}
|
|
||||||
|
|
||||||
\NewSocketPlug{tagsupport/math/luamml/array/initcol}{default}
|
|
||||||
{
|
|
||||||
\__luamml_array_init_col:
|
|
||||||
}
|
|
||||||
|
|
||||||
\NewSocketPlug{tagsupport/math/luamml/array/savecol}{default}
|
|
||||||
{
|
|
||||||
\luamml_save:nn {} {mtd}
|
|
||||||
}
|
|
||||||
|
|
||||||
\NewSocketPlug{tagsupport/math/luamml/array/finalizecol}{default}
|
|
||||||
{
|
|
||||||
\__luamml_array_finalize_col:w #1~
|
|
||||||
}
|
|
||||||
|
|
||||||
\AssignSocketPlug{tagsupport/math/luamml/array/save}{default}
|
|
||||||
\AssignSocketPlug{tagsupport/math/luamml/array/finalize}{default}
|
|
||||||
\AssignSocketPlug{tagsupport/math/luamml/array/initcol}{default}
|
|
||||||
\AssignSocketPlug{tagsupport/math/luamml/array/savecol}{default}
|
|
||||||
\AssignSocketPlug{tagsupport/math/luamml/array/finalizecol}{default}
|
|
87
luamml.dtx
87
luamml.dtx
@ -37,6 +37,9 @@
|
|||||||
\usepackage{csquotes,luacolor}
|
\usepackage{csquotes,luacolor}
|
||||||
\MakeShortVerb{\|}
|
\MakeShortVerb{\|}
|
||||||
\RecordChanges
|
\RecordChanges
|
||||||
|
\ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
|
||||||
|
\ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\tracingmathml2
|
\tracingmathml2
|
||||||
\DocInput{luamml.dtx}
|
\DocInput{luamml.dtx}
|
||||||
@ -546,6 +549,83 @@
|
|||||||
\AssignSocketPlug{tagsupport/math/luamml/save}{luamml}
|
\AssignSocketPlug{tagsupport/math/luamml/save}{luamml}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
|
% \subsection{socket plugs for the array package}
|
||||||
|
%
|
||||||
|
% The socket declaration can go with the 2025-06-01 release
|
||||||
|
% \begin{macrocode}
|
||||||
|
\str_if_exist:cF { l__socket_tagsupport/math/luamml/array/save_plug_str }
|
||||||
|
{
|
||||||
|
\NewSocket{tagsupport/math/luamml/array/save}{0}
|
||||||
|
\NewSocket{tagsupport/math/luamml/array/finalize}{0}
|
||||||
|
\NewSocket{tagsupport/math/luamml/array/initcol}{0}
|
||||||
|
\NewSocket{tagsupport/math/luamml/array/savecol}{0}
|
||||||
|
\NewSocket{tagsupport/math/luamml/array/finalizecol}{1}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/array/finalizecol}{noop}
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
|
% The luamml support makes only sense with luatex.
|
||||||
|
% \begin{macrocode}
|
||||||
|
%<*luatex>
|
||||||
|
\AddToHook{package/array/after}{\lua_now:n { require'luamml-array' }}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \begin{plugdecl}{tagsupport/math/luamml/array/save}
|
||||||
|
% The socket of this plug is used in \cs{endarray}.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\NewSocketPlug{tagsupport/math/luamml/array/save}{luamml}
|
||||||
|
{
|
||||||
|
\__luamml_array_save_array:
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{plugdecl}
|
||||||
|
%
|
||||||
|
% \begin{plugdecl}{tagsupport/math/luamml/array/finalize}
|
||||||
|
% This socket of this plug is used in \cs{endarray}.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\NewSocketPlug{tagsupport/math/luamml/array/finalize}{luamml}
|
||||||
|
{
|
||||||
|
\mode_if_math:T { \__luamml_array_finalize_array: }
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{plugdecl}
|
||||||
|
%
|
||||||
|
% \begin{plugdecl}{tagsupport/math/luamml/array/initcol}
|
||||||
|
% The socket of this plug is used in \cs{@classz}.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\NewSocketPlug{tagsupport/math/luamml/array/initcol}{luamml}
|
||||||
|
{
|
||||||
|
\__luamml_array_init_col:
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{plugdecl}
|
||||||
|
%
|
||||||
|
% \begin{plugdecl}{tagsupport/math/luamml/array/savecol}
|
||||||
|
% The socket of this plug is used in \cs{@classz}.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\NewSocketPlug{tagsupport/math/luamml/array/savecol}{luamml}
|
||||||
|
{
|
||||||
|
\luamml_save:nn {} {mtd}
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{plugdecl}
|
||||||
|
%
|
||||||
|
% \begin{plugdecl}{tagsupport/math/luamml/array/finalizecol}
|
||||||
|
% The socket of this plug is used used in \cs{@classz}.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\NewSocketPlug{tagsupport/math/luamml/array/finalizecol}{luamml}
|
||||||
|
{
|
||||||
|
\__luamml_array_finalize_col:w #1~
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{plugdecl}
|
||||||
|
% \begin{macrocode}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/array/save}{luamml}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/array/finalize}{luamml}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/array/initcol}{luamml}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/array/savecol}{luamml}
|
||||||
|
\AssignSocketPlug{tagsupport/math/luamml/array/finalizecol}{luamml}
|
||||||
|
%</luatex>
|
||||||
|
% \end{macrocode}
|
||||||
% \subsubsection{amsmath alignments}
|
% \subsubsection{amsmath alignments}
|
||||||
%
|
%
|
||||||
% This socket finalize the \texttt{mtable} in alignments like align or gather.
|
% This socket finalize the \texttt{mtable} in alignments like align or gather.
|
||||||
@ -619,14 +699,14 @@
|
|||||||
\NewSocket{tagsupport/math/luamml/artifact}{0}
|
\NewSocket{tagsupport/math/luamml/artifact}{0}
|
||||||
}
|
}
|
||||||
%<*luatex>
|
%<*luatex>
|
||||||
\NewSocketPlug{tagsupport/math/luamml/artifact}{default}
|
\NewSocketPlug{tagsupport/math/luamml/artifact}{luamml}
|
||||||
{
|
{
|
||||||
\int_if_odd:nT { \int_div_truncate:nn { \l__luamml_flag_int } { 8 } }
|
\int_if_odd:nT { \int_div_truncate:nn { \l__luamml_flag_int } { 8 } }
|
||||||
{
|
{
|
||||||
\tag_mc_begin:n{artifact}
|
\tag_mc_begin:n{artifact}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
\AssignSocketPlug{tagsupport/math/luamml/artifact}{default}
|
\AssignSocketPlug{tagsupport/math/luamml/artifact}{luamml}
|
||||||
%</luatex>
|
%</luatex>
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
@ -722,7 +802,7 @@
|
|||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \end{macro}
|
% \end{macro}
|
||||||
%
|
%
|
||||||
% We currently provide minimal patching for the kernel, \pkg{amsmath} and \pkg{array}.
|
% We currently provide minimal patching for the kernel, \pkg{amsmath}.
|
||||||
% Currently only the kernel code supports pdf\TeX, but it's planned to extend this.
|
% Currently only the kernel code supports pdf\TeX, but it's planned to extend this.
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\RequirePackage { luamml-patches-kernel }
|
\RequirePackage { luamml-patches-kernel }
|
||||||
@ -730,7 +810,6 @@
|
|||||||
\__luamml_patch_package:n {amstext}
|
\__luamml_patch_package:n {amstext}
|
||||||
\__luamml_patch_package:n {amsmath}
|
\__luamml_patch_package:n {amsmath}
|
||||||
\__luamml_patch_package:n {mathtools}
|
\__luamml_patch_package:n {mathtools}
|
||||||
\__luamml_patch_package:n {array}
|
|
||||||
%</luatex>
|
%</luatex>
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user