texlive[72844] Master/texmf-dist: nicematrix (13nov24)

commits+karl at tug.org commits+karl at tug.org
Wed Nov 13 22:12:06 CET 2024


Revision: 72844
          https://tug.org/svn/texlive?view=revision&revision=72844
Author:   karl
Date:     2024-11-13 22:12:05 +0100 (Wed, 13 Nov 2024)
Log Message:
-----------
nicematrix (13nov24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-code.pdf
    trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf
    trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
    trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
    trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
    trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
    trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty

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

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

Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2024-11-13 21:11:55 UTC (rev 72843)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2024-11-13 21:12:05 UTC (rev 72844)
@@ -730,8 +730,12 @@
 
 \item La spécification d'alignement horizontal donnée par le type de colonne
 (|c|, |r| ou |l|) est prise en compte pour le bloc. Pour un bloc dans une
-colonne de type |p{...}| (sans option à |p|), c'est un alignement |c| qui est
-retenu. Le bloc peut bien sûr avoir sa propre spécification d'alignement
+colonne de type |p{...}|, |b{...}|, |m{...}|, |V{...}| ou |X|, c'est un
+alignement |c| qui est retenu par défaut. Néanmoins, ces types de colonnes
+peuvent avoir une option d'alignement (par ex. |p[l]{...}|), et dans ce cas-là,
+c'est cette option d'alignement qui est transmise au bloc.
+
+Notons enfin que le bloc peut avoir sa propre spécification d'alignement
 horizontal : cf.~\ref{horizontal-bloc} p.~\pageref{horizontal-bloc}.
 
 \item Les spécifications de fontes imposées à une colonne via la construction
@@ -1103,7 +1107,7 @@
 |\\| dans un bloc pour composer du texte sur plusieurs lignes.  
 
 \item Pour pouvoir utiliser |&|, la clé \Definition{ampersand-in-blocks} (alias:
-|&-in-blocks|) doit avoir été activée\footnote{Si ce n'est pas le cas,
+\Definition{\&-in-blocks}) doit avoir été activée\footnote{Si ce n'est pas le cas,
   l'utilisation de |&| dans l'argument principal de la commande |\Block|
   provoquera une erreur : |! Extra alignment tab has been changed to \cr| de
   TeX.}. Le bloc est alors divisé en sous-blocs comme illustré ci-dessous.
@@ -3579,7 +3583,8 @@
 est chargée (mais vous risquez d'avoir des problèmes si vous utilisez
 |\rowcolor| sur la même rangée que |\Hdotsfor|). Néanmoins, dans le cadre de
 \pkg{nicematrix}, on conseille de ne pas utiliser \pkg{colortbl} mais d'utiliser
-les outils de nicematrix pour le coloriage des tableaux.
+les outils de nicematrix pour le coloriage des tableaux (cf.
+p.~\pageref{color-in-code-before}). 
 
 \medskip
 L'extension \pkg{nicematrix} propose aussi une commande
@@ -3907,13 +3912,13 @@
 \label{delimiters-in-preamble}%
 
 \smallskip
-\index{left@\texttt{\textbackslash left} : utilisé par \pkg{nicematrix}\newline pour des
-  délimiteurs\newline dans les préambules}
-\index{right@\texttt{\textbackslash right} : utilisé par \pkg{nicematrix}\newline pour des
-  délimiteurs\newline dans les préambules}
-Les délimiteurs ouvrants doivent être précédés du mot-clé |\left| et les
-délimiteurs fermants du mot-clé |\right|. Les mots-clés |\left| et |\right| n'ont
-pas d'obligation à être utilisés par paires.
+\index{left@\texttt{\textbackslash left} : utilisé par \pkg{nicematrix}\newline
+  pour des délimiteurs\newline dans les préambules}
+\index{right@\texttt{\textbackslash right} : utilisé par
+  \pkg{nicematrix}\newline pour des délimiteurs\newline dans les préambules} Les
+délimiteurs ouvrants doivent être précédés du mot-clé \DefinitionCommande{left}
+et les délimiteurs fermants du mot-clé \DefinitionCommande{right}. Les mots-clés
+|\left| et |\right| n'ont pas d'obligation à être utilisés par paires.
 
 \smallskip
 Tous les délimiteurs extensibles de LaTeX peuvent être utilisés. 
@@ -6494,18 +6499,6 @@
 \end{Code}
 
 \medskip
-Pour pouvoir utiliser \pkg{nicematrix} avec la classe \cls{sn-jnl} (de
-\emph{Springer Nature}), \pkg{pgf} doit être chargé avant le |\documentclass|
-avec |\RequirePackage|:
-
-\begin{Verbatim}
-\RequirePackage{pgf}
-\documentclass{sn-jnl}
-\end{Verbatim}
-Mais il semble que ce ne soit plus nécessaire avec les versions récentes de
-\cls{sn-jnl}. 
-
-\medskip
 L'extension \pkg{nicematrix} n'est pas parfaitement compatible avec les classes
 et extensions de LuaTeX-ja: la détection des coins vides (cf.
 p.~\pageref{corners}) risque d'être erronée dans certaines circonstances.
@@ -7747,6 +7740,8 @@
 \nolinkurl{www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty}
 }
 
+\vspace{2cm}
+
 \tableofcontents
 
 \end{document}

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

Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex	2024-11-13 21:11:55 UTC (rev 72843)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex	2024-11-13 21:12:05 UTC (rev 72844)
@@ -1,4 +1,5 @@
 % -*- coding: utf-8 ; -*- This file should be compiled with LuaLaTeX only
+
 \documentclass[dvipsnames]{article}% dvipsnames is for xcolor (loaded by TikZ,
                                    % loaded by nicematrix) 
 
@@ -699,10 +700,14 @@
 
 \item The specification of the horizontal position provided by the type of
 column (|c|, |r| or |l|) is taken into account for the blocks. For a block in a
-column ot type |p{...}| (without option for |p|) , the alignment |c| will be
-used for the block. Of course, the |\Block| may have its own specification of
-alignment: cf.~\ref{horizontal-block} p.~\pageref{horizontal-block}.
+column ot type |p{...}|, |b{...}|, |m{...}|, |V{...}| ou |X|, the alignment |c|
+will be used by default. However, those types of columns may have an optional
+argument for the horizontal alignment (eg: |p[l]{...}|) and, in that case, that
+type of alignement is passed to the block.
 
+Of course, the |\Block| may also have its own specification of alignment:
+cf.~\ref{horizontal-block} p.~\pageref{horizontal-block}.
+
 \item The specifications of font specified for the column by a construction
 |>{...}| in the preamble of the array are taken into account for the
 mono-column blocks of that column (this behaviour is probably expected).
@@ -1062,16 +1067,17 @@
 \item For |\\|, there is no other restriction. It's possible to use |\\| in a
 block to format a text on several rows.
 
