From 9624f768dcd31d692facc5c91e121cff01a51d54 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sat, 20 Apr 2024 00:52:24 +0800 Subject: [PATCH] Fix message for too wide table --- tabularray.sty | 6 ++--- testfiles/rowcol-004.tlg | 50 ++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tabularray.sty b/tabularray.sty index 710c585..fb82518 100644 --- a/tabularray.sty +++ b/tabularray.sty @@ -4034,15 +4034,15 @@ \prop_new:N \l__tblr_column_natural_width_prop \prop_new:N \l__tblr_column_computed_width_prop -\msg_new:nnn { tabularray } { table-width-too-small } - { Table ~ width ~ is ~ too ~ small, ~ need ~ #1 ~ more! } +\msg_new:nnn { tabularray } { table-too-wide } + { Table ~ is ~ too ~ wide, ~ need ~ #1 ~ narrower! } \cs_new_protected:Npn \__tblr_compute_extendable_column_width: { \__tblr_collect_extendable_column_width: \dim_compare:nNnTF { \l__tblr_column_target_dim } < { 0pt } { - \msg_warning:nnx { tabularray } { table-width-too-small } + \msg_warning:nnx { tabularray } { table-too-wide } { \dim_abs:n { \l__tblr_column_target_dim } } } { diff --git a/testfiles/rowcol-004.tlg b/testfiles/rowcol-004.tlg index 1558d73..0c4a24f 100644 --- a/testfiles/rowcol-004.tlg +++ b/testfiles/rowcol-004.tlg @@ -1,25 +1,25 @@ -This is a generated file for the l3build validation system. -Don't change this file in any respect. -============================================================ -TEST 1: normal columns with large widths -============================================================ -Package tabularray Warning: Table width is too small, need 21.99994pt more! -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <7> on input line .... -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <5> on input line .... -============================================================ -============================================================ -TEST 2: extendable columns with positive and negative coefficients -============================================================ -============================================================ -============================================================ -TEST 3: extendable columns with only negative coefficients -============================================================ -============================================================ -============================================================ -TEST 4: extendable underfull columns with only negative coefficients -============================================================ -============================================================ -[1 -] (rowcol-004.aux) +This is a generated file for the l3build validation system. +Don't change this file in any respect. +============================================================ +TEST 1: normal columns with large widths +============================================================ +Package tabularray Warning: Table is too wide, need 21.99994pt narrower! +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line .... +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line .... +============================================================ +============================================================ +TEST 2: extendable columns with positive and negative coefficients +============================================================ +============================================================ +============================================================ +TEST 3: extendable columns with only negative coefficients +============================================================ +============================================================ +============================================================ +TEST 4: extendable underfull columns with only negative coefficients +============================================================ +============================================================ +[1 +] (rowcol-004.aux)