From f6c7bb6b9811286ac171875187f486aeadf82422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Tue, 22 Jun 2021 16:59:38 +0200 Subject: [PATCH] Don't break tabular when array is loaded --- luamml-patches-array.sty | 47 ++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/luamml-patches-array.sty b/luamml-patches-array.sty index 854416b..757b027 100644 --- a/luamml-patches-array.sty +++ b/luamml-patches-array.sty @@ -12,32 +12,47 @@ \hfil \hskip 1sp \d@llarbegin - \__luamml_array_init_col: - \insert@column - \luamml_flag_save: - \d@llarend - \__luamml_array_finalize_col:w 0~ + \cs_if_eq:NNTF \d@llarbegin \begingroup { + \insert@column + \d@llarend + } { + \__luamml_array_init_col: + \insert@column + \luamml_flag_save: + \d@llarend + \__luamml_array_finalize_col:w 0~ + } \do@row@strut \hfil \or \hskip 1sp \d@llarbegin - \__luamml_array_init_col: - \insert@column - \luamml_flag_save: - \d@llarend - \__luamml_array_finalize_col:w 1~ + \cs_if_eq:NNTF \d@llarbegin \begingroup { + \insert@column + \d@llarend + } { + \__luamml_array_init_col: + \insert@column + \luamml_flag_save: + \d@llarend + \__luamml_array_finalize_col:w 1~ + } \do@row@strut \hfil \or \hfil \hskip 1sp \d@llarbegin - \__luamml_array_init_col: - \insert@column - \luamml_flag_save: - \d@llarend - \__luamml_array_finalize_col:w 2~ + \cs_if_eq:NNTF \d@llarbegin \begingroup { + \insert@column + \d@llarend + } { + \__luamml_array_init_col: + \insert@column + \luamml_flag_save: + \d@llarend + \__luamml_array_finalize_col:w 2~ + } \do@row@strut \or \setbox \ar@mcellbox \vbox \@startpbox { \@nextchar } @@ -65,7 +80,7 @@ \__luamml_array_save_array: \egroup \egroup - \__luamml_array_finalize_array: + \mode_if_math:T { \__luamml_array_finalize_array: } \@arrayright \gdef \@preamble {} }