diff options
Diffstat (limited to 'macros/latex/contrib/tabularray/tabularray.sty')
-rw-r--r-- | macros/latex/contrib/tabularray/tabularray.sty | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/macros/latex/contrib/tabularray/tabularray.sty b/macros/latex/contrib/tabularray/tabularray.sty index db63c63a3c..f5ad547d71 100644 --- a/macros/latex/contrib/tabularray/tabularray.sty +++ b/macros/latex/contrib/tabularray/tabularray.sty @@ -12,7 +12,7 @@ \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\ProvidesExplPackage{tabularray}{2021-10-01}{2021P} +\ProvidesExplPackage{tabularray}{2021-12-01}{2021Q} {Typeset tabulars and arrays with LaTeX3} \RequirePackage{xparse} @@ -114,6 +114,12 @@ \int_new:N \c@rowcount \int_new:N \c@colcount +%% Add missing \therownum, \thecolnum, \therowcount, \thecolcount (issue #129) +\NewExpandableDocumentCommand \therownum {} { \@arabic \c@rownum } +\NewExpandableDocumentCommand \thecolnum {} { \@arabic \c@colnum } +\NewExpandableDocumentCommand \therowcount {} { \@arabic \c@rowcount } +\NewExpandableDocumentCommand \thecolcount {} { \@arabic \c@colcount } + %% Some dimensions for row and column spacing \dim_new:N \abovesep \dim_new:N \belowsep @@ -2679,9 +2685,12 @@ } %% Decrease row count by 1 if the last row has only one empty cell text %% We need to do it here since the > or < column type may add text to cells - \bool_lazy_and:nnTF - { \int_compare_p:nNn {\c@colnum} = {1} } - { \tl_if_empty_p:N \l_tmpa_tl } + \bool_lazy_all:nTF + { + { \int_compare_p:nNn {#1} = {\c@rowcount} } + { \int_compare_p:nNn {\c@colnum} = {1} } + { \tl_if_empty_p:N \l_tmpa_tl } + } { \int_decr:N \c@rowcount } { \__tblr_prop_gput:nnx @@ -4661,7 +4670,7 @@ \tl_if_empty:NT \l__tblr_caption_short_tl { \tl_set:Nx \l__tblr_caption_short_tl { \InsertTblrText { caption } } } \addcontentsline { lot } { table } - { \protect\numberline { \arabic { table } } { \l__tblr_caption_short_tl } } + { \protect\numberline { \thetable } { \l__tblr_caption_short_tl } } } \SetTblrTemplate { caption-lot } { normal } |