[latex3-commits] [latex3/latex2e] UF-latex-lab-luamml: add luamml with tagging sockets (dc9c42682)
github at latex-project.org
github at latex-project.org
Fri Nov 29 16:48:15 CET 2024
Repository : https://github.com/latex3/latex2e
On branch : UF-latex-lab-luamml
Link : https://github.com/latex3/latex2e/commit/dc9c4268209624793e3bd8c8b807dcdd1dfdc94c
>---------------------------------------------------------------
commit dc9c4268209624793e3bd8c8b807dcdd1dfdc94c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Fri Nov 29 16:48:15 2024 +0100
add luamml with tagging sockets
>---------------------------------------------------------------
dc9c4268209624793e3bd8c8b807dcdd1dfdc94c
texmf/tex/lualatex/luamml/luamml-array.lua | 2 +-
texmf/tex/lualatex/luamml/luamml-patches-array.sty | 131 ++++++---------------
2 files changed, 38 insertions(+), 95 deletions(-)
diff --git a/texmf/tex/lualatex/luamml/luamml-array.lua b/texmf/tex/lualatex/luamml/luamml-array.lua
index 9a7b3581f..f1fd7c56e 100644
--- a/texmf/tex/lualatex/luamml/luamml-array.lua
+++ b/texmf/tex/lualatex/luamml/luamml-array.lua
@@ -54,7 +54,7 @@ end
local saved_array
-funcid = luatexbase.new_luafunction'__luamml_array_finalize_array:'
+funcid = luatexbase.new_luafunction'__luamml_array_save_array:'
token.set_lua('__luamml_array_save_array:', funcid)
lua.get_functions_table()[funcid] = function()
-- TODO: Error handling etc.
diff --git a/texmf/tex/lualatex/luamml/luamml-patches-array.sty b/texmf/tex/lualatex/luamml/luamml-patches-array.sty
index b08d5615e..9e835526c 100644
--- a/texmf/tex/lualatex/luamml/luamml-patches-array.sty
+++ b/texmf/tex/lualatex/luamml/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.