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.sty97
1 files changed, 71 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
index 6d6e8bdcf08..d43c0d94cc5 100644
--- a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
+++ b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
@@ -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.25b}
-\def\myfiledate{2023/11/16}
+\def\myfileversion{6.26}
+\def\myfiledate{2023/11/22}
\RequirePackage{pgfcore}
\usepgfmodule{shapes}
\RequirePackage{l3keys2e}
@@ -345,11 +345,18 @@
\def\the@toks{\the\toks}
\cs_gset_eq:NN \@mkpream \__nicematrix_old_mkpream:
}
-\bool_if:NTF \c__nicematrix_revtex_bool
- { \cs_new_protected:Npn \__nicematrix_redefine_mkpream: { } }
+\hook_gput_code:nnn { begindocument } { . }
{
- \cs_new_protected:Npn \__nicematrix_redefine_mkpream:
- { \cs_set_eq:NN \@mkpream \__nicematrix_mkpream: }
+ \bool_if:NTF \c__nicematrix_revtex_bool
+ { \cs_new_protected:Npn \__nicematrix_redefine_mkpream: { } }
+ {
+ \IfPackageLoadedTF { arydshln }
+ { \cs_new_protected:Npn \__nicematrix_redefine_mkpream: { } }
+ {
+ \cs_new_protected:Npn \__nicematrix_redefine_mkpream:
+ { \cs_set_eq:NN \@mkpream \__nicematrix_mkpream: }
+ }
+ }
}
\cs_new_protected:Npn \__nicematrix_mkpream_colortbl: { }
\hook_gput_code:nnn { begindocument } { . }
@@ -498,6 +505,7 @@
\str_new:N \l__nicematrix_hpos_block_str
\str_set:Nn \l__nicematrix_hpos_block_str { c }
\bool_new:N \l__nicematrix_hpos_of_block_cap_bool
+\bool_new:N \__nicematrix_nocolor_used_bool
\str_new:N \l__nicematrix_vpos_of_block_str
\str_set:Nn \l__nicematrix_vpos_of_block_str { c }
\bool_new:N \l__nicematrix_draw_first_bool
@@ -1773,6 +1781,7 @@
\cs_new_protected:Npn \__nicematrix_exec_code_before:
{
\seq_gclear_new:N \g__nicematrix_colors_seq
+ \__nicematrix_add_to_colors_seq:nn { { nocolor } } { }
\bool_gset_false:N \g__nicematrix_recreate_cell_nodes_bool
\group_begin:
\bool_if:NT \l__nicematrix_tabular_bool \c_math_toggle_token
@@ -5442,12 +5451,20 @@
\__nicematrix_clip_with_rounded_corners:
\seq_map_indexed_inline:Nn \g__nicematrix_colors_seq
{
- \begin { pgfscope }
- \__nicematrix_color_opacity ##2
- \use:c { g__nicematrix_color _ ##1 _tl }
- \tl_gclear:c { g__nicematrix_color _ ##1 _tl }
- \pgfusepath { fill }
- \end { pgfscope }
+ \int_compare:nNnTF { ##1 } = 1
+ {
+ \cs_set_eq:NN \__nicematrix_cartesian_path:n \__nicematrix_cartesian_path_nocolor:n
+ \use:c { g__nicematrix_color _ 1 _tl }
+ \cs_set_eq:NN \__nicematrix_cartesian_path:n \__nicematrix_cartesian_path_normal:n
+ }
+ {
+ \begin { pgfscope }
+ \__nicematrix_color_opacity ##2
+ \use:c { g__nicematrix_color _ ##1 _tl }
+ \tl_gclear:c { g__nicematrix_color _ ##1 _tl }
+ \pgfusepath { fill }
+ \end { pgfscope }
+ }
}
\endpgfpicture
}
@@ -5654,14 +5671,17 @@
\prg_return_true:
\prg_return_false:
}
-\cs_new_protected:Npn \__nicematrix_cartesian_path:n #1
+\cs_new_protected:Npn \__nicematrix_cartesian_path_normal:n #1
{
- \bool_lazy_and:nnT
- { ! \seq_if_empty_p:N \l__nicematrix_corners_cells_seq }
- { \dim_compare_p:nNn { #1 } = \c_zero_dim }
+ \bool_lazy_any:nT
{
- \__nicematrix_expand_clist:NN \l__nicematrix_cols_tl \c@jCol
- \__nicematrix_expand_clist:NN \l__nicematrix_rows_tl \c@iRow
+ { ! \seq_if_empty_p:N \l__nicematrix_corners_cells_seq }
+ { \dim_compare_p:nNn { #1 } = \c_zero_dim }
+ { ! \__nicematrix_nocolor_used_bool }
+ }
+ {
+ \__nicematrix_expand_clist:NN \l__nicematrix_cols_tl \c@jCol
+ \__nicematrix_expand_clist:NN \l__nicematrix_rows_tl \c@iRow
}
\clist_map_inline:Nn \l__nicematrix_cols_tl
{
@@ -5705,14 +5725,29 @@
\__nicematrix_qpoint:n { row - \l_tmpa_tl }
\dim_set:Nn \l__nicematrix_tmpd_dim { \pgf@y + 0.5 \arrayrulewidth }
\pgfsetcornersarced { \pgfpoint { #1 } { #1 } }
- \pgfpathrectanglecorners
- { \pgfpoint \l__nicematrix_tmpc_dim \l__nicematrix_tmpd_dim }
- { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
+ \cs_if_exist:cF
+ { __nicematrix _ \l_tmpa_tl _ \l__nicematrix_tmpc_tl _ nocolor }
+ {
+ \pgfpathrectanglecorners
+ { \pgfpoint \l__nicematrix_tmpc_dim \l__nicematrix_tmpd_dim }
+ { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
+ }
}
}
}
}
\cs_new_protected:Npn \__nicematrix_cartesian_path: { \__nicematrix_cartesian_path:n { 0 pt } }
+\cs_new_protected:Npn \__nicematrix_cartesian_path_nocolor:n #1
+ {
+ \bool_set_true:N \__nicematrix_nocolor_used_bool
+ \__nicematrix_expand_clist:NN \l__nicematrix_cols_tl \c@jCol
+ \__nicematrix_expand_clist:NN \l__nicematrix_rows_tl \c@iRow
+ \clist_map_inline:Nn \l__nicematrix_rows_tl
+ {
+ \clist_map_inline:Nn \l__nicematrix_cols_tl
+ { \cs_set:cpn { __nicematrix _ ##1 _ ####1 _ nocolor } { } }
+ }
+ }
\cs_new_protected:Npn \__nicematrix_expand_clist:NN #1 #2
{
\clist_set_eq:NN \l_tmpa_clist #1
@@ -8806,12 +8841,22 @@
\fp_min:nn
{
\fp_min:nn
- { \dim_ratio:nn { \g__nicematrix_tmpd_dim } { \box_wd:N \l_tmpa_box } }
- { \dim_ratio:nn { \g_tmpb_dim } { \box_ht_plus_dp:N \l_tmpa_box } }
+ {
+ \dim_ratio:nn
+ { \g__nicematrix_tmpd_dim }
+ { \box_wd:N \l_tmpa_box }
+ }
+ {
+ \dim_ratio:nn
+ { \g_tmpb_dim }
+ { \box_ht_plus_dp:N \l_tmpa_box }
+ }
}
{ 1.0 }
}
- \box_scale:Nnn \l_tmpa_box { \fp_use:N \l_tmpa_fp } { \fp_use:N \l_tmpa_fp }
+ \box_scale:Nnn \l_tmpa_box
+ { \fp_use:N \l_tmpa_fp }
+ { \fp_use:N \l_tmpa_fp }
\pgfpicture
\pgfrememberpicturepositiononpagetrue
\pgf@relevantforpicturesizefalse
@@ -8899,8 +8944,8 @@
\fp_min:nn
{
\fp_min:nn
- { \dim_ratio:nn { \g__nicematrix_tmpd_dim } { \box_wd:N \l_tmpa_box } }
- { \dim_ratio:nn { \g_tmpb_dim } { \box_ht_plus_dp:N \l_tmpa_box } }
+ { \dim_ratio:nn \g__nicematrix_tmpd_dim { \box_wd:N \l_tmpa_box } }
+ { \dim_ratio:nn \g_tmpb_dim { \box_ht_plus_dp:N \l_tmpa_box } }
}
{ 1.0 }
}