diff options
Diffstat (limited to 'macros/luatex/latex/luamml/luamml-patches-array.sty')
-rw-r--r-- | macros/luatex/latex/luamml/luamml-patches-array.sty | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/macros/luatex/latex/luamml/luamml-patches-array.sty b/macros/luatex/latex/luamml/luamml-patches-array.sty new file mode 100644 index 0000000000..ee40b2c489 --- /dev/null +++ b/macros/luatex/latex/luamml/luamml-patches-array.sty @@ -0,0 +1,86 @@ +\ProvidesExplPackage {luamml-patches-array} {2024-08-14} {0.1.0} + {Feel free to add a description here} + +\lua_now:n { require'luamml-array' } + +\cs_set:Npn \@classz { + \@classx + \@tempcnta \count@ + \prepnext@tok + \@addtopreamble { + \ifcase \@chnum + \hfil + \hskip 1sp + \d@llarbegin + \cs_if_eq:NNTF \d@llarbegin \begingroup { + \insert@column + \d@llarend + } { + \__luamml_array_init_col: + \insert@column + \luamml_flag_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_flag_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_flag_save:nn {} {mtd} + \d@llarend + \__luamml_array_finalize_col:w 2~ + } + \do@row@strut + \or + \setbox \ar@mcellbox \vbox \@startpbox { \@nextchar } + \insert@column + \@endpbox + \ar@align@mcell + \do@row@strut + \or + \vtop \@startpbox { \@nextchar } + \insert@column + \@endpbox + \do@row@strut + \or + \vbox \@startpbox { \@nextchar } + \insert@column + \@endpbox + \do@row@strut + \fi + } + \prepnext@tok +} + +\cs_set:Npn \endarray { + \crcr + \__luamml_array_save_array: + \egroup + \egroup + \mode_if_math:T { \__luamml_array_finalize_array: } + \@arrayright + \gdef \@preamble {} +} |