mathml/luamml-patches-array.sty

102 lines
2.2 KiB
Plaintext
Raw Normal View History

2024-08-14 20:10:21 +02:00
\ProvidesExplPackage {luamml-patches-array} {2024-08-14} {0.1.0}
{Feel free to add a description here}
\lua_now:n { require'luamml-array' }
2021-04-30 19:03:36 +02:00
\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
2024-10-26 00:45:57 +02:00
\luamml_save:nn {} {mtd}
\d@llarend
\__luamml_array_finalize_col:w 0~
}
2021-04-30 19:03:36 +02:00
\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
2024-10-26 00:45:57 +02:00
\luamml_save:nn {} {mtd}
\d@llarend
\__luamml_array_finalize_col:w 1~
}
2021-04-30 19:03:36 +02:00
\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
2024-10-26 00:45:57 +02:00
\luamml_save:nn {} {mtd}
\d@llarend
\__luamml_array_finalize_col:w 2~
}
2021-04-30 19:03:36 +02:00
\do@row@strut
\or
\setbox \ar@mcellbox \vbox \@startpbox { \@nextchar }
\insert@pcolumn
2021-04-30 19:03:36 +02:00
\@endpbox
\ar@align@mcell
\do@row@strut
\or
\vtop \@startpbox { \@nextchar }
\insert@pcolumn
2021-04-30 19:03:36 +02:00
\@endpbox
\do@row@strut
\or
\vbox \@startpbox { \@nextchar }
\insert@pcolumn
2021-04-30 19:03:36 +02:00
\@endpbox
\do@row@strut
\fi
}
\prepnext@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@pcolumn \insert@column
\cs_set:Npn \endarray {
\crcr
\__luamml_array_save_array:
\egroup
\egroup
\mode_if_math:T { \__luamml_array_finalize_array: }
\@arrayright
\gdef \@preamble {}
}
}