summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty')
-rw-r--r--Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty75
1 files changed, 46 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
index 85326ddede9..ecf745ea8b1 100644
--- a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
+++ b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
@@ -18,8 +18,9 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
-\def\myfileversion{6.15}
-\def\myfiledate{2023/02/25}
+\def\myfileversion{6.16}
+\def\myfiledate{2023/03/06}
+
\RequirePackage{pgfcore}
\usepgfmodule{shapes}
@@ -419,6 +420,7 @@
\int_new:N \g__nicematrix_total_X_weight_int
\bool_new:N \l__nicematrix_X_columns_aux_bool
\dim_new:N \l__nicematrix_X_columns_dim
+\bool_new:N \l__nicematrix_X_V_bool
\bool_new:N \g__nicematrix_after_col_zero_bool
\bool_new:N \g__nicematrix_row_of_col_done_bool
\bool_new:N \g__nicematrix_not_empty_cell_bool
@@ -2030,29 +2032,31 @@
{
\str_case:nnF { #1 }
{
- c { \__nicematrix_patch_preamble_i:n #1 }
- l { \__nicematrix_patch_preamble_i:n #1 }
- r { \__nicematrix_patch_preamble_i:n #1 }
- > { \__nicematrix_patch_preamble_xiv:n }
- ! { \__nicematrix_patch_preamble_ii:nn #1 }
- @ { \__nicematrix_patch_preamble_ii:nn #1 }
- | { \__nicematrix_patch_preamble_iii:n #1 }
- p { \__nicematrix_patch_preamble_iv:n #1 }
- b { \__nicematrix_patch_preamble_iv:n #1 }
- m { \__nicematrix_patch_preamble_iv:n #1 }
+ c { \__nicematrix_patch_preamble_i:n #1 }
+ l { \__nicematrix_patch_preamble_i:n #1 }
+ r { \__nicematrix_patch_preamble_i:n #1 }
+ > { \__nicematrix_patch_preamble_xiv:n }
+ ! { \__nicematrix_patch_preamble_ii:nn #1 }
+ @ { \__nicematrix_patch_preamble_ii:nn #1 }
+ | { \__nicematrix_patch_preamble_iii:n #1 }
+ p { \__nicematrix_patch_preamble_iv:n #1 }
+ b { \__nicematrix_patch_preamble_iv:n #1 }
+ m { \__nicematrix_patch_preamble_iv:n #1 }
\__nicematrix_V: { \__nicematrix_patch_preamble_v:n }
- V { \__nicematrix_patch_preamble_v:n }
- \__nicematrix_w: { \__nicematrix_patch_preamble_vi:nnnn { } #1 }
- \__nicematrix_W: { \__nicematrix_patch_preamble_vi:nnnn { \__nicematrix_special_W: } #1 }
- \__nicematrix_S: { \__nicematrix_patch_preamble_vii:n }
- ( { \__nicematrix_patch_preamble_viii:nn #1 }
- [ { \__nicematrix_patch_preamble_viii:nn #1 }
- \{ { \__nicematrix_patch_preamble_viii:nn #1 }
- ) { \__nicematrix_patch_preamble_ix:nn #1 }
- ] { \__nicematrix_patch_preamble_ix:nn #1 }
- \} { \__nicematrix_patch_preamble_ix:nn #1 }
- X { \__nicematrix_patch_preamble_x:n }
- \__nicematrix_X { \__nicematrix_patch_preamble_x:n }
+ V { \__nicematrix_patch_preamble_v:n }
+ \__nicematrix_w: { \__nicematrix_patch_preamble_vi:nnnn { } #1 }
+ \__nicematrix_W: { \__nicematrix_patch_preamble_vi:nnnn { \__nicematrix_special_W: } #1 }
+ \__nicematrix_S: { \__nicematrix_patch_preamble_vii:n }
+ ( { \__nicematrix_patch_preamble_viii:nn #1 }
+ [ { \__nicematrix_patch_preamble_viii:nn #1 }
+ \{ { \__nicematrix_patch_preamble_viii:nn #1 }
+ \left { \__nicematrix_patch_preamble_viii:nn }
+ ) { \__nicematrix_patch_preamble_ix:nn #1 }
+ ] { \__nicematrix_patch_preamble_ix:nn #1 }
+ \} { \__nicematrix_patch_preamble_ix:nn #1 }
+ \right { \__nicematrix_patch_preamble_ix:nn }
+ X { \__nicematrix_patch_preamble_x:n }
+ \__nicematrix_X { \__nicematrix_patch_preamble_x:n }
\q_stop { }
}
{
@@ -2419,7 +2423,7 @@
{
\tl_gput_right:Nx \g__nicematrix_pre_code_after_tl
{ \__nicematrix_delimiter:nnn #1 { \int_eval:n { \c@jCol + 1 } } \c_true_bool }
- \tl_if_in:nnTF { ( [ \{ ) ] \} } { #2 }
+ \tl_if_in:nnTF { ( [ \{ ) ] \} \left \right } { #2 }
{
\__nicematrix_error:nn { delimiter~after~opening } { #2 }
\__nicematrix_patch_preamble:n
@@ -2444,7 +2448,7 @@
}
}
{
- \tl_if_in:nnT { ( [ \{ } { #2 }
+ \tl_if_in:nnT { ( [ \{ \left } { #2 }
{ \tl_gput_right:Nn \g__nicematrix_preamble_tl { ! { \enskip } } }
\tl_gput_right:Nx \g__nicematrix_pre_code_after_tl
{ \__nicematrix_delimiter:nnn #1 { \int_use:N \c@jCol } \c_false_bool }
@@ -2486,7 +2490,10 @@
\cs_new_protected:Npn \__nicematrix_patch_preamble_x_i:w [ #1 ]
{ \__nicematrix_patch_preamble_x_ii:n { #1 } }
\keys_define:nn { WithArrows / X-column }
- { unknown .code:n = \int_set:Nn \l__nicematrix_weight_int { \l_keys_key_str } }
+ {
+ v .bool_set:N = \l__nicematrix_X_V_bool ,
+ unknown .code:n = \int_set:Nn \l__nicematrix_weight_int { \l_keys_key_str }
+ }
\cs_new_protected:Npn \__nicematrix_patch_preamble_x_ii:n #1
{
\str_set:Nn \l__nicematrix_hpos_col_str { j }
@@ -2496,7 +2503,7 @@
\tl_set:Nn \l_tmpa_tl { #1 }
\tl_replace_all:Nnn \l_tmpa_tl { \__nicematrix_S: } { S }
\__nicematrix_keys_p_column:V \l_tmpa_tl
- % \keys_set_known:nnN { WithArrows / p-column } { #1 } \l_tmpa_tl
+ \bool_set_false:N \l__nicematrix_X_V_bool
\keys_set:nV { WithArrows / X-column } \l_tmpa_tl
\int_compare:nNnT \l__nicematrix_weight_int < 0
{
@@ -2506,9 +2513,14 @@
\int_gadd:Nn \g__nicematrix_total_X_weight_int \l__nicematrix_weight_int
\bool_if:NTF \l__nicematrix_X_columns_aux_bool
{
+ \exp_args:Nnx
\__nicematrix_patch_preamble_iv_iv:nn
{ \l__nicematrix_weight_int \l__nicematrix_X_columns_dim }
- { minipage }
+ {
+ \bool_if:NTF \l__nicematrix_X_V_bool
+ { varwidth }
+ { minipage }
+ }
}
{
\tl_gput_right:Nn \g__nicematrix_preamble_tl
@@ -2516,6 +2528,7 @@
> {
\__nicematrix_cell_begin:w
\bool_set_true:N \l__nicematrix_X_column_bool
+ \NotEmpty
\tl_gput_right:Nn \g__nicematrix_cell_after_hook_tl
{ \hbox_set:Nn \l__nicematrix_cell_box { } }
\begin { minipage } { 5 cm } \arraybackslash
@@ -8948,6 +8961,7 @@
first-row,~
hlines,~
hvlines,~
+ hvlines-except-borders,~
last-col,~
last-row,~
left-margin,~
@@ -8998,6 +9012,7 @@
first-row,~
hlines,~
hvlines,~
+ hvlines-except-borders,~
last-col,~
last-row,~
left-margin,~
@@ -9052,6 +9067,7 @@
first-row,~
hlines,~
hvlines,~
+ hvlines-except-borders,~
l,~
last-col,~
last-row,~
@@ -9108,6 +9124,7 @@
first-row,~
hlines,~
hvlines,~
+ hvlines-except-borders,~
label,~
last-col,~
last-row,~