diff options
author | Karl Berry <karl@freefriends.org> | 2024-01-02 21:24:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-01-02 21:24:54 +0000 |
commit | 3ad1bca90a2b70273484d9b38302519acf8165db (patch) | |
tree | 85e3c9646aa02a00433868d0f98e7db9c185c137 /Master/texmf-dist/tex/latex | |
parent | 3aaebfcb00be531219f23db4d083ad984748e841 (diff) |
nicematrix (2jan24)
git-svn-id: svn://tug.org/texlive/trunk@69275 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty index c5425404e82..8f101bdf920 100644 --- a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty +++ b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty @@ -6,7 +6,7 @@ %% %% nicematrix-code.dtx (with options: `package') %% -%% Copyright (C) 2018-2023 by F. Pantigny +%% Copyright (C) 2018-2024 by F. Pantigny %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -18,8 +18,8 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% -\def\myfileversion{6.26b} -\def\myfiledate{2023/12/13} +\def\myfileversion{6.26c} +\def\myfiledate{2024/01/02} \RequirePackage{pgfcore} \usepgfmodule{shapes} \RequirePackage{l3keys2e} @@ -645,16 +645,22 @@ } } } +\cs_new_protected:Npn \__nicematrix_test_first_novalue:nnn #1 #2 #3 + { \tl_if_novalue:nT { #1 } { #3 } } \cs_new_protected:Npn \__nicematrix_tabularnote:nn #1 #2 { \int_zero:N \l_tmpa_int \bool_if:NT \l__nicematrix_notes_detect_duplicates_bool { + \int_zero:N \l_tmpb_int \seq_map_indexed_inline:Nn \g__nicematrix_notes_seq { + \__nicematrix_test_first_novalue:nnn ##2 { \int_incr:N \l_tmpb_int } \tl_if_eq:nnT { { #1 } { #2 } } { ##2 } { - \int_set:Nn \l_tmpa_int { ##1 } + \tl_if_novalue:nTF { #1 } + { \int_set_eq:NN \l_tmpa_int \l_tmpb_int } + { \int_set:Nn \l_tmpa_int { ##1 } } \seq_map_break: } } @@ -1989,7 +1995,7 @@ \use:c { c__nicematrix _ \int_use:N \g__nicematrix_env_int _ tl } } { \bool_gset_false:N \g__nicematrix_aux_found_bool } - \tl_build_gbegin:N \g__nicematrix_aux_tl + \tl_gclear:N \g__nicematrix_aux_tl \tl_if_empty:NF \g__nicematrix_code_before_tl { \bool_set_true:N \l__nicematrix_code_before_bool @@ -2019,7 +2025,7 @@ } \int_compare:nNnT \g__nicematrix_total_X_weight_int > \c_zero_int { - \tl_build_gput_right:Nx \g__nicematrix_aux_tl + \tl_gput_right:Nx \g__nicematrix_aux_tl { \bool_set_true:N \l__nicematrix_X_columns_aux_bool \dim_set:Nn \l__nicematrix_X_columns_dim @@ -2129,7 +2135,6 @@ } \__nicematrix_after_array: \egroup - \tl_build_gend:N \g__nicematrix_aux_tl \iow_now:Nn \@mainaux { \ExplSyntaxOn } \iow_now:Nn \@mainaux { \char_set_catcode_space:n { 32 } } \iow_now:Nx \@mainaux @@ -3065,7 +3070,7 @@ \__nicematrix_insert_caption: \int_compare:nNnT \g__nicematrix_notes_caption_int > \c_zero_int { - \tl_build_gput_right:Nx \g__nicematrix_aux_tl + \tl_gput_right:Nx \g__nicematrix_aux_tl { \tl_set:Nn \exp_not:N \l__nicematrix_note_in_caption_tl { \int_use:N \g__nicematrix_notes_caption_int } @@ -3826,7 +3831,7 @@ { \int_set_eq:NN \l__nicematrix_last_col_int \g__nicematrix_col_total_int } \bool_if:NT \l__nicematrix_last_row_without_value_bool { \int_set_eq:NN \l__nicematrix_last_row_int \g__nicematrix_row_total_int } - \tl_build_gput_right:Nx \g__nicematrix_aux_tl + \tl_gput_right:Nx \g__nicematrix_aux_tl { \seq_gset_from_clist:Nn \exp_not:N \g__nicematrix_size_seq { @@ -3840,7 +3845,7 @@ } \seq_if_empty:NF \g__nicematrix_pos_of_blocks_seq { - \tl_build_gput_right:Nx \g__nicematrix_aux_tl + \tl_gput_right:Nx \g__nicematrix_aux_tl { \seq_gset_from_clist:Nn \exp_not:N \g__nicematrix_pos_of_blocks_seq { \seq_use:Nnnn \g__nicematrix_pos_of_blocks_seq , , , } @@ -3848,7 +3853,7 @@ } \seq_if_empty:NF \g__nicematrix_multicolumn_cells_seq { - \tl_build_gput_right:Nx \g__nicematrix_aux_tl + \tl_gput_right:Nx \g__nicematrix_aux_tl { \seq_gset_from_clist:Nn \exp_not:N \g__nicematrix_multicolumn_cells_seq { \seq_use:Nnnn \g__nicematrix_multicolumn_cells_seq , , , } @@ -3950,7 +3955,7 @@ \seq_if_empty:NF \g__nicematrix_rowlistcolors_seq { \__nicematrix_clear_rowlistcolors_seq: } \tl_if_empty:NF \g__nicematrix_pre_code_before_tl { - \tl_build_gput_right:Nx \g__nicematrix_aux_tl + \tl_gput_right:Nx \g__nicematrix_aux_tl { \tl_gset:Nn \exp_not:N \g__nicematrix_pre_code_before_tl { \exp_not:o \g__nicematrix_pre_code_before_tl } @@ -3959,7 +3964,7 @@ } \tl_if_empty:NF \g_nicematrix_code_before_tl { - \tl_build_gput_right:Nx \g__nicematrix_aux_tl + \tl_gput_right:Nx \g__nicematrix_aux_tl { \tl_gset:Nn \exp_not:N \g__nicematrix_code_before_tl { \exp_not:o \g_nicematrix_code_before_tl } @@ -5342,10 +5347,8 @@ \keys_define:nn { NiceMatrix / RowStyle } { cell-space-top-limit .dim_set:N = \l_tmpa_dim , - cell-space-top-limit .initial:n = \c_zero_dim , cell-space-top-limit .value_required:n = true , cell-space-bottom-limit .dim_set:N = \l_tmpb_dim , - cell-space-bottom-limit .initial:n = \c_zero_dim , cell-space-bottom-limit .value_required:n = true , cell-space-limits .meta:n = { @@ -5372,6 +5375,8 @@ \tl_clear:N \l_tmpa_tl % value of \rowcolor \tl_clear:N \l__nicematrix_color_tl \int_set_eq:NN \l__nicematrix_key_nb_rows_int \c_one_int + \dim_zero:N \l_tmpa_dim + \dim_zero:N \l_tmpb_dim \keys_set:nn { NiceMatrix / RowStyle } { #1 } \tl_if_empty:NF \l_tmpa_tl { @@ -5396,29 +5401,23 @@ \__nicematrix_put_in_row_style:n { \exp_not:n { #2 } } \dim_compare:nNnT \l_tmpa_dim > \c_zero_dim { - \__nicematrix_put_in_row_style:n + \exp_args:Nx \__nicematrix_put_in_row_style:n { - \exp_not:n + \tl_gput_right:Nn \exp_not:N \g__nicematrix_cell_after_hook_tl { - \tl_gput_right:Nn \g__nicematrix_cell_after_hook_tl - { - \dim_set:Nn \l__nicematrix_cell_space_top_limit_dim - { \dim_use:N \l_tmpa_dim } - } + \dim_set:Nn \l__nicematrix_cell_space_top_limit_dim + { \dim_use:N \l_tmpa_dim } } } } \dim_compare:nNnT \l_tmpb_dim > \c_zero_dim { - \__nicematrix_put_in_row_style:n + \exp_args:Nx \__nicematrix_put_in_row_style:n { - \exp_not:n + \tl_gput_right:Nn \exp_not:N \g__nicematrix_cell_after_hook_tl { - \tl_gput_right:Nn \g__nicematrix_cell_after_hook_tl - { - \dim_set:Nn \l__nicematrix_cell_space_bottom_limit_dim - { \dim_use:N \l_tmpb_dim } - } + \dim_set:Nn \l__nicematrix_cell_space_bottom_limit_dim + { \dim_use:N \l_tmpb_dim } } } } @@ -6716,7 +6715,7 @@ } \seq_if_empty:NF \l__nicematrix_corners_cells_seq { - \tl_build_gput_right:Nx \g__nicematrix_aux_tl + \tl_gput_right:Nx \g__nicematrix_aux_tl { \seq_set_from_clist:Nn \exp_not:N \l__nicematrix_corners_cells_seq { \seq_use:Nnnn \l__nicematrix_corners_cells_seq , , , } @@ -9927,6 +9926,7 @@ left-margin,~ light-syntax,~ matrix/columns-type,~ + no-cell-nodes,~ notes~(several~subkeys),~ nullify-dots,~ pgf-node-code,~ @@ -9980,6 +9980,7 @@ left-margin,~ light-syntax,~ name,~ + no-cell-nodes,~ nullify-dots,~ pgf-node-code,~ renew-dots,~ @@ -10037,6 +10038,7 @@ left-margin,~ light-syntax,~ name,~ + no-cell-nodes,~ nullify-dots,~ pgf-node-code,~ r,~ @@ -10096,6 +10098,7 @@ left-margin,~ light-syntax,~ name,~ + no-cell-nodes,~ notes~(several~subkeys),~ nullify-dots,~ pgf-node-code,~ |