Skip to content

Commit

Permalink
Fix message for too wide table
Browse files Browse the repository at this point in the history
  • Loading branch information
muzimuzhi committed Apr 19, 2024
1 parent 913756c commit 9624f76
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions tabularray.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }
}
{
Expand Down
50 changes: 25 additions & 25 deletions testfiles/rowcol-004.tlg
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 9624f76

Please sign in to comment.