-\item In order to use |&|, the key \Definition{ampersand-in-blocks} (alias: |&-in-blocks|)
-must been activated\footnote{Otherwise, the use of~|&| in the command |\Block|
-  will raise a TeX error :\\ 
-|! Extra alignment tab has been changed to \cr.|}. Then, the block is divided in sub-blocks as illustrated
-below. Be careful: with |ampersand-in-blocks| is in force, the (main) argument
-of the command |\Block| is syntactically divided into sub-blocks by splitting on
-the ampersands~|&|, the ampersands between curly braced are protected but not
-those in an environment.\footnote{It's not possible to write
-  |\Block[ampersand-in-blocks]{}{\begin{array}{cc}1&2\end{array}}|. Of course,
-  it's possible without the key |ampersand-in-blocks|.}
+\item In order to use |&|, the key \Definition{ampersand-in-blocks} (alias:
+\Definition{\&-in-blocks}) must been activated\footnote{Otherwise, the use
+  of~|&| in the command |\Block|
+  will raise a TeX error :\\
+  |! Extra alignment tab has been changed to \cr.|}. Then, the block is divided
+in sub-blocks as illustrated below. Be careful: with |ampersand-in-blocks| is in
+force, the (main) argument of the command |\Block| is syntactically divided into
+sub-blocks by splitting on the ampersands~|&|, the ampersands between curly
+braced are protected but not those in an environment.\footnote{It's not possible
+  to write |\Block[ampersand-in-blocks]{}{\begin{array}{cc}1&2\end{array}}|. Of
+  course, it's possible without the key |ampersand-in-blocks|.}
 \end{itemize}
 
 
@@ -3485,7 +3491,8 @@
 package \pkg{colortbl} is loaded.} is loaded (but you might have problem if
 you use |\rowcolor| on the same row as |\Hdotsfor|). However, when using
 \pkg{nicematrix}, it's recommended to use the coloring tools provided by
-\pkg{nicematrix} instead of \pkg{colortbl}.
+\pkg{nicematrix} instead of \pkg{colortbl} (cf.
+p.~\pageref{color-in-code-before}). 
 
 \bigskip
 The package \pkg{nicematrix} also provides a command
@@ -3807,13 +3814,12 @@
 environment.\footnote{This syntax is inspired by the extension \pkg{blkarray}.}
 
 \smallskip
-\index{left@\texttt{\textbackslash left} : used by \pkg{nicematrix} for\newline 
-  delimiters in the preambles}
-\index{right@\texttt{\textbackslash right} : used by \pkg{nicematrix} for\newline 
-  delimiters in the preambles}
-The opening delimiters should be prefixed by the keyword |\left| and the
-closing delimiters by the keyword |\right|. It's not mandatory to use
-|\left| and |\right| pair-wise.
+\index{left@\texttt{\textbackslash left} : used by \pkg{nicematrix} for\newline
+  delimiters in the preambles} \index{right@\texttt{\textbackslash right} : used
+  by \pkg{nicematrix} for\newline delimiters in the preambles} The opening
+delimiters should be prefixed by the keyword \DefinitionCommand{left} and the
+closing delimiters by the keyword \DefinitionCommand{right}. It's not mandatory
+to use |\left| and |\right| pair-wise.
 
 \smallskip
 All the vertical extensible delimiters of LaTeX are allowed.
@@ -6345,19 +6351,7 @@
 \BeforeBegin{NiceMatrix}{\let\begin\BeginEnvironment}
 \end{Verbatim}
 
-\medskip
-In order to use \pkg{nicematrix} with the class \cls{sn-jnl} (of
-\emph{Springer Nature}), \pkg{pgf} must
-be loaded before the |\documentclass| with |\RequirePackage|:
 
-\begin{Verbatim}
-\RequirePackage{pgf}
-\documentclass{sn-jnl}
-\end{Verbatim}
-
-However, it seems that this is no longer mandatory with the recent versions of
-\cls{sn-jnl}. 
-
 \medskip
 The package \pkg{nicematrix} is not fully compatible with the packages and classes
 of LuaTeX-ja: the detection of the empty corners (cf. p.~\pageref{corners})
@@ -6568,7 +6562,7 @@
 the tabular.}
 
 \medskip
-First, we write a command |\stars| similar the well-known commands 
+First, we write a command |\stars| similar to the well-known commands 
 |\arabic|, |\alph|, |\Alph|, etc. which produces a number of stars equal to
 its argument\footnote{In fact: the value of its argument.}.
 \begin{Code}

Modified: trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx	2024-11-13 21:11:55 UTC (rev 72843)
+++ trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx	2024-11-13 21:12:05 UTC (rev 72844)
@@ -17,8 +17,8 @@
 %
 % \fi
 % \iffalse
-\def\myfileversion{6.29a}
-\def\myfiledate{2024/10/29}
+\def\myfileversion{6.29b}
+\def\myfiledate{2024/11/12}
 %
 %
 %<*batchfile>  
@@ -325,9 +325,6 @@
 \tl_const:Nn \c_@@_r_tl { r }
 \tl_const:Nn \c_@@_all_tl { all }
 \tl_const:Nn \c_@@_dot_tl { . }
-\tl_const:Nn \c_@@_default_tl { default }
-\tl_const:Nn \c_@@_star_tl { * }
-\str_const:Nn \c_@@_star_str { * }
 \str_const:Nn \c_@@_r_str { r }
 \str_const:Nn \c_@@_c_str { c }
 \str_const:Nn \c_@@_l_str { l }
@@ -1746,7 +1743,7 @@
 % point and we have to take into account that point.
 %    \begin{macrocode}
 \seq_new:N \l_@@_notes_labels_seq
