From c35318a1aa4a2c2e2ef10a3f13df5a7334f71baf Mon Sep 17 00:00:00 2001 From: peaR Date: Sat, 9 May 2026 10:24:10 +0800 Subject: [PATCH 1/8] Override `beamerarticle` redefinitions of `\\` --- tabularray-dev.sty | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tabularray-dev.sty b/tabularray-dev.sty index 2976fb0..df95892 100644 --- a/tabularray-dev.sty +++ b/tabularray-dev.sty @@ -21,9 +21,9 @@ \providecommand\DeclareCurrentRelease[2]{} \DeclareRelease{v2024}{2022-01-01}{tabularray-2024.sty} \DeclareRelease{v2021}{2021-01-01}{tabularray-2021.sty} -\DeclareCurrentRelease{}{2025-01-01} +\DeclareCurrentRelease{}{2026-01-01} -\ProvidesExplPackage{tabularray-dev}{2026-02-23}{2026A-DEV} +\ProvidesExplPackage{tabularray-dev}{2026-05-09}{2026A-DEV} {Develoment and experimental variant of tabularray} %% \IfFormatAtLeastTF, xparse and lthooks are added in LaTeX 2020-10-01 @@ -55,20 +55,29 @@ } \NewDocumentCommand \TblrParboxRestore { } { \@parboxrestore } +\cs_set_eq:NN \__tblr_cr: \@normalcr +\cs_set_eq:NN \__tblr_center_cr: \@centercr + +\AddToHook {package/beamerarticle/after} [tabularray] + { + \cs_set_eq:NN \__tblr_cr: \beamer@origbreak + \cs_set_eq:NN \__tblr_center_cr: \beamer@origbreakcenter + } + \NewDocumentCommand \TblrAlignBoth { } { - \let \\ = \@normalcr + \let \\ = \__tblr_cr: \leftskip = \z@skip \@rightskip = \z@skip \rightskip = \@rightskip \parfillskip = \@flushglue } -\NewDocumentCommand \TblrAlignLeft { } { \raggedright } +\NewDocumentCommand \TblrAlignLeft { } { \raggedright \let \\ = \__tblr_center_cr: } -\NewDocumentCommand \TblrAlignCenter { } { \centering } +\NewDocumentCommand \TblrAlignCenter { } { \centering \let \\ = \__tblr_center_cr: } -\NewDocumentCommand \TblrAlignRight { } { \raggedleft } +\NewDocumentCommand \TblrAlignRight { } { \raggedleft \let \\ = \__tblr_center_cr: } \cs_set_eq:NN \TblrNewPage \newpage From 35ef7bffe245e1f62d06202e76c69cd487697f6b Mon Sep 17 00:00:00 2001 From: peaR Date: Sat, 9 May 2026 11:02:05 +0800 Subject: [PATCH 2/8] Make `glossaries` comply with `tabularray`'s measuring phase --- tabularray-dev.sty | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tabularray-dev.sty b/tabularray-dev.sty index df95892..ad41dda 100644 --- a/tabularray-dev.sty +++ b/tabularray-dev.sty @@ -4747,6 +4747,10 @@ \cs_new_protected:Npn \__tblr_get_cell_text_real:nn #1 #2 { \group_begin: + \bool_if:NT \lTblrMeasuringBool + { + \cs_if_exist:NT \glsifmeasuring { \cs_gset_eq:NN \glsifmeasuring \@firstoftwo } + } \dim_set:Nn \belowsep { \__tblr_data_item:nen { row } From af72e707be8fc0792b5dd62665d577b8ac021aa6 Mon Sep 17 00:00:00 2001 From: peaR Date: Mon, 11 May 2026 11:15:30 +0800 Subject: [PATCH 3/8] Convert tl vars to int --- tabularray-dev.sty | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tabularray-dev.sty b/tabularray-dev.sty index ad41dda..39bfe0d 100644 --- a/tabularray-dev.sty +++ b/tabularray-dev.sty @@ -23,7 +23,7 @@ \DeclareRelease{v2021}{2021-01-01}{tabularray-2021.sty} \DeclareCurrentRelease{}{2026-01-01} -\ProvidesExplPackage{tabularray-dev}{2026-05-09}{2026A-DEV} +\ProvidesExplPackage{tabularray-dev}{2026-05-11}{2026A-DEV} {Develoment and experimental variant of tabularray} %% \IfFormatAtLeastTF, xparse and lthooks are added in LaTeX 2020-10-01 @@ -2641,16 +2641,16 @@ \tblr_set_cell:nn { #1 } { #2 } } -\tl_new:N \l__tblr_row_span_num_tl -\tl_new:N \l__tblr_col_span_num_tl +\int_new:N \l__tblr_row_span_num_int +\int_new:N \l__tblr_col_span_num_int \cs_new_protected:Npn \tblr_set_cell:nn #1 #2 { - \tl_set:Nn \l__tblr_row_span_num_tl { 1 } - \tl_set:Nn \l__tblr_col_span_num_tl { 1 } + \int_set:Nn \l__tblr_row_span_num_int { 1 } + \int_set:Nn \l__tblr_col_span_num_int { 1 } \__tblr_keys_set:nn { cell/outer } { #1 } \__tblr_keys_set:nn { cell/inner } { #2 } - \__tblr_set_span_spec:VV \l__tblr_row_span_num_tl \l__tblr_col_span_num_tl + \__tblr_set_span_spec:VV \l__tblr_row_span_num_int \l__tblr_col_span_num_int } \cs_generate_variant:Nn \tblr_set_cell:nn { nV } @@ -2707,8 +2707,8 @@ \__tblr_keys_define:nn { cell/outer } { - r .tl_set:N = \l__tblr_row_span_num_tl, - c .tl_set:N = \l__tblr_col_span_num_tl, + r .int_set:N = \l__tblr_row_span_num_int, + c .int_set:N = \l__tblr_col_span_num_int, } \__tblr_keys_define:nn { cell/inner } From 1baf0410a258a541cf4423022c27ae5df934804a Mon Sep 17 00:00:00 2001 From: peaR Date: Mon, 11 May 2026 11:46:02 +0800 Subject: [PATCH 4/8] Add out-of-bounds span check --- tabularray-dev.sty | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/tabularray-dev.sty b/tabularray-dev.sty index 39bfe0d..ce99279 100644 --- a/tabularray-dev.sty +++ b/tabularray-dev.sty @@ -24,7 +24,7 @@ \DeclareCurrentRelease{}{2026-01-01} \ProvidesExplPackage{tabularray-dev}{2026-05-11}{2026A-DEV} - {Develoment and experimental variant of tabularray} + {Development and experimental variant of tabularray} %% \IfFormatAtLeastTF, xparse and lthooks are added in LaTeX 2020-10-01 %% Note that \@ifl@t@r or \@ifpackagelater means 'this date or later' @@ -2650,7 +2650,7 @@ \int_set:Nn \l__tblr_col_span_num_int { 1 } \__tblr_keys_set:nn { cell/outer } { #1 } \__tblr_keys_set:nn { cell/inner } { #2 } - \__tblr_set_span_spec:VV \l__tblr_row_span_num_int \l__tblr_col_span_num_int + \__tblr_set_span_spec:NN \l__tblr_row_span_num_int \l__tblr_col_span_num_int } \cs_generate_variant:Nn \tblr_set_cell:nn { nV } @@ -2800,22 +2800,40 @@ } \cs_generate_variant:Nn \__tblr_cell_unknown_key:n { V } +\msg_new:nnn { tabularray } { crop-rowspan } + { Row ~ span ~ of ~ cell ~ [#1][#2] ~ is ~ too ~ large ~ and ~ cropped ~ to ~ #3. } + +\msg_new:nnn { tabularray } { crop-colspan } + { Column ~ span ~ of ~ cell ~ [#1][#2] ~ is ~ too ~ large ~ and ~ cropped ~ to ~ #3. } + %% Whether to allow page breaks in the middle of multirow cells \bool_new:N \lTblrCellBreakBool -\cs_new_protected:Npn \__tblr_set_span_spec:nn #1 #2 +\cs_new_protected:Npn \__tblr_set_span_spec:NN #1 #2 { + \int_compare:nNnT { \c@rownum + #1 - 1 } > { \c@rowcount } + { + \int_set:Nn #1 { \int_max:nn { 1 } { \c@rowcount - \c@rownum + 1 } } + \msg_warning:nneee { tabularray } { crop-rowspan } + { \int_use:N \c@rownum } { \int_use:N \c@colnum } { \int_use:N #1 } + } + \int_compare:nNnT { \c@colnum + #2 - 1 } > { \c@colcount } + { + \int_set:Nn #2 { \int_max:nn { 1 } { \c@colcount - \c@colnum + 1 } } + \msg_warning:nneee { tabularray } { crop-colspan } + { \int_use:N \c@rownum } { \int_use:N \c@colnum } { \int_use:N #2 } + } \int_compare:nNnT { #1 } > { 1 } { \__tblr_prop_gput:nnn { inner } { rowspan } { true } - \__tblr_data_gput:neenn { cell } - { \int_use:N \c@rownum } { \int_use:N \c@colnum } { rowspan } {#1} + \__tblr_data_gput:neene { cell } + { \int_use:N \c@rownum } { \int_use:N \c@colnum } { rowspan } { \int_use:N #1 } } \int_compare:nNnT { #2 } > { 1 } { \__tblr_prop_gput:nnn { inner } { colspan } { true } - \__tblr_data_gput:neenn { cell } - { \int_use:N \c@rownum } { \int_use:N \c@colnum } { colspan } {#2} + \__tblr_data_gput:neene { cell } + { \int_use:N \c@rownum } { \int_use:N \c@colnum } { colspan } { \int_use:N #2 } } \int_step_variable:nnNn { \int_use:N \c@rownum } { \int_eval:n { \c@rownum + #1 - 1 } } \l__tblr_i_tl @@ -2867,7 +2885,6 @@ { [\l__tblr_i_tl][\int_eval:n {\c@colnum + #2}](1) / belowpos } {1} } } -\cs_generate_variant:Nn \__tblr_set_span_spec:nn { VV } %% Obsolete \multicolumn and \multirow commands From 55dfb16c743a00b15ab5c63db93fc07d22a36b61 Mon Sep 17 00:00:00 2001 From: peaR Date: Mon, 11 May 2026 13:32:56 +0800 Subject: [PATCH 5/8] Add new test file --- testfiles/rowcol-007.md5 | 1 + testfiles/rowcol-007.png | Bin 0 -> 7740 bytes testfiles/rowcol-007.tex | 15 +++++++++++++++ testfiles/rowcol-007.tlg | 10 ++++++++++ 4 files changed, 26 insertions(+) create mode 100644 testfiles/rowcol-007.md5 create mode 100644 testfiles/rowcol-007.png create mode 100644 testfiles/rowcol-007.tex create mode 100644 testfiles/rowcol-007.tlg diff --git a/testfiles/rowcol-007.md5 b/testfiles/rowcol-007.md5 new file mode 100644 index 0000000..2c0eb8a --- /dev/null +++ b/testfiles/rowcol-007.md5 @@ -0,0 +1 @@ +96c80abaddba2db82b0cda98ebe7b4c2 \ No newline at end of file diff --git a/testfiles/rowcol-007.png b/testfiles/rowcol-007.png new file mode 100644 index 0000000000000000000000000000000000000000..9d5e406caf9a01e3b6fad105098630ede4786525 GIT binary patch literal 7740 zcmeAS@N?(olHy`uVBq!ia0y~yU=d(oU_Hvg1Qao7-q{bNI14-?iy0Wi1wokcl-g%| z1_s%8o-U3d6}R5pwf6|Emp|~a*m!GzGplljfK*8*Pt+8po)el=lqRe(XjjQGD0;)M z>B%d|deisdKZQ#Iyx~qNr=~c~(dz2bm}uf8yK7cv%KR<45&7Q6o>*ekJ`t@sVJ-xiFtXD5z zo;-1)K%9Z0V|##(*ydJN2`Q<{3p+!r>CWD+rE7_ zFoHSS_Qz&rWdYSVIUPFRo|&0>G2_eee)(_A3=VrL+aGS9Hg&40jm?}HGc4+bdfnLB z**|~!RAf`FlP- zKD)|KDw>)rH*6?)dTMHEX(>=~x5d-HzrXL?xf5vSe~b0&*6pkKxM(*tf&VkTmx!Fs zDNNo+Jc02F49985inJp(u=C5^*9cyjoUNCy zuda?x&*dZA^Y6DgEu1q)1{Btsm4`N5II0_MCePzP-|p?(x4i9#SBJ0fJH94D=h}@M z6+b>CW&@RVRv!A`trxT7!>g;S=gphf&M%*LZ;z#4@T}Rh`Q>b8OqgI`Yn%HV@>I`1SSi`M1HU{DDalDF6BS`O~LP1qB6l zb$5$@e-6rT`}W9R+Is z{wmGMc>_#L*Z4r$;Lrwv+}zxDK3S{!e}5X8*`N6t85=h%RD6GT_YvQ$dGq>QfX+&J zSM)AB+SXK0Y?b4T*=_j>?7vf`DQD z&u3?6U%PfKc6ZrN|MTD&2nR-deSLjy?%O|}?(XgyB35;ODq^1Z_4cwle)#!0eLFBc zE}dBL>q}X!S7Sw@~ literal 0 HcmV?d00001 diff --git a/testfiles/rowcol-007.tex b/testfiles/rowcol-007.tex new file mode 100644 index 0000000..2cab5ed --- /dev/null +++ b/testfiles/rowcol-007.tex @@ -0,0 +1,15 @@ +\documentclass{article} +\input{regression-test} + +\begin{document} +\START + +\BEGINTEST{Warning for out-of-bound span} +\begin{tblr}{ + cell{2}{2}={c=2,r=2}{} +} + 1 & 2 \\ + 3 & 4 \\ +\end{tblr} +\ENDTEST +\end{document} \ No newline at end of file diff --git a/testfiles/rowcol-007.tlg b/testfiles/rowcol-007.tlg new file mode 100644 index 0000000..be42927 --- /dev/null +++ b/testfiles/rowcol-007.tlg @@ -0,0 +1,10 @@ +This is a generated file for the l3build validation system. +Don't change this file in any respect. +============================================================ +TEST 1: Warning for out-of-bound span +============================================================ +Package tabularray Warning: Row span of cell [2][2] is too large and cropped to 1. +Package tabularray Warning: Column span of cell [2][2] is too large and cropped to 1. +============================================================ +[1 +] (rowcol-007.aux) From 69c4921589d0d230fd7d3ac2ef269d8b1ac57682 Mon Sep 17 00:00:00 2001 From: peaR Date: Wed, 13 May 2026 10:42:06 +0800 Subject: [PATCH 6/8] Update `CHANGELOG.md` --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77e0ef6..36d755a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ +# [v2026A] - 2026-05 + +## Added + +- Added `bgcolor` key for background rules (#217, #287, #595) +- Added warning messages for out-of-bound cell spans (#418, #419) +- Added warning messages for extreme negative `rowsep` and `colsep` values (#428) +- Require the `xcolor` package upon loading `tabularray` (#645) + +## Changed + +- Renamed `fg` and `bg` keys to `fgcolor` and `bgcolor` respectively +- Reworked the extendable column algorithm (#210) +- Made the internal state-tracking variables local (#401) + +## Fixed + +- Properly handle non-existent class styles (#636) +- Improved shrinking heuristics for rules and background cells (#428) +- Update `belowsep` and `rightsep` values before cell content evaluation (#387, #470) +- Gobble leading spaces inside braced cells (#590) +- Ensure `\topskip` cancellation only applies on explicitly generated new pages (#587) +- Limit the internal page overfill dimen to a minimum of 0pt (#587) +- Restore original linebreak definitions when `beamerarticle` is loaded (#632) +- Make `glossaries` interact with the `tabularray` measuring phase (#635) +- Refactor `longtable` to handle manual page breaks correctly (#164, #184) + +## Removed + +- Removed `ninecolors` dependency (#643) + +--- + All notable changes to this package will be documented here. The format is based on [Keep a Changelog](https://keepachangelog.com). +Changes above this text are made in a DEV release. # [v2025C] - 2025-11-27 From a43e44b64480402b1c4fc518d7576d98200b9007 Mon Sep 17 00:00:00 2001 From: peaR Date: Fri, 15 May 2026 08:25:04 +0800 Subject: [PATCH 7/8] From review --- CHANGELOG.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36d755a..58b3ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,10 @@ ## Changed - Renamed `fg` and `bg` keys to `fgcolor` and `bgcolor` respectively -- Reworked the extendable column algorithm (#210) +- Reworked the extendable column algorithm (#210, #658) - Made the internal state-tracking variables local (#401) +- Removed `ninecolors` dependency when `xcolor` is loaded (#643) + ## Fixed @@ -25,10 +27,6 @@ - Make `glossaries` interact with the `tabularray` measuring phase (#635) - Refactor `longtable` to handle manual page breaks correctly (#164, #184) -## Removed - -- Removed `ninecolors` dependency (#643) - --- All notable changes to this package will be documented here. From 86d539b60d2864329bbbd7d123994cf377c4724d Mon Sep 17 00:00:00 2001 From: ponte-vecchio Date: Sat, 16 May 2026 11:13:14 +1000 Subject: [PATCH 8/8] update changelog messages --- CHANGELOG.md | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58b3ff2..64f203c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,24 +2,24 @@ ## Added -- Added `bgcolor` key for background rules (#217, #287, #595) -- Added warning messages for out-of-bound cell spans (#418, #419) -- Added warning messages for extreme negative `rowsep` and `colsep` values (#428) -- Require the `xcolor` package upon loading `tabularray` (#645) +- `bgcolor` key for background rules (#217, #287, #595) +- Warning messages for out-of-bound cell spans (#418, #419) +- Warning messages for extreme negative `rowsep` and `colsep` values (#428) +- `xcolor` package as dependency (#645) ## Changed -- Renamed `fg` and `bg` keys to `fgcolor` and `bgcolor` respectively -- Reworked the extendable column algorithm (#210, #658) -- Made the internal state-tracking variables local (#401) -- Removed `ninecolors` dependency when `xcolor` is loaded (#643) +- Rename `fg` and `bg` keys to `fgcolor` and `bgcolor` respectively +- Extendable column algorithm (#210, #658) +- Internal state-tracking variables are now local (#401) +- `ninecolors` dependency when `xcolor` is loaded (#643) ## Fixed -- Properly handle non-existent class styles (#636) -- Improved shrinking heuristics for rules and background cells (#428) -- Update `belowsep` and `rightsep` values before cell content evaluation (#387, #470) +- Handling for non-existent class styles (#636) +- Shrinking heuristics for rules and background cells (#428) +- `belowsep` and `rightsep` values before cell content evaluation (#387, #470) - Gobble leading spaces inside braced cells (#590) - Ensure `\topskip` cancellation only applies on explicitly generated new pages (#587) - Limit the internal page overfill dimen to a minimum of 0pt (#587) @@ -27,12 +27,6 @@ - Make `glossaries` interact with the `tabularray` measuring phase (#635) - Refactor `longtable` to handle manual page breaks correctly (#164, #184) ---- - -All notable changes to this package will be documented here. -The format is based on [Keep a Changelog](https://keepachangelog.com). -Changes above this text are made in a DEV release. - # [v2025C] - 2025-11-27 ## Fixed