summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nicematrix
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-23 03:01:03 +0000
committerNorbert Preining <norbert@preining.info>2023-11-23 03:01:03 +0000
commit4b11f001033c31cf22cda6f3d77dc2b5f013cd5b (patch)
treeea4d2ddd208b47806191c038078b3a9e688ae001 /macros/latex/contrib/nicematrix
parent3ccfe4b1586c1cafd045993a517e3b9ad3ed631e (diff)
CTAN sync 202311230301
Diffstat (limited to 'macros/latex/contrib/nicematrix')
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-code.dtx129
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-code.pdfbin964932 -> 968279 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.pdfbin596890 -> 600879 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.tex14
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.pdfbin615920 -> 617157 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.tex19
6 files changed, 132 insertions, 30 deletions
diff --git a/macros/latex/contrib/nicematrix/nicematrix-code.dtx b/macros/latex/contrib/nicematrix/nicematrix-code.dtx
index d70404e997..63334d973f 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-code.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix-code.dtx
@@ -17,8 +17,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{6.25b}
-\def\myfiledate{2023/11/16}
+\def\myfileversion{6.26}
+\def\myfiledate{2023/11/22}
%
%
%<*batchfile>
@@ -770,14 +770,21 @@ version 2005/12/01 or later.
}
% \end{macrocode}
% The classes of REVTeX do their own redefinition of |\array| and that's why the
-% previous mechanisme is not compatible with REVTeX. However, it would probably
+% previous mechanism is not compatible with REVTeX. However, it would probably
% be possible to do something similar for REVTeX...
% \begin{macrocode}
-\bool_if:NTF \c_@@_revtex_bool
- { \cs_new_protected:Npn \@@_redefine_mkpream: { } }
+\hook_gput_code:nnn { begindocument } { . }
{
- \cs_new_protected:Npn \@@_redefine_mkpream:
- { \cs_set_eq:NN \@mkpream \@@_mkpream: }
+ \bool_if:NTF \c_@@_revtex_bool
+ { \cs_new_protected:Npn \@@_redefine_mkpream: { } }
+ {
+ \IfPackageLoadedTF { arydshln }
+ { \cs_new_protected:Npn \@@_redefine_mkpream: { } }
+ {
+ \cs_new_protected:Npn \@@_redefine_mkpream:
+ { \cs_set_eq:NN \@mkpream \@@_mkpream: }
+ }
+ }
}
% \end{macrocode}
%
@@ -1536,8 +1543,14 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \medskip
-% For the vertical position, the possible values are |c|, |t| and |b|. Of
-% course, it would be interesting to program a key |T| and a key |B|.
+% If the final user has used the special color ``|nocolor|'', the following flag
+% will be raised.
+% \begin{macrocode}
+\bool_new:N \@@_nocolor_used_bool
+% \end{macrocode}
+%
+% \medskip
+% For the vertical position, the possible values are |c|, |t| and |b|.
% \begin{macrocode}
\str_new:N \l_@@_vpos_of_block_str
\str_set:Nn \l_@@_vpos_of_block_str { c }
@@ -4145,6 +4158,12 @@ version 2005/12/01 or later.
\cs_new_protected:Npn \@@_exec_code_before:
{
\seq_gclear_new:N \g_@@_colors_seq
+% \end{macrocode}
+% The sequence |\g_@@_colors_seq| will always contain as first element the
+% special color |nocolor|: when that color is used, no color will be applied in
+% the corresponding cells by the other coloring commands of \pkg{nicematrix}.
+% \begin{macrocode}
+ \@@_add_to_colors_seq:nn { { nocolor } } { }
\bool_gset_false:N \g_@@_recreate_cell_nodes_bool
\group_begin:
% \end{macrocode}
@@ -10222,17 +10241,26 @@ version 2005/12/01 or later.
\@@_clip_with_rounded_corners:
\seq_map_indexed_inline:Nn \g_@@_colors_seq
{
- \begin { pgfscope }
- \@@_color_opacity ##2
- \use:c { g_@@_color _ ##1 _tl }
- \tl_gclear:c { g_@@_color _ ##1 _tl }
- \pgfusepath { fill }
- \end { pgfscope }
+ \int_compare:nNnTF { ##1 } = 1
+ {
+ \cs_set_eq:NN \@@_cartesian_path:n \@@_cartesian_path_nocolor:n
+ \use:c { g_@@_color _ 1 _tl }
+ \cs_set_eq:NN \@@_cartesian_path:n \@@_cartesian_path_normal:n
+ }
+ {
+ \begin { pgfscope }
+ \@@_color_opacity ##2
+ \use:c { g_@@_color _ ##1 _tl }
+ \tl_gclear:c { g_@@_color _ ##1 _tl }
+ \pgfusepath { fill }
+ \end { pgfscope }
+ }
}
\endpgfpicture
}
% \end{macrocode}
%
+%
% \bigskip
% The following command will extract the potential key |opacity| in its optional
% argument (between square brackets) and (of course) then apply the command |\color|.
@@ -10603,15 +10631,18 @@ version 2005/12/01 or later.
% This command is in particular used in |\@@_rectanglecolor:nnn| (used in
% |\@@_rectanglecolor|, itself used in |\@@_cellcolor|).
% \begin{macrocode}
-\cs_new_protected:Npn \@@_cartesian_path:n #1
+\cs_new_protected:Npn \@@_cartesian_path_normal:n #1
{
- \bool_lazy_and:nnT
- { ! \seq_if_empty_p:N \l_@@_corners_cells_seq }
- { \dim_compare_p:nNn { #1 } = \c_zero_dim }
+ \bool_lazy_any:nT
{
- \@@_expand_clist:NN \l_@@_cols_tl \c@jCol
- \@@_expand_clist:NN \l_@@_rows_tl \c@iRow
+ { ! \seq_if_empty_p:N \l_@@_corners_cells_seq }
+ { \dim_compare_p:nNn { #1 } = \c_zero_dim }
+ { ! \@@_nocolor_used_bool }
}
+ {
+ \@@_expand_clist:NN \l_@@_cols_tl \c@jCol
+ \@@_expand_clist:NN \l_@@_rows_tl \c@iRow
+ }
% \end{macrocode}
% We begin the loop over the columns.
% \begin{macrocode}
@@ -10672,9 +10703,13 @@ version 2005/12/01 or later.
\@@_qpoint:n { row - \l_tmpa_tl }
\dim_set:Nn \l_@@_tmpd_dim { \pgf@y + 0.5 \arrayrulewidth }
\pgfsetcornersarced { \pgfpoint { #1 } { #1 } }
- \pgfpathrectanglecorners
- { \pgfpoint \l_@@_tmpc_dim \l_@@_tmpd_dim }
- { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
+ \cs_if_exist:cF
+ { @@ _ \l_tmpa_tl _ \l_@@_tmpc_tl _ nocolor }
+ {
+ \pgfpathrectanglecorners
+ { \pgfpoint \l_@@_tmpc_dim \l_@@_tmpd_dim }
+ { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
+ }
}
}
}
@@ -10691,6 +10726,30 @@ version 2005/12/01 or later.
%
%
% \bigskip
+% Despite its name, the following command does not create a PGF path. It
+% declares as colored by the ``empty color'' all the cells in what would be the
+% path. Hence, the other coloring instructions of \pkg{nicematrix} won't put
+% color in those cells.
+% the
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cartesian_path_nocolor:n #1
+ {
+ \bool_set_true:N \@@_nocolor_used_bool
+ \@@_expand_clist:NN \l_@@_cols_tl \c@jCol
+ \@@_expand_clist:NN \l_@@_rows_tl \c@iRow
+% \end{macrocode}
+% We begin the loop over the columns.
+% \begin{macrocode}
+ \clist_map_inline:Nn \l_@@_rows_tl
+ {
+ \clist_map_inline:Nn \l_@@_cols_tl
+ { \cs_set:cpn { @@ _ ##1 _ ####1 _ nocolor } { } }
+ }
+ }
+% \end{macrocode}
+%
+%
+% \bigskip
% The following command will be used only with |\l_@@_cols_tl| and |\c@jCol| (first
% case) or with |\l_@@_rows_tl| and |\c@iRow| (second case). For instance, with
% |\l_@@_cols_tl| equal to |2,4-6,8-*| and |\c@jCol| equal to |10|, the clist
@@ -12754,7 +12813,7 @@ version 2005/12/01 or later.
{
% \end{macrocode}
% If the first mandatory argument of the command (which is the size of the block
-% with the syntax $i$|-|$j$) has not be provided by the user, you use |1-1|
+% with the syntax $i$|-|$j$) has not been provided by the user, you use |1-1|
% (that is to say a block of only one cell).
% \begin{macrocode}
\peek_remove_spaces:n
@@ -15584,12 +15643,22 @@ version 2005/12/01 or later.
\fp_min:nn
{
\fp_min:nn
- { \dim_ratio:nn { \g_@@_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_@@_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
@@ -15680,8 +15749,8 @@ version 2005/12/01 or later.
\fp_min:nn
{
\fp_min:nn
- { \dim_ratio:nn { \g_@@_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_@@_tmpd_dim { \box_wd:N \l_tmpa_box } }
+ { \dim_ratio:nn \g_tmpb_dim { \box_ht_plus_dp:N \l_tmpa_box } }
}
{ 1.0 }
}
diff --git a/macros/latex/contrib/nicematrix/nicematrix-code.pdf b/macros/latex/contrib/nicematrix/nicematrix-code.pdf
index acdf19c303..5bf3af42b3 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-code.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
index 1217b82fdf..7ed598c337 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex
index b81d87457f..1524409d3f 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex
@@ -2507,6 +2507,20 @@ six \\
sept \\
\end{NiceTabular}
+\subsection{La couleur spécial «nocolor»}
+
+\index{nocolor}
+
+\colorbox{yellow!50}{\textbf{Nouveau 6.26}}\enskip L'extension \pkg{nicematrix}
+propose la couleur spéciale |nocolor| utilisable dans toutes les commandes de
+coloriage fournies par \pkg{nicematrix} (dans le |\CodeBefore| ou bien dans le
+tableau proprement dit).
+
+Les cases marquées par cette couleur ne seront pas coloriées, quelles que soient
+les autres commandes de coloriage qui auraient pu s'appliquer à ces cases.
+
+La couleur |nocolor| fournit donc un moyen commode de faire des exceptions à
+l'action d'une commande de coloriage générale.
\section{La commande \textbackslash RowStyle}
diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf
index 051d396651..242451d506 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix.tex b/macros/latex/contrib/nicematrix/nicematrix.tex
index 64aaf68522..ec7ed5c96d 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix.tex
@@ -2442,6 +2442,21 @@ seven \\
\end{NiceTabular}
+\subsection{The special color ``nocolor''}
+
+\index{nocolor}
+
+\colorbox{yellow!50}{\textbf{New 6.26}}\enskip The extension \pkg{nicematrix}
+provides the special color |nocolor| which may be used in all the coloring
+commands provided by \pkg{nicematrix} (in the |\CodeBefore| or the array
+itself).
+
+The cells marked by this color won't be colored, whatever the other instructions
+of coloring which may apply to these cells.
+
+Therefore, the color |nocolor| is an easy way to add an exception to a more
+general coloring command.
+
\section{The command \textbackslash RowStyle}
\label{RowStyle}
@@ -7173,6 +7188,10 @@ The successive versions of the file |nicematrix.sty| provided by TeXLive are ava
\nolinkurl{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty}
}
+\subsection*{Changes between version 6.25 and 6.26}
+
+Special color |nocolor|.
+
\subsection*{Changes between version 6.24 and 6.25}
Correction of several bugs.