-\newcounter{nicematrix_draft}
+\newcounter { nicematrix_draft }
 \cs_new_protected:Npn \@@_notes_format:n #1
   { 
     \setcounter { nicematrix_draft } { #1 }
@@ -2226,8 +2223,8 @@
 % \bigskip
 % The string |\l_@@_baseline_tl| may contain one of the three values |t|,
 % |c| or |b| as in the option of the environment |{array}|. However, it may also
-% contain an integer (which represents the number of the row to which align the
-% array). 
+% contain \textbf{an integer} (which represents the number of the row to which
+% align the array). 
 %    \begin{macrocode}
 \tl_new:N \l_@@_baseline_tl 
 \tl_set:Nn \l_@@_baseline_tl { c }
@@ -3505,7 +3502,8 @@
 % (version for the Tagging Project), \pkg{array} uses |\ar at ialign| instead of
 % |\ialign|. In that case, of course, you do a saving of |\ar at ialign|.
 %    \begin{macrocode}
-\bool_if:NTF \c_@@_tagging_array_bool
+\bool_if:nTF 
+  { \c_@@_tagging_array_bool && ! \c_@@_revtex_bool }
   { \cs_set_eq:NN \@@_old_ar at ialign: \ar at ialign }
   { \cs_set_eq:NN \@@_old_ialign: \ialign }
 %    \end{macrocode}
@@ -3557,18 +3555,10 @@
   }
 %    \end{macrocode}
 %
-% 
 %
 % \bigskip
-% The following must \emph{not} be protected because it begins with |\noalign|. 
 %    \begin{macrocode}
-\cs_new:Npn \@@_everycr: { \noalign { \@@_everycr_i: } }
-%    \end{macrocode}
-%
-%
-% \bigskip
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_everycr_i:
+\cs_new_protected:Npn \@@_everycr:
   { 
     \bool_if:NT \c_@@_testphase_table_bool
       {
@@ -3645,23 +3635,21 @@
   }
 %    \end{macrocode}
 % 
+% 
 % \bigskip
+% The following code has been simplified in the version 6.29a. 
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_redefine_everycr: 
-  { \everycr { \@@_everycr: } } 
 \hook_gput_code:nnn { begindocument } { . }
   {
-    \IfPackageLoadedT { colortbl }
+    \IfPackageLoadedTF { colortbl }
       {
         \cs_set_protected:Npn \@@_redefine_everycr:
-          {
-            \CT at everycr 
-              { 
-                \noalign { \cs_gset_eq:NN \CT at row@color \prg_do_nothing: }
-                \@@_everycr:
-              }
-          }
+          { \CT at everycr { \noalign { \@@_everycr: } } }
       }
+      {
+        \cs_new_protected:Npn \@@_redefine_everycr: 
+          { \everycr { \noalign { \@@_everycr: } } } 
+      }
   }
 %    \end{macrocode}
 % 
@@ -3761,12 +3749,13 @@
 %    \end{macrocode}
 % 
 % \bigskip
-% The environment |{array}| uses internally the command |\ialign|. We change the
-% definition of |\ialign| for several reasons. In particular, |\ialign| sets
-% |\everycr| to |{ }| and we \emph{need} to have to change the value of
-% |\everycr|. 
+% The environment |{array}| (since version 2.6) uses internally the command
+% |\ar at ialign|. We change the definition of |\ialign| for several reasons. In
+% particular, |\ialign| sets |\everycr| to |{ }| and we \emph{need} to have to
+% change the value of |\everycr|. 
 %    \begin{macrocode}
-    \bool_if:NTF \c_@@_tagging_array_bool
+    \bool_if:nTF 
+      { \c_@@_tagging_array_bool && ! \c_@@_revtex_bool }
       {
         \cs_set_nopar:Npn \ar at ialign 
           { 
@@ -3787,7 +3776,10 @@
 %    \end{macrocode}
 % The following part will be deleted when we will delete the boolean
 % |\c_@@_tagging_array_bool| (when we consider the version 2.6a of \pkg{array}
-% is required).
+% is required). Morevover, \cls{revtex4-2} modifies \pkg{array} and provides
+% commands which are meant to be the standard version of \pkg{array} but, at the
+% date of november 2024, these commands corresponds to the \emph{old} version of
+% \pkg{array}, that is to say without the |\ar at ialign|.
 %    \begin{macrocode}
       {
         \cs_set_nopar:Npn \ialign 
@@ -4401,18 +4393,18 @@
 \cs_new_protected:Npn \@@_patch_for_revtex:
   {
     \cs_set_eq:NN \@addamp \@addamp at LaTeX
-    \cs_set_eq:NN \insert at column \insert at column@array
-    \cs_set_eq:NN \@classx \@classx at array
-    \cs_set_eq:NN \@xarraycr \@xarraycr at array
-    \cs_set_eq:NN \@arraycr \@arraycr at array
-    \cs_set_eq:NN \@xargarraycr \@xargarraycr at array
-    \cs_set_eq:NN \array \array at array
     \cs_set_eq:NN \@array \@array at array
     \cs_set_eq:NN \@tabular \@tabular at array
-    \cs_set_eq:NN \@mkpream \@mkpream at array
+    \cs_set:Npn \@tabarray { \@ifnextchar [ { \@array } { \@array [ c ] } }
+    \cs_set_eq:NN \array \array at array
     \cs_set_eq:NN \endarray \endarray at array
-    \cs_set:Npn \@tabarray { \@ifnextchar [ { \@array } { \@array [ c ] } }
     \cs_set:Npn \endtabular { \endarray $\egroup} % $
+    \cs_set_eq:NN \@mkpream \@mkpream at array
+    \cs_set_eq:NN \@classx \@classx at array
+    \cs_set_eq:NN \insert at column \insert at column@array
+    \cs_set_eq:NN \@arraycr \@arraycr at array
+    \cs_set_eq:NN \@xarraycr \@xarraycr at array
+    \cs_set_eq:NN \@xargarraycr \@xargarraycr at array
   }
 %    \end{macrocode}
 %
@@ -4825,7 +4817,7 @@
 % This is the end of the environment |{NiceArrayWithDelims}|.
 %
 % \vspace{1cm}
-% \section{We construct the preamble of the array}
+% \section{Construction of the preamble of the array}
 %
 % \bigskip 
 % The final user provides a preamble, but we must convert that preamble into a
@@ -4869,7 +4861,7 @@
 %    \begin{macrocode}
     \int_zero:N \l_tmpa_int
     \tl_gclear:N \g_@@_array_preamble_tl 
-    \tl_if_eq:NNTF \l_@@_vlines_clist \c_@@_all_tl 
+    \str_if_eq:eeTF \l_@@_vlines_clist { all }
       { 
         \tl_gset:Nn \g_@@_array_preamble_tl 
           { ! { \skip_horizontal:N \arrayrulewidth } }
@@ -5040,7 +5032,7 @@
 % \bigskip
 % For |c|, |l| and |r|
 %    \begin{macrocode}
-\cs_new:Npn \@@_c #1
+\cs_new_protected:Npn \@@_c #1
   { 
     \tl_gput_right:No \g_@@_array_preamble_tl \g_@@_pre_cell_tl 
     \tl_gclear:N \g_@@_pre_cell_tl
@@ -5055,7 +5047,7 @@
   }
 %    \end{macrocode}
 %    \begin{macrocode}
-\cs_new:Npn \@@_l #1
+\cs_new_protected:Npn \@@_l #1
   { 
     \tl_gput_right:No \g_@@_array_preamble_tl \g_@@_pre_cell_tl 
     \tl_gclear:N \g_@@_pre_cell_tl
@@ -5070,7 +5062,7 @@
   }
 %    \end{macrocode}
 %    \begin{macrocode}
-\cs_new:Npn \@@_r #1
+\cs_new_protected:Npn \@@_r #1
   { 
     \tl_gput_right:No \g_@@_array_preamble_tl \g_@@_pre_cell_tl 
     \tl_gclear:N \g_@@_pre_cell_tl
@@ -5088,7 +5080,7 @@
 % \medskip
 % For |!| and |@|
 %    \begin{macrocode}
-\cs_new:cpn { @@ _ \token_to_str:N ! } #1 #2
+\cs_new_protected:cpn { @@ _ \token_to_str:N ! } #1 #2
   {  
     \tl_gput_right:Nn \g_@@_array_preamble_tl { #1 { #2 } }
     \@@_rec_preamble:n
@@ -5100,7 +5092,7 @@
 % \medskip
 % For \verb+|+
 %    \begin{macrocode}
-\cs_new:cpn { @@ _ | } #1
+\cs_new_protected:cpn { @@ _ | } #1
   { 
 %    \end{macrocode}
 % |\l_tmpa_int| is the number of successive occurrences of \verb+|+
@@ -5164,7 +5156,7 @@
 % 
 % \bigskip
 %    \begin{macrocode}
-\cs_new:cpn { @@ _  > } #1 #2
+\cs_new_protected:cpn { @@ _  > } #1 #2
   { 
     \tl_gput_right:Nn \g_@@_pre_cell_tl { > { #2 } } 
     \@@_rec_preamble:n 
@@ -5204,7 +5196,7 @@
 % \medskip
 % For |p| but also |b| and |m|. 
 %    \begin{macrocode}
-\cs_new:Npn \@@_p #1
+\cs_new_protected:Npn \@@_p #1
   { 
     \str_set:Nn \l_@@_vpos_col_str { #1 }
 %    \end{macrocode}
@@ -5274,7 +5266,7 @@
 % itself, you will have, in each cell, the parameter |\l_@@_hpos_cell_tl| which
 % will provide the horizontal alignment of the column to which belongs the cell.
 %    \begin{macrocode}
-            \str_if_eq:nnTF \l_@@_hpos_col_str { j }
+            \str_if_eq:eeTF \l_@@_hpos_col_str { j }
               { \tl_clear:N \exp_not:N \l_@@_hpos_cell_tl } 
               { 
 %    \end{macrocode}
@@ -5302,9 +5294,9 @@
               }
             #3
           }
-          { \str_if_eq:nnT \l_@@_vpos_col_str { m } \@@_center_cell_box: }
-          { \str_if_eq:nnT \l_@@_hpos_col_str { si } \siunitx_cell_begin:w }
-          { \str_if_eq:nnT \l_@@_hpos_col_str { si } \siunitx_cell_end: }
+          { \str_if_eq:eeT \l_@@_vpos_col_str { m } \@@_center_cell_box: }
+          { \str_if_eq:eeT \l_@@_hpos_col_str { si } \siunitx_cell_begin:w }
+          { \str_if_eq:eeT \l_@@_hpos_col_str { si } \siunitx_cell_end: }
           { #2 }
           {         
             \str_case:onF \l_@@_hpos_col_str 
@@ -5508,7 +5500,7 @@
 % \medskip
 % For |V| (similar to the |V| of \pkg{varwidth}).
 %    \begin{macrocode}
-\cs_new:Npn \@@_V #1 #2
+\cs_new_protected:Npn \@@_V #1 #2
   {
     \str_if_eq:nnTF { #1 } { [ } 
       { \@@_make_preamble_V_i:w [ }
@@ -5533,8 +5525,8 @@
 % \medskip
 % For |w| and |W|
 %    \begin{macrocode}
-\cs_new:Npn \@@_w { \@@_make_preamble_w:nnnn { } } 
-\cs_new:Npn \@@_W { \@@_make_preamble_w:nnnn { \@@_special_W: } } 
+\cs_new_protected:Npn \@@_w { \@@_make_preamble_w:nnnn { } } 
+\cs_new_protected:Npn \@@_W { \@@_make_preamble_w:nnnn { \@@_special_W: } } 
 %    \end{macrocode}
 %
 % |#1| is a special argument: empty for |w| and equal to |\@@_special_W:| for |W|;
@@ -5636,9 +5628,9 @@
 % \medskip
 % For |S| (of \pkg{siunitx}). 
 %    \begin{macrocode}
-\cs_new:Npn \@@_S #1 #2
+\cs_new_protected:Npn \@@_S #1 #2
   {
-    \str_if_eq:nnTF { #1 } { [ }
+    \str_if_eq:nnTF { #2 } { [ } 
       { \@@_make_preamble_S:w [ }
       { \@@_make_preamble_S:w [ ] { #2 } }
   }
@@ -5677,7 +5669,7 @@
 % \medskip
 % For |(|, |[| and |\{|.
 %    \begin{macrocode}
-\cs_new:cpn { @@ _ \token_to_str:N ( } #1 #2
+\cs_new_protected:cpn { @@ _ \token_to_str:N ( } #1 #2
   {
     \bool_if:NT \l_@@_small_bool { \@@_fatal:n { Delimiter~with~small } }
 %    \end{macrocode}
@@ -5723,7 +5715,8 @@
 %
 % In fact, if would be possible to define |\left| and |\right| as no-op.
 %    \begin{macrocode}
-\cs_new:cpn { @@ _ \token_to_str:N \left } #1 { \use:c { @@ _ \token_to_str:N ( } }
+\cs_new_protected:cpn { @@ _ \token_to_str:N \left } #1 
+  { \use:c { @@ _ \token_to_str:N ( } }
 %    \end{macrocode}
 % 
 % \bigskip
@@ -5734,7 +5727,7 @@
 % considered as the right delimiter of the environment if the environment is
 % |{NiceArray}|). 
 %    \begin{macrocode}
-\cs_new:cpn { @@ _ \token_to_str:N ) } #1 #2 
+\cs_new_protected:cpn { @@ _ \token_to_str:N ) } #1 #2 
   {
     \bool_if:NT \l_@@_small_bool { \@@_fatal:n { Delimiter~with~small } }
     \tl_if_in:nnTF { ) ] \} } { #2 }
@@ -5794,7 +5787,7 @@
 %
 % \medskip
 %    \begin{macrocode}
-\cs_new:cpn { @@ _ \token_to_str:N \right } #1 
+\cs_new_protected:cpn { @@ _ \token_to_str:N \right } #1 
   { \use:c { @@ _ \token_to_str:N ) } } 
 %    \end{macrocode}
 %
@@ -5813,7 +5806,7 @@
         \str_if_eq:nnTF { #1 } { @ }
           \@@_rec_preamble_after_col_ii:n
           {
-            \str_if_eq:nnTF \l_@@_vlines_clist { all }
+            \str_if_eq:eeTF \l_@@_vlines_clist { all }
               { 
                 \tl_gput_right:Nn \g_@@_array_preamble_tl 
                   { ! { \skip_horizontal:N \arrayrulewidth } }
@@ -5846,7 +5839,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_rec_preamble_after_col_ii:n #1
   {
-    \tl_if_eq:NNTF \l_@@_vlines_clist \c_@@_all_tl
+    \str_if_eq:eeTF \l_@@_vlines_clist { all }
       { 
         \tl_gput_right:Nn \g_@@_array_preamble_tl 
           { @ { #1 \skip_horizontal:N \arrayrulewidth } }
@@ -5865,7 +5858,7 @@
 % 
 % \bigskip
 %    \begin{macrocode}
-\cs_new:cpn { @@ _ * } #1 #2 #3
+\cs_new_protected:cpn { @@ _ * } #1 #2 #3
   { 
     \tl_clear:N \l_tmpa_tl
     \int_step_inline:nn { #2 } { \tl_put_right:Nn \l_tmpa_tl { #3 } } 
@@ -5877,7 +5870,7 @@
 % The token |\NC at find| is at the head of the definition of the columns type done
 % by |\newcolumntype|. We wan't that token to be no-op here.
 %    \begin{macrocode}
-\cs_new:cpn { @@ _ \token_to_str:N \NC at find } #1 { \@@_rec_preamble:n }
+\cs_new_protected:cpn { @@ _ \token_to_str:N \NC at find } #1 { \@@_rec_preamble:n }
 %    \end{macrocode}
 % 
 % \bigskip
@@ -5885,7 +5878,7 @@
 % (between square brackets). That's why we test whether there is a |[| after the
 % letter |X|.
 %    \begin{macrocode}
-\cs_new:Npn \@@_X #1 #2
+\cs_new_protected:Npn \@@_X #1 #2
   {
     \str_if_eq:nnTF { #2 } { [ }
       { \@@_make_preamble_X:w [ }
@@ -6775,9 +6768,9 @@
         \peek_meaning:NTF \end 
           \@@_analyze_end:Nn 
           { 
-            \@@_transform_preamble:
+            \@@_transform_preamble: 
 %    \end{macrocode}
-% Here is the call to |\array| (we have a dedicated macro |\@@_array:| because
+% Here is the call to |\array| (we have a dedicated macro |\@@_array:n| because
 % of compatibility with the classes \cls{revtex4-1} and \cls{revtex4-2}).
 %    \begin{macrocode}
             \@@_array:o \g_@@_array_preamble_tl 
@@ -7221,7 +7214,7 @@
     > 
       { 
 %    \end{macrocode}
-% At the beginning of the cell, we link |\CodeAfter| to a command which do
+% At the beginning of the cell, we link |\CodeAfter| to a command which 
 % begins with |\\| (whereas the standard version of |\CodeAfter| begins does
 % not).
 %    \begin{macrocode}
@@ -7228,10 +7221,6 @@
         \cs_set_eq:NN \CodeAfter \@@_CodeAfter_i:
         \bool_gset_true:N \g_@@_after_col_zero_bool
         \@@_begin_of_row:
-%    \end{macrocode}
-% The contents of the cell is constructed in the box |\l_@@_cell_box| because we
-% have to compute some dimensions of this box.
-%    \begin{macrocode}
         \hbox_set:Nw \l_@@_cell_box 
         \@@_math_toggle:
         \@@_tuning_key_small:
@@ -7309,10 +7298,6 @@
         \bool_gset_true:N \g_@@_last_col_found_bool
         \int_gincr:N \c at jCol
         \int_gset_eq:NN \g_@@_col_total_int \c at jCol
-%    \end{macrocode}
-% The contents of the cell is constructed in the box |\l_tmpa_box| because we
-% have to compute some dimensions of this box.
-%    \begin{macrocode}
         \hbox_set:Nw \l_@@_cell_box 
           \@@_math_toggle:
           \@@_tuning_key_small:
@@ -7504,7 +7489,7 @@
   { 
 %    \end{macrocode}
 % If the dimension |\l_@@_width_dim| is equal to $0$~pt, that means that it has
-% not be set by a previous use of |\NiceMatrixOptions|.
+% not been set by a previous use of |\NiceMatrixOptions|.
 %    \begin{macrocode}
     \dim_compare:nNnT \l_@@_width_dim = \c_zero_dim 
       { \dim_set_eq:NN \l_@@_width_dim \linewidth }
@@ -10868,13 +10853,13 @@
         \tl_if_empty:NTF \l_tmpa_tl 
           { \cs_set_nopar:Npn \l_tmpa_tl { 1 } }  
           {
-            \tl_if_eq:NNT \l_tmpa_tl \c_@@_star_tl 
+            \str_if_eq:eeT \l_tmpa_tl { * }
               { \cs_set_nopar:Npn \l_tmpa_tl { 1 } }  
           }
         \tl_if_empty:NTF \l_tmpb_tl 
           { \tl_set:No \l_tmpb_tl { \int_use:N \c at jCol } }
           { 
-            \tl_if_eq:NNT \l_tmpb_tl \c_@@_star_tl 
+            \str_if_eq:eeT \l_tmpb_tl { * }
               { \tl_set:No \l_tmpb_tl { \int_use:N \c at jCol } }
           }
         \int_compare:nNnT \l_tmpb_tl > \g_@@_col_total_int
@@ -10901,13 +10886,13 @@
             \tl_if_empty:NTF \l_tmpa_tl 
               { \cs_set_nopar:Npn \l_tmpa_tl { 1 } }  
               {
-                \tl_if_eq:NNT \l_tmpa_tl \c_@@_star_tl
+                \str_if_eq:eeT \l_tmpa_tl { * }
                   { \cs_set_nopar:Npn \l_tmpa_tl { 1 } }  
               }
             \tl_if_empty:NTF \l_tmpb_tl
               { \tl_set:No \l_tmpb_tl { \int_use:N \c at iRow } }
               {
-                \tl_if_eq:NNT \l_tmpb_tl \c_@@_star_tl
+                \str_if_eq:eeT \l_tmpb_tl { * }
                   { \tl_set:No \l_tmpb_tl { \int_use:N \c at iRow } }
               }
             \int_compare:nNnT \l_tmpb_tl > \g_@@_row_total_int
@@ -11638,7 +11623,7 @@
           { \int_eval:n { \c at jCol + 1 } } 
       }
       { 
-        \tl_if_eq:NNF \l_@@_vlines_clist \c_@@_all_tl 
+        \str_if_eq:eeF \l_@@_vlines_clist { all }
           { \clist_if_in:NnT \l_@@_vlines_clist { ##1 } }
           { \@@_vline:n { position = ##1 , total-width = \arrayrulewidth } }
       }
@@ -11963,7 +11948,7 @@
           { \int_eval:n { \c at iRow + 1 } } 
       }
       { 
-        \tl_if_eq:NNF \l_@@_hlines_clist \c_@@_all_tl 
+        \str_if_eq:eeF \l_@@_hlines_clist { all }
           { \clist_if_in:NnT \l_@@_hlines_clist { ##1 } }
           { \@@_hline:n { position = ##1 , total-width = \arrayrulewidth } }
       }
@@ -14192,7 +14177,7 @@
         { ( \pgf at x - \l_tmpa_dim ) / \int_use:N \l_@@_split_int }
       \bool_lazy_or:nnT 
         \l_@@_vlines_block_bool 
-        { \tl_if_eq_p:NN \l_@@_vlines_clist \c_@@_all_tl }
+        { \str_if_eq_p:ee \l_@@_vlines_clist { all } }
         {
           \int_step_inline:nn { \l_@@_split_int - 1 } 
             { 
@@ -14491,7 +14476,7 @@
 % If the user has used the key |color| of the command |\Block| without value,
 % the color fixed by |\arrayrulecolor| is used.
 %    \begin{macrocode}
-        \tl_if_eq:NNTF \l_@@_draw_tl \c_@@_default_tl 
+        \tl_if_eq:NnTF \l_@@_draw_tl { default }
           { \CT at arc@ } 
           { \@@_color:o \l_@@_draw_tl }
       }
@@ -15561,7 +15546,7 @@
 % The last argument of |\int_step_inline:nn| or |\clist_map_inline:Nn| is given
 % by curryfication.
 %    \begin{macrocode}
-    \tl_if_eq:NNTF \l_@@_submatrix_vlines_clist \c_@@_all_tl
+    \str_if_eq:eeTF \l_@@_submatrix_vlines_clist { all }
       { \int_step_inline:nn { \l_@@_last_j_tl - \l_@@_first_j_tl } }
       { \clist_map_inline:Nn \l_@@_submatrix_vlines_clist }
       {
@@ -15586,7 +15571,7 @@
 % The last argument of |\int_step_inline:nn| or |\clist_map_inline:Nn| is given
 % by curryfication.
 %    \begin{macrocode}
-    \tl_if_eq:NNTF \l_@@_submatrix_hlines_clist \c_@@_all_tl
+    \str_if_eq:eeTF \l_@@_submatrix_hlines_clist { all }
       { \int_step_inline:nn { \l_@@_last_i_tl - \l_@@_first_i_tl } }
       { \clist_map_inline:Nn \l_@@_submatrix_hlines_clist }
       {

Modified: trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2024-11-13 21:11:55 UTC (rev 72843)
+++ trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2024-11-13 21:12:05 UTC (rev 72844)
@@ -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.29a}
-\def\myfiledate{2024/10/29}
+\def\myfileversion{6.29b}
+\def\myfiledate{2024/11/12}
 \RequirePackage{pgfcore}
 \usepgfmodule{shapes}
 \RequirePackage{l3keys2e}
@@ -114,9 +114,6 @@
 \tl_const:Nn \c__nicematrix_r_tl { r }
 \tl_const:Nn \c__nicematrix_all_tl { all }
 \tl_const:Nn \c__nicematrix_dot_tl { . }
-\tl_const:Nn \c__nicematrix_default_tl { default }
-\tl_const:Nn \c__nicematrix_star_tl { * }
-\str_const:Nn \c__nicematrix_star_str { * }
 \str_const:Nn \c__nicematrix_r_str { r }
 \str_const:Nn \c__nicematrix_c_str { c }
 \str_const:Nn \c__nicematrix_l_str { l }
@@ -509,7 +506,7 @@
 \seq_new:N \g__nicematrix_notes_in_caption_seq
 \tl_new:N \g__nicematrix_tabularnote_tl
 \seq_new:N \l__nicematrix_notes_labels_seq
-\newcounter{nicematrix_draft}
+\newcounter { nicematrix_draft }
 \cs_new_protected:Npn \__nicematrix_notes_format:n #1
   {
     \setcounter { nicematrix_draft } { #1 }
@@ -1429,7 +1426,8 @@
     \@tabarray
     [ \str_if_eq:eeTF \l__nicematrix_baseline_tl c c t ]
   }
-\bool_if:NTF \c__nicematrix_tagging_array_bool
+\bool_if:nTF
+  { \c__nicematrix_tagging_array_bool && ! \c__nicematrix_revtex_bool }
   { \cs_set_eq:NN \__nicematrix_old_ar at ialign: \ar at ialign }
   { \cs_set_eq:NN \__nicematrix_old_ialign: \ialign }
 \cs_new_protected:Npn \__nicematrix_create_row_node:
@@ -1467,8 +1465,7 @@
         \endpgfpicture
       }
   }
-\cs_new:Npn \__nicematrix_everycr: { \noalign { \__nicematrix_everycr_i: } }
-\cs_new_protected:Npn \__nicematrix_everycr_i:
+\cs_new_protected:Npn \__nicematrix_everycr:
   {
     \bool_if:NT \c__nicematrix_testphase_table_bool
       {
@@ -1516,21 +1513,17 @@
           { \__nicematrix_error:n { without~color-inside } }
       }
   }
-\cs_new_protected:Npn \__nicematrix_redefine_everycr:
-  { \everycr { \__nicematrix_everycr: } }
 \hook_gput_code:nnn { begindocument } { . }
   {
-    \IfPackageLoadedT { colortbl }
+    \IfPackageLoadedTF { colortbl }
       {
         \cs_set_protected:Npn \__nicematrix_redefine_everycr:
-          {
-            \CT at everycr
-              {
-                \noalign { \cs_gset_eq:NN \CT at row@color \prg_do_nothing: }
-                \__nicematrix_everycr:
-              }
-          }
+          { \CT at everycr { \noalign { \__nicematrix_everycr: } } }
       }
+      {
+        \cs_new_protected:Npn \__nicematrix_redefine_everycr:
+          { \everycr { \noalign { \__nicematrix_everycr: } } }
+      }
   }
 \hook_gput_code:nnn { begindocument } { . }
   {
@@ -1572,7 +1565,8 @@
               { \__nicematrix_env: - row - \int_use:N \c at iRow - base }
           }
       }
-    \bool_if:NTF \c__nicematrix_tagging_array_bool
+    \bool_if:nTF
+      { \c__nicematrix_tagging_array_bool && ! \c__nicematrix_revtex_bool }
       {
         \cs_set_nopar:Npn \ar at ialign
           {
@@ -1890,18 +1884,18 @@
 \cs_new_protected:Npn \__nicematrix_patch_for_revtex:
   {
     \cs_set_eq:NN \@addamp \@addamp at LaTeX
-    \cs_set_eq:NN \insert at column \insert at column@array
-    \cs_set_eq:NN \@classx \@classx at array
-    \cs_set_eq:NN \@xarraycr \@xarraycr at array
-    \cs_set_eq:NN \@arraycr \@arraycr at array
-    \cs_set_eq:NN \@xargarraycr \@xargarraycr at array
-    \cs_set_eq:NN \array \array at array
     \cs_set_eq:NN \@array \@array at array
     \cs_set_eq:NN \@tabular \@tabular at array
-    \cs_set_eq:NN \@mkpream \@mkpream at array
+    \cs_set:Npn \@tabarray { \@ifnextchar [ { \@array } { \@array [ c ] } }
+    \cs_set_eq:NN \array \array at array
     \cs_set_eq:NN \endarray \endarray at array
-    \cs_set:Npn \@tabarray { \@ifnextchar [ { \@array } { \@array [ c ] } }
     \cs_set:Npn \endtabular { \endarray $\egroup} % $
+    \cs_set_eq:NN \@mkpream \@mkpream at array
+    \cs_set_eq:NN \@classx \@classx at array
+    \cs_set_eq:NN \insert at column \insert at column@array
+    \cs_set_eq:NN \@arraycr \@arraycr at array
+    \cs_set_eq:NN \@xarraycr \@xarraycr at array
+    \cs_set_eq:NN \@xargarraycr \@xargarraycr at array
   }
 \NewDocumentEnvironment { NiceArrayWithDelims }
   { m m O { } m ! O { } t \CodeBefore }
@@ -2122,7 +2116,7 @@
     \tl_gclear_new:N \g__nicematrix_pre_cell_tl
     \int_zero:N \l_tmpa_int
     \tl_gclear:N \g__nicematrix_array_preamble_tl
-    \tl_if_eq:NNTF \l__nicematrix_vlines_clist \c__nicematrix_all_tl
+    \str_if_eq:eeTF \l__nicematrix_vlines_clist { all }
       {
         \tl_gset:Nn \g__nicematrix_array_preamble_tl
           { ! { \skip_horizontal:N \arrayrulewidth } }
@@ -2218,7 +2212,7 @@
           }
       }
   }
-\cs_new:Npn \__nicematrix_c #1
+\cs_new_protected:Npn \__nicematrix_c #1
   {
     \tl_gput_right:No \g__nicematrix_array_preamble_tl \g__nicematrix_pre_cell_tl
     \tl_gclear:N \g__nicematrix_pre_cell_tl
@@ -2227,7 +2221,7 @@
     \int_gincr:N \c at jCol
     \__nicematrix_rec_preamble_after_col:n
   }
-\cs_new:Npn \__nicematrix_l #1
+\cs_new_protected:Npn \__nicematrix_l #1
   {
     \tl_gput_right:No \g__nicematrix_array_preamble_tl \g__nicematrix_pre_cell_tl
     \tl_gclear:N \g__nicematrix_pre_cell_tl
@@ -2240,7 +2234,7 @@
     \int_gincr:N \c at jCol
     \__nicematrix_rec_preamble_after_col:n
   }
-\cs_new:Npn \__nicematrix_r #1
+\cs_new_protected:Npn \__nicematrix_r #1
   {
     \tl_gput_right:No \g__nicematrix_array_preamble_tl \g__nicematrix_pre_cell_tl
     \tl_gclear:N \g__nicematrix_pre_cell_tl
@@ -2253,13 +2247,13 @@
     \int_gincr:N \c at jCol
     \__nicematrix_rec_preamble_after_col:n
   }
-\cs_new:cpn { __nicematrix _ \token_to_str:N ! } #1 #2
+\cs_new_protected:cpn { __nicematrix _ \token_to_str:N ! } #1 #2
   {
     \tl_gput_right:Nn \g__nicematrix_array_preamble_tl { #1 { #2 } }
     \__nicematrix_rec_preamble:n
   }
 \cs_set_eq:cc { __nicematrix _ \token_to_str:N @ } { __nicematrix _ \token_to_str:N ! }
-\cs_new:cpn { __nicematrix _ | } #1
+\cs_new_protected:cpn { __nicematrix _ | } #1
   {
     \int_incr:N \l_tmpa_int
     \__nicematrix_make_preamble_i_i:n
@@ -2299,7 +2293,7 @@
     \str_if_eq:nnT { #1 } { \__nicematrix_stop: } { \bool_gset_true:N \g_tmpb_bool }
     \__nicematrix_rec_preamble:n #1
   }
-\cs_new:cpn { __nicematrix _  > } #1 #2
+\cs_new_protected:cpn { __nicematrix _  > } #1 #2
   {
     \tl_gput_right:Nn \g__nicematrix_pre_cell_tl { > { #2 } }
     \__nicematrix_rec_preamble:n
@@ -2323,7 +2317,7 @@
     b .code:n = \str_set:Nn \l__nicematrix_vpos_col_str { b } ,
     b .value_forbidden:n = true
   }
-\cs_new:Npn \__nicematrix_p #1
+\cs_new_protected:Npn \__nicematrix_p #1
   {
     \str_set:Nn \l__nicematrix_vpos_col_str { #1 }
     \__nicematrix_make_preamble_ii_i:n
@@ -2354,7 +2348,7 @@
           { \str_if_eq:eeTF \l__nicematrix_vpos_col_str { p } { t } { b } }
           { \dim_eval:n { #1 } }
           {
-            \str_if_eq:nnTF \l__nicematrix_hpos_col_str { j }
+            \str_if_eq:eeTF \l__nicematrix_hpos_col_str { j }
               { \tl_clear:N \exp_not:N \l__nicematrix_hpos_cell_tl }
               {
                 \cs_set_nopar:Npn \exp_not:N \l__nicematrix_hpos_cell_tl
@@ -2379,9 +2373,9 @@
               }
             #3
           }
-          { \str_if_eq:nnT \l__nicematrix_vpos_col_str { m } \__nicematrix_center_cell_box: }
-          { \str_if_eq:nnT \l__nicematrix_hpos_col_str { si } \siunitx_cell_begin:w }
-          { \str_if_eq:nnT \l__nicematrix_hpos_col_str { si } \siunitx_cell_end: }
+          { \str_if_eq:eeT \l__nicematrix_vpos_col_str { m } \__nicematrix_center_cell_box: }
+          { \str_if_eq:eeT \l__nicematrix_hpos_col_str { si } \siunitx_cell_begin:w }
+          { \str_if_eq:eeT \l__nicematrix_hpos_col_str { si } \siunitx_cell_end: }
           { #2 }
           {
             \str_case:onF \l__nicematrix_hpos_col_str
@@ -2478,7 +2472,7 @@
           }
       }
   }
-\cs_new:Npn \__nicematrix_V #1 #2
+\cs_new_protected:Npn \__nicematrix_V #1 #2
   {
     \str_if_eq:nnTF { #1 } { [ }
       { \__nicematrix_make_preamble_V_i:w [ }
@@ -2498,8 +2492,8 @@
         \__nicematrix_make_preamble_ii_iv:nnn { #2 } { minipage } { }
       }
   }
-\cs_new:Npn \__nicematrix_w { \__nicematrix_make_preamble_w:nnnn { } }
-\cs_new:Npn \__nicematrix_W { \__nicematrix_make_preamble_w:nnnn { \__nicematrix_special_W: } }
+\cs_new_protected:Npn \__nicematrix_w { \__nicematrix_make_preamble_w:nnnn { } }
+\cs_new_protected:Npn \__nicematrix_W { \__nicematrix_make_preamble_w:nnnn { \__nicematrix_special_W: } }
 \cs_new_protected:Npn \__nicematrix_make_preamble_w:nnnn #1 #2 #3 #4
   {
     \str_if_eq:nnTF { #3 } { s }
@@ -2557,9 +2551,9 @@
     \dim_compare:nNnT { \box_wd:N \l__nicematrix_cell_box } > \l__nicematrix_col_width_dim
       { \__nicematrix_warning:n { W~warning } }
   }
-\cs_new:Npn \__nicematrix_S #1 #2
+\cs_new_protected:Npn \__nicematrix_S #1 #2
   {
-    \str_if_eq:nnTF { #1 } { [ }
+    \str_if_eq:nnTF { #2 } { [ }
       { \__nicematrix_make_preamble_S:w [ }
       { \__nicematrix_make_preamble_S:w [ ] { #2 } }
   }
@@ -2583,7 +2577,7 @@
      \int_gincr:N \c at jCol
      \__nicematrix_rec_preamble_after_col:n
   }
-\cs_new:cpn { __nicematrix _ \token_to_str:N ( } #1 #2
+\cs_new_protected:cpn { __nicematrix _ \token_to_str:N ( } #1 #2
   {
     \bool_if:NT \l__nicematrix_small_bool { \__nicematrix_fatal:n { Delimiter~with~small } }
     \int_if_zero:nTF \c at jCol
@@ -2614,8 +2608,9 @@
       }
       { \__nicematrix_rec_preamble:n #2 }
   }
-\cs_new:cpn { __nicematrix _ \token_to_str:N \left } #1 { \use:c { __nicematrix _ \token_to_str:N ( } }
-\cs_new:cpn { __nicematrix _ \token_to_str:N ) } #1 #2
+\cs_new_protected:cpn { __nicematrix _ \token_to_str:N \left } #1
+  { \use:c { __nicematrix _ \token_to_str:N ( } }
+\cs_new_protected:cpn { __nicematrix _ \token_to_str:N ) } #1 #2
   {
     \bool_if:NT \l__nicematrix_small_bool { \__nicematrix_fatal:n { Delimiter~with~small } }
     \tl_if_in:nnTF { ) ] \} } { #2 }
@@ -2668,7 +2663,7 @@
         \__nicematrix_rec_preamble:n #3
       }
   }
-\cs_new:cpn { __nicematrix _ \token_to_str:N \right } #1
+\cs_new_protected:cpn { __nicematrix _ \token_to_str:N \right } #1
   { \use:c { __nicematrix _ \token_to_str:N ) } }
 \cs_new_protected:Npn \__nicematrix_rec_preamble_after_col:n #1
   {
@@ -2678,7 +2673,7 @@
         \str_if_eq:nnTF { #1 } { @ }
           \__nicematrix_rec_preamble_after_col_ii:n
           {
-            \str_if_eq:nnTF \l__nicematrix_vlines_clist { all }
+            \str_if_eq:eeTF \l__nicematrix_vlines_clist { all }
               {
                 \tl_gput_right:Nn \g__nicematrix_array_preamble_tl
                   { ! { \skip_horizontal:N \arrayrulewidth } }
@@ -2702,7 +2697,7 @@
   }
 \cs_new_protected:Npn \__nicematrix_rec_preamble_after_col_ii:n #1
   {
-    \tl_if_eq:NNTF \l__nicematrix_vlines_clist \c__nicematrix_all_tl
+    \str_if_eq:eeTF \l__nicematrix_vlines_clist { all }
       {
         \tl_gput_right:Nn \g__nicematrix_array_preamble_tl
           { @ { #1 \skip_horizontal:N \arrayrulewidth } }
@@ -2717,14 +2712,14 @@
       }
     \__nicematrix_rec_preamble:n
   }
-\cs_new:cpn { __nicematrix _ * } #1 #2 #3
+\cs_new_protected:cpn { __nicematrix _ * } #1 #2 #3
   {
     \tl_clear:N \l_tmpa_tl
     \int_step_inline:nn { #2 } { \tl_put_right:Nn \l_tmpa_tl { #3 } }
     \exp_last_unbraced:No \__nicematrix_rec_preamble:n \l_tmpa_tl
   }
-\cs_new:cpn { __nicematrix _ \token_to_str:N \NC at find } #1 { \__nicematrix_rec_preamble:n }
-\cs_new:Npn \__nicematrix_X #1 #2
+\cs_new_protected:cpn { __nicematrix _ \token_to_str:N \NC at find } #1 { \__nicematrix_rec_preamble:n }
+\cs_new_protected:Npn \__nicematrix_X #1 #2
   {
     \str_if_eq:nnTF { #2 } { [ }
       { \__nicematrix_make_preamble_X:w [ }
@@ -5735,13 +5730,13 @@
         \tl_if_empty:NTF \l_tmpa_tl
           { \cs_set_nopar:Npn \l_tmpa_tl { 1 } }
           {
-            \tl_if_eq:NNT \l_tmpa_tl \c__nicematrix_star_tl
+            \str_if_eq:eeT \l_tmpa_tl { * }
               { \cs_set_nopar:Npn \l_tmpa_tl { 1 } }
           }
         \tl_if_empty:NTF \l_tmpb_tl
           { \tl_set:No \l_tmpb_tl { \int_use:N \c at jCol } }
           {
-            \tl_if_eq:NNT \l_tmpb_tl \c__nicematrix_star_tl
+            \str_if_eq:eeT \l_tmpb_tl { * }
               { \tl_set:No \l_tmpb_tl { \int_use:N \c at jCol } }
           }
         \int_compare:nNnT \l_tmpb_tl > \g__nicematrix_col_total_int
@@ -5762,13 +5757,13 @@
             \tl_if_empty:NTF \l_tmpa_tl
               { \cs_set_nopar:Npn \l_tmpa_tl { 1 } }
               {
-                \tl_if_eq:NNT \l_tmpa_tl \c__nicematrix_star_tl
+                \str_if_eq:eeT \l_tmpa_tl { * }
                   { \cs_set_nopar:Npn \l_tmpa_tl { 1 } }
               }
             \tl_if_empty:NTF \l_tmpb_tl
               { \tl_set:No \l_tmpb_tl { \int_use:N \c at iRow } }
               {
-                \tl_if_eq:NNT \l_tmpb_tl \c__nicematrix_star_tl
+                \str_if_eq:eeT \l_tmpb_tl { * }
                   { \tl_set:No \l_tmpb_tl { \int_use:N \c at iRow } }
               }
             \int_compare:nNnT \l_tmpb_tl > \g__nicematrix_row_total_int
@@ -6186,7 +6181,7 @@
           { \int_eval:n { \c at jCol + 1 } }
       }
       {
-        \tl_if_eq:NNF \l__nicematrix_vlines_clist \c__nicematrix_all_tl
+        \str_if_eq:eeF \l__nicematrix_vlines_clist { all }
           { \clist_if_in:NnT \l__nicematrix_vlines_clist { ##1 } }
           { \__nicematrix_vline:n { position = ##1 , total-width = \arrayrulewidth } }
       }
@@ -6383,7 +6378,7 @@
           { \int_eval:n { \c at iRow + 1 } }
       }
       {
-        \tl_if_eq:NNF \l__nicematrix_hlines_clist \c__nicematrix_all_tl
+        \str_if_eq:eeF \l__nicematrix_hlines_clist { all }
           { \clist_if_in:NnT \l__nicematrix_hlines_clist { ##1 } }
           { \__nicematrix_hline:n { position = ##1 , total-width = \arrayrulewidth } }
       }
@@ -7700,7 +7695,7 @@
         { ( \pgf at x - \l_tmpa_dim ) / \int_use:N \l__nicematrix_split_int }
       \bool_lazy_or:nnT
         \l__nicematrix_vlines_block_bool
-        { \tl_if_eq_p:NN \l__nicematrix_vlines_clist \c__nicematrix_all_tl }
+        { \str_if_eq_p:ee \l__nicematrix_vlines_clist { all } }
         {
           \int_step_inline:nn { \l__nicematrix_split_int - 1 }
             {
@@ -7933,7 +7928,7 @@
     \pgf at relevantforpicturesizefalse
     \tl_if_empty:NF \l__nicematrix_draw_tl
       {
-        \tl_if_eq:NNTF \l__nicematrix_draw_tl \c__nicematrix_default_tl
+        \tl_if_eq:NnTF \l__nicematrix_draw_tl { default }
           { \CT at arc@ }
           { \__nicematrix_color:o \l__nicematrix_draw_tl }
       }
@@ -8629,7 +8624,7 @@
               }
           }
       }
-    \tl_if_eq:NNTF \l__nicematrix_submatrix_vlines_clist \c__nicematrix_all_tl
+    \str_if_eq:eeTF \l__nicematrix_submatrix_vlines_clist { all }
       { \int_step_inline:nn { \l__nicematrix_last_j_tl - \l__nicematrix_first_j_tl } }
       { \clist_map_inline:Nn \l__nicematrix_submatrix_vlines_clist }
       {
@@ -8646,7 +8641,7 @@
           }
           { \__nicematrix_error:nnn { Wrong~line~in~SubMatrix } { vertical } { ##1 } }
       }
-    \tl_if_eq:NNTF \l__nicematrix_submatrix_hlines_clist \c__nicematrix_all_tl
+    \str_if_eq:eeTF \l__nicematrix_submatrix_hlines_clist { all }
       { \int_step_inline:nn { \l__nicematrix_last_i_tl - \l__nicematrix_first_i_tl } }
       { \clist_map_inline:Nn \l__nicematrix_submatrix_hlines_clist }
       {



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