texlive[63778] Master/texmf-dist: tabularray (1jul22)

commits+karl at tug.org commits+karl at tug.org
Fri Jul 1 22:43:38 CEST 2022


Revision: 63778
          http://tug.org/svn/texlive?view=revision&revision=63778
Author:   karl
Date:     2022-07-01 22:43:38 +0200 (Fri, 01 Jul 2022)
Log Message:
-----------
tabularray (1jul22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tabularray/tabularray.pdf
    trunk/Master/texmf-dist/doc/latex/tabularray/tabularray.tex
    trunk/Master/texmf-dist/tex/latex/tabularray/tabularray.sty

Modified: trunk/Master/texmf-dist/doc/latex/tabularray/tabularray.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/tabularray/tabularray.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tabularray/tabularray.tex	2022-07-01 20:43:25 UTC (rev 63777)
+++ trunk/Master/texmf-dist/doc/latex/tabularray/tabularray.tex	2022-07-01 20:43:38 UTC (rev 63778)
@@ -1,7 +1,7 @@
 % -*- coding: utf-8 -*-
 % !TEX program = lualatex
 \documentclass[oneside]{book}
-\newcommand*{\myversion}{2022B}
+\newcommand*{\myversion}{2022C}
 \newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
 
 \usepackage[a4paper,margin=2.5cm]{geometry}
@@ -125,8 +125,8 @@
   Version    & \myversion\ (\the\year-\mylpad\month-\mylpad\day) \\
   Code       & \url{https://github.com/lvjr/tabularray} \\
   Code       & \url{https://bitbucket.org/lvjr/tabularray} \\
-  Forum      & \url{https://github.com/lvjr/tabularray/discussions} \\
-  Forum      & \url{https://tex.stackexchange.com/questions/tagged/tabularray} \\
+  Support    & \url{https://github.com/lvjr/tabularray/discussions} \\
+  Support    & \url{https://topanswers.xyz/tex} \\
   Issue      & \url{https://github.com/lvjr/tabularray/issues} \\
 \end{tblr}
 
@@ -142,8 +142,8 @@
   Version    & \myversion\ (\the\year-\mylpad\month-\mylpad\day) \\
   Code       & \url{https://github.com/lvjr/tabularray} \\
   Code       & \url{https://bitbucket.org/lvjr/tabularray} \\
-  Forum      & \url{https://github.com/lvjr/tabularray/discussions} \\
-  Forum      & \url{https://tex.stackexchange.com/questions/tagged/tabularray} \\
+  Support    & \url{https://github.com/lvjr/tabularray/discussions} \\
+  Support    & \url{https://topanswers.xyz/tex} \\
   Issue      & \url{https://github.com/lvjr/tabularray/issues} \\
 \end{tblr}
 \end{codehigh}
@@ -2959,7 +2959,7 @@
 \section{The Future}
 
 Starting from 2022, except for hotfix releases for critical bugs,
-all new releases will be published only in March, June, September or December.
+new releases will be published every three or six months.
 You may watch the milestones page for the scheduled dates of upcoming releases
 and their changes:\newline
 \centerline{\url{https://github.com/lvjr/tabularray/milestones}}

Modified: trunk/Master/texmf-dist/tex/latex/tabularray/tabularray.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tabularray/tabularray.sty	2022-07-01 20:43:25 UTC (rev 63777)
+++ trunk/Master/texmf-dist/tex/latex/tabularray/tabularray.sty	2022-07-01 20:43:38 UTC (rev 63778)
@@ -12,11 +12,13 @@
 
 %% \DeclareRelease and \DeclareCurrentRelease are added in LaTeX 2018-04-01
 \NeedsTeXFormat{LaTeX2e}[2018-04-01]
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
 \DeclareRelease{v2021}{2021-01-01}{tabularray-2021.sty}
 \DeclareCurrentRelease{}{2022-01-01}
 
 \RequirePackage{expl3}
-\ProvidesExplPackage{tabularray}{2022-06-01}{2022B}
+\ProvidesExplPackage{tabularray}{2022-07-01}{2022C}
   {Typeset tabulars and arrays with LaTeX3}
 
 %% \IfFormatAtLeastTF, xparse and lthooks are added in LaTeX 2020-10-01
@@ -24,7 +26,7 @@
 \msg_new:nnn { tabularray } { latex-too-old }
   {
     Your ~ LaTeX ~ release ~ is ~ too ~ old. \\
-    Please ~ update ~ to ~ 2020-10-01 ~ first.
+    Please ~ update ~ it ~ to ~ 2020-10-01 ~ first.
   }
 \@ifl at t@r\fmtversion{2020-10-01}{}{
   %% Support TeX Live 2020 on Overleaf
@@ -127,16 +129,16 @@
 %% Some counters for row and column numbering.
 %% We may need to restore all LaTeX counters in measuring and building cells,
 %% so we must not define these counters with \newcounter command.
-\int_new:N \c at rownum
-\int_new:N \c at colnum
-\int_new:N \c at rowcount
-\int_new:N \c at colcount
+\int_zero_new:N \c at rownum
+\int_zero_new:N \c at colnum
+\int_zero_new:N \c at rowcount
+\int_zero_new:N \c at colcount
 
 %% Add missing \therownum, \thecolnum, \therowcount, \thecolcount (issue #129)
-\NewExpandableDocumentCommand \therownum {} { \@arabic \c at rownum }
-\NewExpandableDocumentCommand \thecolnum {} { \@arabic \c at colnum }
-\NewExpandableDocumentCommand \therowcount {} { \@arabic \c at rowcount }
-\NewExpandableDocumentCommand \thecolcount {} { \@arabic \c at colcount }
+\ProvideExpandableDocumentCommand \therownum {} { \@arabic \c at rownum }
+\ProvideExpandableDocumentCommand \thecolnum {} { \@arabic \c at colnum }
+\ProvideExpandableDocumentCommand \therowcount {} { \@arabic \c at rowcount }
+\ProvideExpandableDocumentCommand \thecolcount {} { \@arabic \c at colcount }
 
 %% Some dimensions for row and column spacing
 \dim_new:N \abovesep
@@ -955,8 +957,14 @@
         \__tblr_make_xparse_arg_spec:nnN { #2 } { #3 } \l__tblr_a_tl
         \exp_args:NcV \NewDocumentCommand
           { __tblr_table_command_ \cs_to_str:N #1 :w } \l__tblr_a_tl { #4 }
-        \exp_args:NcV \NewDocumentCommand
-          { __tblr_table_command_ \cs_to_str:N #1 _gobble :w } \l__tblr_a_tl { }
+        \cs_if_exist:NTF #1
+          {
+            \cs_set_eq:cN { __tblr_table_command_ \cs_to_str:N #1 _saved:w } #1
+          }
+          {
+            \exp_args:NcV \NewDocumentCommand
+              { __tblr_table_command_ \cs_to_str:N #1 _saved:w } \l__tblr_a_tl { }
+          }
         \IfValueTF { #3 }
           {
             \tl_gset:cn { g__tblr_table_cmd_ \cs_to_str:N #1 _arg_numb_tl } {-#2}
@@ -977,7 +985,7 @@
 \cs_new_protected:Npn \__tblr_disable_table_commands:
   {
     \clist_map_inline:Nn \g__tblr_table_commands_clist
-      { \cs_set_eq:Nc ##1 { __tblr_table_command_ \cs_to_str:N ##1 _gobble:w } }
+      { \cs_set_eq:Nc ##1 { __tblr_table_command_ \cs_to_str:N ##1 _saved:w } }
   }
 
 \cs_new_protected:Npn \__tblr_execute_table_commands:
@@ -2258,12 +2266,12 @@
   }
 \cs_generate_variant:Nn \__tblr_row_unknown_key:n { V }
 
-\NewTableCommand \pagebreak
+\NewTableCommand \pagebreak [1] [4]
   {
     \hborder { pagebreak = yes }
   }
 
-\NewTableCommand \nopagebreak
+\NewTableCommand \nopagebreak [1] [4]
   {
     \hborder { pagebreak = no }
   }
@@ -3206,7 +3214,7 @@
 
 \cs_new_protected:Npn \__tblr_calc_cell_and_line_sizes:
   {
-    \__tblr_make_strut_box:
+    \__tblr_prepare_stretch:
     \__tblr_calculate_line_sizes:
     \__tblr_calculate_cell_sizes:
     \LogTblrTracing { cell, row, column, hline, vline }
@@ -3214,55 +3222,61 @@
     \__tblr_adjust_sizes_for_span_cells:
   }
 
-%% make strut box from stretch option of the table
-
-\box_new:N \l__tblr_strut_ht_box
-\box_new:N \l__tblr_strut_dp_box
-
-\cs_new_protected:Npn \__tblr_make_strut_box:
+%% prepare stretch option of the table
+\fp_new:N \l__tblr_stretch_fp
+\dim_new:N \l__tblr_strut_dp_dim
+\dim_new:N \l__tblr_strut_ht_dim
+\cs_new_protected:Npn \__tblr_prepare_stretch:
   {
-    \tl_set:Nx \l__tblr_s_tl { \__tblr_prop_item:ne { inner } { stretch } }
-    \fp_compare:nNnTF { \l__tblr_s_tl } > {0}
+    \fp_set:Nn \l__tblr_stretch_fp
+      { \__tblr_prop_item:nn { inner } { stretch } }
+    \fp_compare:nNnTF \l__tblr_stretch_fp > \c_zero_fp
       {
-        \hbox_set:Nn \l__tblr_strut_ht_box
-          { \vrule height \l__tblr_s_tl \box_ht:N \strutbox width ~ 0pt }
-        \hbox_set:Nn \l__tblr_strut_dp_box
-          { \vrule depth \l__tblr_s_tl \box_dp:N \strutbox width ~ 0pt }
-        \cs_set_eq:NN \__tblr_use_strut_ht_box: \__tblr_use_strut_ht_box_real:
-        \cs_set_eq:NN \__tblr_use_strut_dp_box: \__tblr_use_strut_dp_box_real:
+        \dim_set:Nn \l__tblr_strut_dp_dim
+          { \fp_use:N \l__tblr_stretch_fp \box_dp:N \strutbox }
+        \dim_set:Nn \l__tblr_strut_ht_dim
+          { \fp_use:N \l__tblr_stretch_fp \box_ht:N \strutbox }
+        \cs_set_eq:NN \__tblr_leave_vmode: \mode_leave_vertical:
+        \cs_set_eq:NN \__tblr_process_stretch: \__tblr_process_stretch_real:
       }
       {
-        \fp_compare:nNnTF { \l__tblr_s_tl } < {0}
+        \cs_set_eq:NN \__tblr_process_stretch: \prg_do_nothing:
+        \fp_compare:nNnTF \l__tblr_stretch_fp < \c_zero_fp
+          { \cs_set_eq:NN \__tblr_leave_vmode: \@setminipage } % for lists (see issue #99)
+          { \cs_set_eq:NN \__tblr_leave_vmode: \mode_leave_vertical: }
+      }
+  }
+\cs_new_eq:NN \__tblr_leave_vmode: \mode_leave_vertical:
+\cs_new_protected:Npn \__tblr_process_stretch_real:
+  {
+    \dim_compare:nNnT \l__tblr_strut_dp_dim > { \box_dp:N \l_tmpb_box }
+      {
+        \box_set_dp:Nn \l_tmpa_box
           {
-            \cs_set_eq:NN \__tblr_use_strut_ht_box: \__tblr_use_strut_ht_box_vmode:
+              \box_dp:N \l_tmpa_box
+            - \box_dp:N \l_tmpb_box
+            + \l__tblr_strut_dp_dim
           }
+        \box_set_dp:Nn \l_tmpb_box { \l__tblr_strut_dp_dim }
+      }
+    \dim_compare:nNnT \l__tblr_strut_ht_dim > { \box_ht:N \l_tmpa_box }
+      {
+        \hbox_set:Nn \l_tmpa_box { \box_use:N \l_tmpa_box }
+        \hbox_set:Nn \l_tmpb_box { \box_use:N \l_tmpb_box }
+        \box_set_ht:Nn \l_tmpb_box
           {
-            \cs_set_eq:NN \__tblr_use_strut_ht_box: \__tblr_use_strut_ht_box_hmode:
+              \box_ht:N \l_tmpb_box
+            - \box_ht:N \l_tmpa_box
+            + \l__tblr_strut_ht_dim
           }
-        \cs_set_eq:NN \__tblr_use_strut_dp_box: \__tblr_use_strut_dp_box_ignore:
+        \box_set_ht:Nn \l_tmpa_box { \l__tblr_strut_ht_dim }
+        %% return vbox for vertical-align: \c__tblr_middle_m_tl
+        \vbox_set_top:Nn \l_tmpa_box { \box_use:N \l_tmpa_box }
+        \vbox_set:Nn \l_tmpb_box { \box_use:N \l_tmpb_box }
       }
   }
+\cs_new_eq:NN \__tblr_process_stretch: \__tblr_process_stretch_real:
 
-\cs_new_protected:Npn \__tblr_use_strut_ht_box_real:
-  {
-    \mode_leave_vertical:
-    \box_use:N \l__tblr_strut_ht_box
-  }
-\cs_new_protected:Npn \__tblr_use_strut_ht_box_hmode:
-  {
-    \mode_leave_vertical:
-  }
-\cs_new_protected:Npn \__tblr_use_strut_ht_box_vmode:
-  {
-    \@minipagetrue % for lists (see issue #99)
-  }
-
-\cs_new_protected:Npn \__tblr_use_strut_dp_box_real:
-  {
-    \box_use:N \l__tblr_strut_dp_box
-  }
-\cs_new_protected:Npn \__tblr_use_strut_dp_box_ignore: { }
-
 %% Calculate the thickness for every hline and vline
 \cs_new_protected:Npn \__tblr_calculate_line_sizes:
   {
@@ -3309,7 +3323,10 @@
             \tl_set:Nx \l__tblr_w_tl { \dim_eval:n { \box_wd:N \l__tblr_b_box } }
             \__tblr_spec_gput_if_larger:nee { vline }
               { [#2](##1) / @vline-width } { \l__tblr_w_tl }
-            \dim_add:Nn \l__tblr_w_dim { \l__tblr_w_tl }
+            \dim_add:Nn \l__tblr_w_dim
+              {
+                \__tblr_spec_item:nn  { vline } { [#2](##1) / @vline-width }
+              }
             \dim_add:Nn \l__tblr_w_dim { \l__tblr_s_tl }
           }
         \dim_add:Nn \l__tblr_w_dim { - \l__tblr_s_tl }
@@ -3375,7 +3392,10 @@
               }
             \__tblr_spec_gput_if_larger:nee { hline }
               { [#1](##1) / @hline-height } { \l__tblr_h_tl }
-            \dim_add:Nn \l__tblr_h_dim { \l__tblr_h_tl }
+            \dim_add:Nn \l__tblr_h_dim
+              {
+                \__tblr_spec_item:nn  { hline } { [#1](##1) / @hline-height }
+              }
             \dim_add:Nn \l__tblr_h_dim { \l__tblr_s_tl }
           }
         \dim_add:Nn \l__tblr_h_dim { - \l__tblr_s_tl }
@@ -3622,9 +3642,11 @@
           }
         \__tblr_restore_counters:n { cell }
       }
+    \tl_put_left:NV \l__tblr_c_tl \l__tblr_f_tl
     \tl_set:Nx \l__tblr_cell_fg_tl
       { \__tblr_data_item:neen { cell } {#1} {#2} { foreground } }
-    \tl_put_left:NV \l__tblr_c_tl \l__tblr_f_tl
+    \tl_if_empty:NF \l__tblr_cell_fg_tl
+      { \exp_args:NV \color \l__tblr_cell_fg_tl }
     \__tblr_get_vcell_and_sizes:NN \l__tblr_c_tl \l__tblr_w_tl
     \group_end:
   }
@@ -3686,10 +3708,9 @@
 \cs_new_protected:Npn \__tblr_get_vcell_and_sizes:NN #1 #2
   {
     \group_begin:
-    \__tblr_save_counters:n { cell }
-    \vbox_set_top:Nn \l_tmpa_box { \__tblr_make_vcell_text:NN #1 #2 }
-    \__tblr_restore_counters:n { cell }
     \vbox_set:Nn \l_tmpb_box { \__tblr_make_vcell_text:NN #1 #2 }
+    \vbox_set_top:Nn \l_tmpa_box { \vbox_unpack:N \l_tmpb_box }
+    \__tblr_process_stretch:
     \dim_gset:Nn \g__tblr_cell_wd_dim { \box_wd:N \l_tmpb_box }
     \dim_gset:Nn \g__tblr_cell_ht_dim
       { \box_ht:N \l_tmpb_box + \box_dp:N \l_tmpb_box }
@@ -3738,13 +3759,10 @@
     \dim_set:Nn \tex_hsize:D { #2 }
     \TblrParboxRestore
     \cs:w __tblr_halign_command_ \g__tblr_cell_halign_tl : \cs_end:
-    %% \mode_leave_vertical: has been moved into \__tblr_use_strut_ht_box:
-    \__tblr_use_strut_ht_box:
-    \tl_if_empty:NF \l__tblr_cell_fg_tl { \exp_args:NV \color \l__tblr_cell_fg_tl }
+    \__tblr_leave_vmode:
     \bool_if:NTF \l__tblr_cell_math_mode_bool
       { #1 }
       { \__tblr_rescan_cell_tokens:N #1 }
-    \__tblr_use_strut_dp_box:
   }
 
 %% When using verb option, there is an end-of-line character at the end.



More information about the tex-live-commits mailing list.