setup sockets for array patches
This commit is contained in:
parent
3c70bd11ef
commit
13b820a339
@ -3,99 +3,42 @@
|
|||||||
|
|
||||||
\lua_now:n { require'luamml-array' }
|
\lua_now:n { require'luamml-array' }
|
||||||
|
|
||||||
\cs_set:Npn \@classz {
|
\str_if_exist:cF { l__socket_tagsupport/math/luamml/array/save_plug_str }
|
||||||
\@classx
|
{
|
||||||
\@tempcnta \count@
|
\NewSocket{tagsupport/math/luamml/array/save}{0}
|
||||||
\prepnext@tok
|
\NewSocket{tagsupport/math/luamml/array/finalize}{0}
|
||||||
\@addtopreamble {
|
\NewSocket{tagsupport/math/luamml/array/initcol}{0}
|
||||||
\ifcase \@chnum
|
\NewSocket{tagsupport/math/luamml/array/savecol}{0}
|
||||||
\hfil
|
\NewSocket{tagsupport/math/luamml/array/finalizecol}{1}
|
||||||
\hskip 1sp
|
|
||||||
\d@llarbegin
|
|
||||||
\cs_if_eq:NNTF \d@llarbegin \begingroup {
|
|
||||||
\insert@column
|
|
||||||
\d@llarend
|
|
||||||
} {
|
|
||||||
\__luamml_array_init_col:
|
|
||||||
\insert@column
|
|
||||||
\luamml_save:nn {} {mtd}
|
|
||||||
\d@llarend
|
|
||||||
\__luamml_array_finalize_col:w 0~
|
|
||||||
}
|
|
||||||
\do@row@strut
|
|
||||||
\hfil
|
|
||||||
\or
|
|
||||||
\hskip 1sp
|
|
||||||
\d@llarbegin
|
|
||||||
\cs_if_eq:NNTF \d@llarbegin \begingroup {
|
|
||||||
\insert@column
|
|
||||||
\d@llarend
|
|
||||||
} {
|
|
||||||
\__luamml_array_init_col:
|
|
||||||
\insert@column
|
|
||||||
\luamml_save:nn {} {mtd}
|
|
||||||
\d@llarend
|
|
||||||
\__luamml_array_finalize_col:w 1~
|
|
||||||
}
|
|
||||||
\do@row@strut
|
|
||||||
\hfil
|
|
||||||
\or
|
|
||||||
\hfil
|
|
||||||
\hskip 1sp
|
|
||||||
\d@llarbegin
|
|
||||||
\cs_if_eq:NNTF \d@llarbegin \begingroup {
|
|
||||||
\insert@column
|
|
||||||
\d@llarend
|
|
||||||
} {
|
|
||||||
\__luamml_array_init_col:
|
|
||||||
\insert@column
|
|
||||||
\luamml_save:nn {} {mtd}
|
|
||||||
\d@llarend
|
|
||||||
\__luamml_array_finalize_col:w 2~
|
|
||||||
}
|
|
||||||
\do@row@strut
|
|
||||||
\or
|
|
||||||
\setbox \ar@mcellbox \vbox \@startpbox { \@nextchar }
|
|
||||||
\insert@pcolumn
|
|
||||||
\@endpbox
|
|
||||||
\ar@align@mcell
|
|
||||||
\do@row@strut
|
|
||||||
\or
|
|
||||||
\vtop \@startpbox { \@nextchar }
|
|
||||||
\insert@pcolumn
|
|
||||||
\@endpbox
|
|
||||||
\do@row@strut
|
|
||||||
\or
|
|
||||||
\vbox \@startpbox { \@nextchar }
|
|
||||||
\insert@pcolumn
|
|
||||||
\@endpbox
|
|
||||||
\do@row@strut
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\prepnext@tok
|
|
||||||
}
|
}
|
||||||
|
|
||||||
\IfPackageAtLeastTF {array} {2023/12/11} {
|
\NewSocketPlug{tagsupport/math/luamml/array/save}{default}
|
||||||
\cs_set:Npn \endarray {
|
{
|
||||||
\tbl_crcr:n{endarray}
|
|
||||||
\__luamml_array_save_array:
|
\__luamml_array_save_array:
|
||||||
\egroup
|
}
|
||||||
\UseTaggingSocket{tbl/finalize}
|
|
||||||
\tbl_restore_outer_cell_data:
|
\NewSocketPlug{tagsupport/math/luamml/array/finalize}{default}
|
||||||
\egroup
|
{
|
||||||
\mode_if_math:T { \__luamml_array_finalize_array: }
|
\mode_if_math:T { \__luamml_array_finalize_array: }
|
||||||
\@arrayright
|
|
||||||
\gdef \@preamble {}
|
|
||||||
}
|
}
|
||||||
} {
|
|
||||||
\cs_new_eq:NN \insert@pcolumn \insert@column
|
\NewSocketPlug{tagsupport/math/luamml/array/initcol}{default}
|
||||||
\cs_set:Npn \endarray {
|
{
|
||||||
\crcr
|
\__luamml_array_init_col:
|
||||||
\__luamml_array_save_array:
|
|
||||||
\egroup
|
|
||||||
\egroup
|
|
||||||
\mode_if_math:T { \__luamml_array_finalize_array: }
|
|
||||||
\@arrayright
|
|
||||||
\gdef \@preamble {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\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}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user