[latex3-commits] [latex3/luamml] mathsockets: setup sockets for array patches (13b820a)
github at latex-project.org
github at latex-project.org
Fri Nov 29 16:45:29 CET 2024
Repository : https://github.com/latex3/luamml
On branch : mathsockets
Link : https://github.com/latex3/luamml/commit/13b820a339e55cd05214812302c9c0bad4eb6f66
>---------------------------------------------------------------
commit 13b820a339e55cd05214812302c9c0bad4eb6f66
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Fri Nov 29 16:45:29 2024 +0100
setup sockets for array patches
>---------------------------------------------------------------
13b820a339e55cd05214812302c9c0bad4eb6f66
luamml-patches-array.sty | 131 +++++++++++++----------------------------------
1 file changed, 37 insertions(+), 94 deletions(-)
diff --git a/luamml-patches-array.sty b/luamml-patches-array.sty
index b08d561..9e83552 100644
--- a/luamml-patches-array.sty
+++ b/luamml-patches-array.sty
@@ -3,99 +3,42 @@
\lua_now:n { require'luamml-array' }
-\cs_set:Npn \@classz {
- \@classx
- \@tempcnta \count@
- \prepnext at tok
- \@addtopreamble {
- \ifcase \@chnum
- \hfil
- \hskip 1sp
- \d at llarbegin
- \cs_if_eq:NNTF \d at llarbegin \begingroup {
- \insert at column
- \d at llarend
- } {
- \__luamml_array_init_col:
- \insert at column
- \luamml_save:nn {} {mtd}
- \d at llarend
- \__luamml_array_finalize_col:w 0~
- }
- \do at row@strut
- \hfil
- \or
- \hskip 1sp
- \d at llarbegin
- \cs_if_eq:NNTF \d at llarbegin \begingroup {
- \insert at column
- \d at llarend
- } {
- \__luamml_array_init_col:
- \insert at column
- \luamml_save:nn {} {mtd}
- \d at llarend
- \__luamml_array_finalize_col:w 1~
- }
- \do at row@strut
- \hfil
- \or
- \hfil
- \hskip 1sp
- \d at llarbegin
- \cs_if_eq:NNTF \d at llarbegin \begingroup {
- \insert at column
- \d at llarend
- } {
- \__luamml_array_init_col:
- \insert at column
- \luamml_save:nn {} {mtd}
- \d at llarend
- \__luamml_array_finalize_col:w 2~
- }
- \do at row@strut
- \or
- \setbox \ar at mcellbox \vbox \@startpbox { \@nextchar }
- \insert at pcolumn
- \@endpbox
- \ar at align@mcell
- \do at row@strut
- \or
- \vtop \@startpbox { \@nextchar }
- \insert at pcolumn
- \@endpbox
- \do at row@strut
- \or
- \vbox \@startpbox { \@nextchar }
- \insert at pcolumn
- \@endpbox
- \do at row@strut
- \fi
+\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}
}
- \prepnext at tok
-}
-\IfPackageAtLeastTF {array} {2023/12/11} {
- \cs_set:Npn \endarray {
- \tbl_crcr:n{endarray}
- \__luamml_array_save_array:
- \egroup
- \UseTaggingSocket{tbl/finalize}
- \tbl_restore_outer_cell_data:
- \egroup
- \mode_if_math:T { \__luamml_array_finalize_array: }
- \@arrayright
- \gdef \@preamble {}
- }
-} {
- \cs_new_eq:NN \insert at pcolumn \insert at column
- \cs_set:Npn \endarray {
- \crcr
- \__luamml_array_save_array:
- \egroup
- \egroup
- \mode_if_math:T { \__luamml_array_finalize_array: }
- \@arrayright
- \gdef \@preamble {}
- }
-}
+\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}
More information about the latex3-commits
mailing list.