texlive[62480] branches/branch2021.final/Master/texmf-dist:

commits+karl at tug.org commits+karl at tug.org
Sun Mar 6 23:02:34 CET 2022


Revision: 62480
          http://tug.org/svn/texlive?view=revision&revision=62480
Author:   karl
Date:     2022-03-06 23:02:34 +0100 (Sun, 06 Mar 2022)
Log Message:
-----------
nicematrix (branch)

Modified Paths:
--------------
    branches/branch2021.final/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf
    branches/branch2021.final/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
    branches/branch2021.final/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
    branches/branch2021.final/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx
    branches/branch2021.final/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty

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

Modified: branches/branch2021.final/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
===================================================================
--- branches/branch2021.final/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2022-03-06 22:02:24 UTC (rev 62479)
+++ branches/branch2021.final/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2022-03-06 22:02:34 UTC (rev 62480)
@@ -113,7 +113,7 @@
 
 L'extension \pkg{nicematrix} est entièrement contenue dans le fichier |nicematrix.sty|. Ce fichier peut être placé
 dans le répertoire courant ou dans une arborescence |texmf|. Le mieux reste néanmoins d'installer \pkg{nicematrix}
-avec une distribution TeX comme MiKTeX, TeXlive ou MacTeX.
+avec une distribution TeX comme MiKTeX, TeX~Live ou MacTeX.
 
 \medskip
 \emph{Remarque} : Si vous utilisez un service LaTeX via Internet (ex. :
@@ -137,26 +137,29 @@
 l'instruction habituelle : |\usepackage{nicematrix}|.
 
 \medskip
-Si vous utilisez une distribution TeXLive, sachez que TeXLive 2020 au minimum
+Si vous utilisez une distribution TeX~Live, sachez que TeX~Live 2020 au minimum
 est requis pour faire fonctionner \pkg{nicematrix}.
 
 
 \medskip
-L'idée de \pkg{nicematrix} est de créer des nœuds \textsc{pgf} derrière les cases et les positions des filets des
-tableaux créés par \pkg{array} et de les utiliser pour développer de nouvelles fonctionnalités. Comme toujours avec
-\textsc{pgf}, les coordonnées de ces nœuds sont écrites dans le fichier |aux| pour être utilisées à la
-compilation suivante. C'est pourquoi l'utilisation de \pkg{nicematrix} nécessite \textbf{plusieurs compilations
+L'idée de \pkg{nicematrix} est de créer des nœuds \textsc{pgf} derrière les
+cases et les positions des filets des tableaux créés par \pkg{array} et de les
+utiliser pour développer de nouvelles fonctionnalités. Comme toujours avec
+\textsc{pgf}, les coordonnées de ces nœuds sont écrites dans le fichier |aux|
+pour être utilisées à la compilation suivante. C'est pourquoi l'utilisation de
+\pkg{nicematrix} nécessite \textbf{plusieurs compilations
   successives}.\footnote{Si vous utilisez Overleaf, Overleaf effectue
-  automatiquement le nombre de
-  compilations nécessaire.}
+  automatiquement le nombre de compilations nécessaire.}
 
 \medskip
-La plupart des fonctionnalités de \pkg{nicematrix} sont accessibles sans avoir à utiliser explicitement
-\textsc{pgf} ou Tikz (ce dernier n'est d'ailleurs pas chargé par défaut).
+La plupart des fonctionnalités de \pkg{nicematrix} sont accessibles sans avoir à
+utiliser explicitement \textsc{pgf} ou Tikz (ce dernier n'est d'ailleurs pas
+chargé par défaut).
 
 \medskip
-Une commande|\NiceMatrixOptions| est fournie pour régler les options (la portée des options fixées par cette
-commande est le groupe TeX courant : elles sont semi-globales).
+Une commande|\NiceMatrixOptions| est fournie pour régler les options (la portée
+des options fixées par cette commande est le groupe TeX courant : elles sont
+semi-globales).
 
 
 \newpage
@@ -528,9 +531,6 @@
 par |draw| et le fond dessiné par |fill|) avec un rayon égal à la valeur de
 cette clé (la valeur par défaut est 4~pt\footnote{Cette valeur par défaut est la
   valeur initiale des \emph{rounded corners} de Tikz.}) ;
-\item la clé |borders| permet de ne tracer que certaines des bordures du bloc :
-cette clé prend comme valeur une liste d'éléments parmi les suivants : |left|,
-|right|, |top| et |bottom| ;
 \item les clés |t| et |b| réglent la ligne de base qui sera donnée au bloc quand
 celui-ci est constitué de plusieurs lignes (séparées par la commande |\\|) ;
 \item les clés |hlines|, |vlines| et |hvlines| tracent les filets correspondants
@@ -540,14 +540,21 @@
   chargé préalablement (par défaut, \pkg{nicematrix} ne charge que
   \textsc{pgf}), faute de quoi, une erreur sera levée.} en utilisant comme
 options la valeur de cette clé |tikz| (qui doit donc être une liste de clés Tikz
-applicables à un chemin de Tikz). Pour des exemple d'utilisation de cette clé
+applicables à un chemin de Tikz). Pour des exemples d'utilisation de cette clé
 |tikz|, voir p.~\pageref{tikz-key-examples} ;
-\item \colorbox{yellow!50}{\textbf{Nouveau 6.3}}\enskip la clé |name| donne un
-nom au nœud Tikz rectangulaire correspondant au bloc ; on peut utiliser ce nom
-avec Tikz dans le |\CodeAfter| (cf p.~\pageref{code-after});
+\item la clé |name| donne un nom au nœud Tikz rectangulaire correspondant au
+bloc ; on peut utiliser ce nom avec Tikz dans le |\CodeAfter| (cf.~p.~\pageref{code-after});
 \item \colorbox{yellow!50}{\textbf{Nouveau 6.5}}\enskip la clé
 |respect-arraystretch| évite la remise à $1$ de |\arraystretch| en début de
-bloc (qui a lieu par défaut).
+bloc (qui a lieu par défaut) ;
+\item la clé |borders| permet de ne tracer que certaines des bordures du bloc :
+cette clé prend comme valeur une liste d'éléments parmi les suivants : |left|,
+|right|, |top| et |bottom| ; \newline
+\colorbox{yellow!50}{\textbf{Nouveau 6.7}}\enskip on peut en fait, dans la liste
+qui est la valeur de la clé |borders| mettre une entrée de la forme
+|tikz={|\textsl{liste}|}| où \textsl{liste} est une liste de couples
+\textsl{clé=valeur} de Tikz spécifiant les caractéristiques graphiques des
+traits qui seront dessinés (pour un exemple, voir p.~\pageref{tiretes}).
 \end{itemize}
 
 
@@ -824,14 +831,8 @@
 \newcolumntype{I}{!{\vrule}}
 \end{Verbatim}
 
-En fait, en l'occurrence, il serait peut-être plus habile d'insérer
-|\OnlyMainNiceMatrix| (cf. p.~\pageref{OnlyMainNiceMatrix}) :
-\begin{Verbatim}
-\newcolumntype{I}{!{\OnlyMainNiceMatrix{\vrule}}}
-\end{Verbatim}
 
 
-
 \subsubsection{La commande  \textbackslash cline}
 
 \label{remark-cline}
@@ -935,14 +936,8 @@
 \end{NiceTabular}
 \end{scope}
 
-\medskip
-Si on veut définir de nouveaux spécificateurs de colonnes pour des filets (par
-exemple plus épais ou bien d'une couleur spécifique), on aura peut-être intérêt
-à utiliser la commande |\OnlyMainNiceMatrix| décrite
-p.~\pageref{OnlyMainNiceMatrix}.
 
 
-
 \medskip
 \subsection{Les outils de nicematrix pour tracer des filets}
 
@@ -1082,9 +1077,7 @@
 \medskip
 Quand la clé |corners| est utilisée, \pkg{nicematrix} calcule les coins vides et
 ces coins sont alors pris en compte par les outils de tracés de filets (les
-filets ne seront pas tracés dans ces coins vides). \emph{Remarque} : Dans les
-versions précédentes de \pkg{nicematrix}, il n'y avait qu'une clé
-|hvlines-except-corners| (maintenant considérée comme obsolète).
+filets ne seront pas tracés dans ces coins vides). 
 
 \medskip
 \begin{BVerbatim}[boxwidth=11cm,baseline=c]
@@ -1183,8 +1176,7 @@
 
 Dans les environnements de \pkg{nicematrix}, il est possible d'utiliser la
 commande |\hdottedline| (fournie par \pkg{nicematrix}) qui est l'équivalent pour
-les pointillés des commandes |\hline| et |\hdashline| (cette dernière étant une
-commande de \pkg{arydshln}).
+les pointillés de la commande |\hline|.
 
 \medskip
 \begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
@@ -1225,12 +1217,8 @@
 \medskip
 Il est possible de changer dans \pkg{nicematrix} la lettre utilisée pour
 indiquer dans le préambule un trait vertical en pointillés avec l'option
-|letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|.
-Ainsi libérée, la lettre «|:|» peut être utilisée par ailleurs (par exemple par
-l'extension \pkg{arydshln}\footnote{On remarquera néanmoins que l'extension
-  \pkg{arydshln} n'est pas parfaitement compatible avec l'extension \pkg{nicematrix}.}).
+|letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|. 
 
-
 \medskip
 \emph{Remarque} : Quand l'extension \pkg{array} (sur laquelle s'appuie
 \pkg{nicematrix}) est chargée, les traits verticaux et horizontaux que l'on
@@ -1241,6 +1229,7 @@
 tracées par |\hdottedline| et «|:|» ont ce même effet.
 
 \subsection{Commandes pour filets personnalisés}
+\label{custom-line}
 
 \colorbox{yellow!50}{\textbf{Nouveau 6.5}}\enskip Il est possible de définir des
 commandes et des lettres pour des filets personnalisés avec la clé
@@ -1255,9 +1244,9 @@
 tracer des filets horizontaux (de manière similaire à |\hline|) ; 
 
 \item la clé |letter| prend en argument une lettre\footnote{Les lettres
-  suivantes ne sont pas autorisées : \verb+lcrpmbVX:|()[]!@<>+} qui pourra être utilisée par
-l'utilisateur dans le préambule d'un environnement à préambule (comme
-|{NiceTabular}|) pour spécifier un filet vertical.
+  suivantes ne sont pas autorisées : \verb+lcrpmbVX:|()[]!@<>+} qui pourra être
+utilisée par l'utilisateur dans le préambule d'un environnement à préambule
+(comme |{NiceTabular}|) pour spécifier un filet vertical.
 \end{itemize}
 
 \bigskip
@@ -1282,7 +1271,7 @@
 d'intérêt que dans le cas où la clé |multiplicity| est utilisée).
 \end{itemize}
 
-\bigskip
+\medskip
 \item \emph{Deuxième possibilité}\par\nobreak
 
 On peut utiliser la clé |dotted| qui impose un style de pointillés qui utilise
@@ -1290,7 +1279,7 @@
 \verb|:|) décrit à la partie précédente (cf. p.~\pageref{dotted}). La clé
 |color| est en fait aussi utilisable dans ce cas-là.
 
-\bigskip
+\medskip
 \item \colorbox{yellow!50}{\textbf{Nouveau 6.6}}\enskip \emph{Troisième
   possibilité}
 
@@ -1948,23 +1937,20 @@
 Elle prend aussi en premier argument optionnel, entre crochets, une liste de
 couples \textsl{clé=valeur}.
 \begin{itemize}
-\item \colorbox{yellow!50}{\bfseries Nouveau 6.3}\enskip La clé |nb-rows|
-indique le nombre de rangées consécutives concernées par les spécifications de
-cette commande. 
+\item La clé |nb-rows| indique le nombre de rangées consécutives concernées par
+les spécifications de cette commande.
 \item Les clés |cell-space-top-limit|, |cell-space-bottom-limit|
 et |cell-space-limits| sont disponibles avec le même effet que les clés globales
 de même nom (cf. p.~\pageref{cell-space}).
 
-\item \colorbox{yellow!50}{\bfseries Nouveau 6.3}\enskip La clé |rowcolor| fixe
-la couleur de fond et la clé |color| fixe la couleur du texte.\footnote{La clé
-  |color| utilise la commande |\color| mais insère aussi une instruction
-  |\leavevmode| devant. Cela évite un espace vertical parasite dans les cellules
-  qui correspondent à des colonnes de type |p|, |b|, |m| et |X| (qui débutent en
-  mode vertical).}
+\item La clé |rowcolor| fixe la couleur de fond et la clé |color| fixe la
+couleur du texte.\footnote{La clé |color| utilise la commande |\color| mais
+  insère aussi une instruction |\leavevmode| devant. Cela évite un espace
+  vertical parasite dans les cellules qui correspondent à des colonnes de type
+  |p|, |b|, |m| et |X| (qui débutent en mode vertical).}
 
-\item \colorbox{yellow!50}{\bfseries Nouveau 6.3}\enskip La clé |bold| impose
-des caractères gras aux éléments de la rangée, qu'ils soient en mode texte ou
-bien en mode mathématique.
+\item La clé |bold| impose des caractères gras aux éléments de la rangée, qu'ils
+soient en mode texte ou bien en mode mathématique.
 \end{itemize}
 
 \medskip
@@ -2391,11 +2377,10 @@
 \emph{Remarques}
 \begin{itemize}[beginpenalty=10000]
 \item Comme on peut le voir dans l'exemple précédent, les filets horizontaux et
-verticaux ne s'étendent pas dans les rangées et colonnes extérieures.
+verticaux ne s'étendent pas dans les rangées et colonnes extérieures. Cette
+remarque s'applique aussi aux filets définis par les outils de personnalisation
+de \pkg{nicematrix} (cf. la clé |custom-line| p.~\pageref{custom-line}).
 
-Néanmoins, si on veut définir de nouveaux spécificateurs de colonnes pour des
-filets (par exemple plus épais), on aura sans doute intérêt à utiliser la
-commande |\OnlyMainNiceMatrix| décrite p.~\pageref{OnlyMainNiceMatrix}.
 \item Une spécification de couleur présente dans |code-for-first-row| s'applique
 à une ligne pointillée tracée dans cette «première rangée» (sauf si une valeur a
 été donnée à |xdots/color|). Idem pour les autres.
@@ -2435,7 +2420,7 @@
 |\Iddots|, ce sont des lignes diagonales. On peut changer la couleur d'une ligne
 avec l'option~|color|.\footnote{Il est aussi possible de changer la couleur de
   toutes ces lignes pointillées avec l'option |xdots/color| (\textsl{xdots} pour
-  rappeler que cela s'applique à |\Cdots|, |\Ldots|, |Vdots|, etc.) : cf.
+  rappeler que cela s'applique à |\Cdots|, |\Ldots|, |\Vdots|, etc.) : cf.
   p.~\pageref{customization}). }\par\nobreak
 
 \medskip
@@ -2813,7 +2798,8 @@
 
 Ces options peuvent aussi être fixées avec |\NiceMatrixOptions|, comme options
 de |\CodeAfter|, ou bien au niveau d'un environnement mais elles doivent alors
-être préfixées par |xdots|, ce qui fait que leurs noms deviennent :
+être préfixées par |xdots| (\textsl{xdots} pour rappeler que cela s'applique à
+|\Cdots|, |\Ldots|, |\Vdots|, etc.), ce qui fait que leurs noms deviennent :
 %
 \begin{itemize}
 \item |xdots/color| ;
@@ -2907,9 +2893,9 @@
 
 Les lignes pointillées délimitent des blocs virtuels qui ont le même
 comportement vis à vis des filets que les blocs créés par |\Block| (les filets
-spécifiés par le spécificateur \verb+|+ dans le préambule, la commande |\Hline|
-et par les clés |vlines|, |hlines|, |hvlines| et |hvlines-except-borders| ne
-sont pas tracés dans les blocs).\footnote{En revanche, la commande |\line| dans le |\CodeAfter|
+spécifiés par le spécificateur \verb+|+ dans le préambule, la commande |\Hline|,
+les clés |vlines|, |hlines|, |hvlines| et |hvlines-except-borders| et les outils
+créés par |custom-line| ne sont pas tracés dans les blocs).\footnote{En revanche, la commande |\line| dans le |\CodeAfter|
   (cf.~p.~\pageref{line-in-code-after}) ne crée pas de bloc.}
 
 \medskip
@@ -2941,7 +2927,8 @@
 peut spécifier les instructions du |code-after| à la fin de l'environnement,
 après le mot-clé |\CodeAfter|. Bien que ce soit un mot-clé, |\CodeAfter|
 accepte quand même un argument optionnel (entre crochets). Les clés autorisées
-forment un sous-ensemble des clés acceptées par |\NiceMatrixOptions|.
+dans cet argument optionnel forment un sous-ensemble des clés acceptées par
+|\NiceMatrixOptions|. 
 
 \medskip
 Les utilisateurs expérimentés peuvent, en particulier, utiliser les nœuds
@@ -3271,7 +3258,10 @@
 
 \item |shorten|, qui est la conjonction des clés |left-shorten| et |right-shorten| ;
 
-\item |yshift|, qui déplace verticalement l'accolade (et son label).
+\item |yshift|, qui déplace verticalement l'accolade (et son label) ;
+
+\item \colorbox{yellow!50}{\textbf{Nouveau 6.7}}\enskip |color| qui fixe la
+couleur de l'accolade et du label.
 \end{itemize}
 
 \bigskip
@@ -3579,8 +3569,7 @@
 La spécification |align = left| de ce style demande que le label de la note soit
 composé à gauche dans la boîte qui lui est dévolue. Ce réglage a l'avantage
 d'avoir les notes calées à gauche, ce qui est plaisant si on compose des
-tableaux dans l'esprit de \pkg{booktabs} (voir par exemple la table
-\ref{t:tabularnote}, p.~\pageref{t:tabularnote}).
+tableaux dans l'esprit de \pkg{booktabs} (voir par exemple la table~\ref{t:tabularnote}, p.~\pageref{t:tabularnote}).
 
 \medskip
 La clé |notes/enumitem-keys| fournie par \pkg{nicematrix} permet modifier ce
@@ -3958,8 +3947,16 @@
 \end{NiceArrayWithDelims}$
 
 
+\subsection{La commande \textbackslash OnlyMainNiceMatrix}
 
+La commande |\OnlyMainNiceMatrix| n'exécute son argument que si on se trouve
+dans le tableau principal, c'est-à-dire que l'on n'est pas dans les rangées
+extérieures. Si elle est utilisée hors d'un environnement de \pkg{nicematrix},
+elle est sans effet. 
 
+Pour un exemple d'utilisation, voir \url{tex.stackexchange.com/questions/488566} 
+
+
 \section{Utilisation de Tikz avec nicematrix}
 
 \label{name}\label{PGF-nodes}
@@ -4627,55 +4624,9 @@
 Première remarque : l'extension \pkg{nicematrix} doit être chargée après
 l'extension \pkg{underscore}. Si ce n'est pas le cas, une erreur est levée.
 
-\subsection{Pour définir de nouveaux types de colonnes}
 
-\label{OnlyMainNiceMatrix}
 
-L'extension \pkg{nicematrix} fournit la commande |\OnlyMainNiceMatrix| qui est
-destinée à être utilisée dans des définitions de nouveaux types de colonnes. Son
-argument n'est exécuté que si on se place dans la partie principale du tableau,
-c'est-à-dire que l'on n'est pas dans l'une des éventuelles rangées extérieures.
 
-Par exemple, si on souhaite définir un type de colonne |?| pour tracer un trait fort (noir) d'épaisseur 1~pt, on
-pourra écrire\footnote{La commande |\vrule| est une commande de TeX (et non de LaTeX).} :
-\begin{Verbatim}
-\newcolumntype{?}{!{\OnlyMainNiceMatrix{\vrule width 1 pt}}}
-\end{Verbatim}
-
-Le trait fort correspondant ne s'étendra pas dans les rangées
-extérieures.\footnote{Un tel filet utilisant les techniques classiques de
-  \pkg{array}, il ne traversera pas les doubles filets horizontaux de |\hline\hline|.}
-
-\medskip
-\begin{scope}
-\newcolumntype{?}{!{\OnlyMainNiceMatrix{\vrule width 1 pt}}}
-
-\begin{BVerbatim}[baseline = c, boxwidth = 10.5cm]
-$\begin{pNiceArray}{cc?cc}[first-row,last-row=3]
-C_1 & C_2 & C_3 & C_4 \\
-a & b & c & d \\
-e & f & g & h \\
-C_1 & C_2 & C_3 & C_4
-\end{pNiceArray}$
-\end{BVerbatim}
-$\begin{pNiceArray}{cc?cc}[first-row,last-row=3]
-C_1 & C_2 & C_3 & C_4 \\
-a & b & c & d \\
-e & f & g & h \\
-C_1 & C_2 & C_3 & C_4
-\end{pNiceArray}$
-\end{scope}
-
-\medskip
-Le spécificateur |?| ainsi créé est aussi utilisable dans les environnements
-|{tabular}| et |{array}| (de \pkg{array}) et, dans ce cas, |\OnlyMainNiceMatrix|
-est sans effet.
-
-
-
-
-
-
 \subsection{Lignes diagonales}
 
 \label{parallelization}
@@ -4831,17 +4782,7 @@
 
 \subsection{Incompatibilités}
 
-L'extension \pkg{nicematrix} n'est pas parfaitement compatible avec l'extension \pkg{arydshln} (parce que cette
-extension redéfinit de nombreuses commandes internes de \pkg{array}).
 
-Pour pouvoir utiliser \pkg{arydshln}, il faut, de toutes manières, au préalable,
-libérer la lettre «|:|» en choisissant une autre lettre pour les filets verticaux
-pointillés de \pkg{nicematrix} :
-
-\begin{Verbatim}
-\NiceMatrixOptions{letter-for-dotted-lines=;}
-\end{Verbatim}
-
 \medskip
 L'extension \pkg{nicematrix} n'est pas compatible avec la classe \cls{ieeeaccess}
 (car cette classe n'est pas compatible avec PGF/Tikz).\footnote{Voir
@@ -4866,6 +4807,15 @@
 \documentclass{sn-jnl}
 \end{Verbatim}
 
+\medskip
+L'extension \pkg{nicematrix} n'est pas parfaitement compatible avec l'extension
+\pkg{arydshln} (parce que cette extension redéfinit de nombreuses commandes
+internes de \pkg{array}). De toutes manières, dans le cadre de \pkg{nicematrix},
+il est conseillé de tracer les filets en tiretés avec les commandes de
+\pkg{nicematrix} en créant un style de ligne personnalisée avec |custom-line| :
+cf.~p.~\pageref{custom-line}.
+
+
 \section{Exemples}
 
 \subsection{Utilisation de la clé «tikz» de la commande \textbackslash Block}
@@ -5163,8 +5113,43 @@
 \end{pNiceMatrix}\]
 \end{scope}
 
+\subsection{Lignes en tiretés}
 
+\label{tiretes}
 
+Dans l'exemple suivant, on utilise des commandes |\Block| pour tracer des filets
+en tiretés. Cet exemple nécessite que Tikz soit chargé (par
+|\usepackage{tikz}|). 
+
+\begin{Verbatim}
+\begin{pNiceMatrix}
+~emphase#\Block[borders={bottom,right,tikz=dashed}]{2-2}{}@
+1 & 2 & 0  & 0 & 0 & 0 \\
+4 & 5 & 0  & 0 & 0 & 0 \\
+0 & 0 & ~emphase#\Block[borders={bottom,top,right,left,tikz=dashed}]{2-2}{}@
+        7  & 1 & 0 & 0 \\
+0 & 0 & -1 & 2 & 0 & 0 \\
+0 & 0 & 0  & 0 & ~emphase#\Block[borders={left,top,tikz=dashed}]{2-2}{}@
+                 3 & 4 \\
+0 & 0 & 0  & 0 & 1 & 4 
+\end{pNiceMatrix}
+\end{Verbatim}
+
+
+\[\begin{pNiceMatrix}
+\Block[borders={bottom,right,tikz=dashed}]{2-2}{}
+1 & 2 & 0  & 0 & 0 & 0 \\
+4 & 5 & 0  & 0 & 0 & 0 \\
+0 & 0 & \Block[borders={bottom,top,right,left,tikz=dashed}]{2-2}{}
+        7  & 1 & 0 & 0 \\
+0 & 0 & -1 & 2 & 0 & 0 \\
+0 & 0 & 0  & 0 & \Block[borders={left,top,tikz=dashed}]{2-2}{}
+                 3 & 4 \\
+0 & 0 & 0  & 0 & 1 & 4 
+\end{pNiceMatrix}\]
+
+
+
 \subsection{Empilements de matrices}
 
 On a souvent besoin de présenter des matrices empilées les unes au-dessus des

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

Modified: branches/branch2021.final/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx
===================================================================
--- branches/branch2021.final/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx	2022-03-06 22:02:24 UTC (rev 62479)
+++ branches/branch2021.final/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx	2022-03-06 22:02:34 UTC (rev 62480)
@@ -15,8 +15,8 @@
 %
 % \fi
 % \iffalse
-\def\myfileversion{6.6}
-\def\myfiledate{2022/02/16}
+\def\myfileversion{6.7}
+\def\myfiledate{2022/03/02}
 %
 %
 %<*batchfile>
@@ -158,7 +158,7 @@
 % The package \pkg{nicematrix} is entirely contained in the file
 % |nicematrix.sty|. This file may be put in the current directory or in a
 % |texmf| tree. However, the best is to install \pkg{nicematrix} with a TeX
-% distribution such as MiKTeX, TeXlive or MacTeX.
+% distribution such as MiKTeX, TeX Live or MacTeX.
 %
 % \medskip
 % \emph{Remark}: If you use LaTeX via Internet with, for example, Overleaf, you
@@ -184,7 +184,7 @@
 % |\usepackage{nicematrix}|.
 %
 % \medskip
-% If you use TeXLive as TeX distribution, you should note that TeXLive 2020 at
+% If you use TeX~Live as TeX distribution, you should note that TeX~Live 2020 at
 % least is required by \pkg{nicematrix}.
 %
 % \medskip
@@ -571,9 +571,6 @@
 % by |draw| and the shape drawn by |fill|) with a radius equal to the value of
 % that key (the default value is 4~pt\footnote{This value is the initial value
 % of the \emph{rounded corners} of Tikz.});
-% \item the key |borders| provides the ability to draw only some borders of the
-% blocks; the value of that key is a (comma-separated) list of elements covered
-% by |left|, |right|, |top| and |bottom|;
 % \item the keys |t| and |b| fix the base line that will be given to the block
 % when it has a multi-line content (the lines are separated by |\\|);
 % \item the keys |hlines|, |vlines| and |hvlines| draw all the corresponding
@@ -584,13 +581,20 @@
 % not, an error will be raised.} by using as options the value of that key
 % |tikz| (which must be a list of keys allowed for a Tikz path). For examples,
 % cf. p.~\pageref{tikz-key-examples};
-% \item \colorbox{yellow!50}{\textbf{New 6.3}}\enskip the key |name| provides a
-% name to the rectangular Tikz node corresponding to the block; it's possible to
-% use that name with Tikz in the |\CodeAfter| of the environment
-% (cf.~p.~\pageref{code-after});
+% \item the key |name| provides a name to the rectangular Tikz node
+% corresponding to the block; it's possible to use that name with Tikz in the
+% |\CodeAfter| of the environment (cf.~p.~\pageref{code-after});
 % \item \colorbox{yellow!50}{\textbf{New 6.5}}\enskip the key
 % |respect-arraystretch| prevents the setting of |\arraystretch| to $1$ at the
-% beginning of the block (which is the behaviour by default).
+% beginning of the block (which is the behaviour by default) ;
+% \item the key |borders| provides the ability to draw only some borders of the
+% blocks; the value of that key is a (comma-separated) list of elements covered
+% by |left|, |right|, |top| and |bottom|;\newline
+% \colorbox{yellow!50}{\textbf{Nouveau 6.7}}\enskip it's possible, in fact, in
+% the list which is the value of the key |borders|, to add an entry of the form
+% |tikz={|\textsl{list}|}| where \textsl{list} is a list of couples
+% \textsl{key=value} of Tikz specifying the graphical characteristics of the
+% lines that will be drawn (for an example, see p.~\pageref{dashed}).
 % \end{itemize}
 % 
 % \interitem
@@ -853,12 +857,6 @@
 % \newcolumntype{I}{!{\vrule}}
 % \end{Verbatim}
 %
-% However, in this case, it is probably more clever to add a command
-% |\OnlyMainNiceMatrix| (cf. p.~\pageref{OnlyMainNiceMatrix}):
-% \begin{Verbatim}
-% \newcolumntype{I}{!{\OnlyMainNiceMatrix{\vrule}}}
-% \end{Verbatim}
-%
 % 
 % \bigskip
 % \subsubsection{The command \textbackslash cline}
@@ -959,11 +957,6 @@
 % \end{NiceTabular}
 % \end{scope}
 %
-% \medskip
-% If one wishes to define new specifiers for columns in order to draw vertical
-% rules (for example with a specific color or thicker than the standard rules),
-% he should consider the command |\OnlyMainNiceMatrix| described on
-% page~\pageref{OnlyMainNiceMatrix}.
 %
 %
 % \subsection{The tools of nicematrix for the rules}
@@ -987,7 +980,7 @@
 % \pkg{nicematrix}.} presented
 % p.~\pageref{Block};
 % \item the blocks implicitely delimited by the continuous dotted lines created
-% by |\Cdots|, |Vdots|, etc. (cf.~p.~\pageref{Cdots}).
+% by |\Cdots|, |\Vdots|, etc. (cf.~p.~\pageref{Cdots}).
 % \end{itemize}
 % \item The corners are created by the key |corners| explained below (see p.~\pageref{corners}).
 % \end{itemize}
@@ -1098,9 +1091,7 @@
 % \bigskip
 % When the key |corners| is used, \pkg{nicematrix} computes the (empty) corners
 % and these corners will be taken into account by the tools for drawing the
-% rules (the rules won't be drawn in the corners). \emph{Remark}: In the
-% previous versions of \pkg{nicematrix}, there was only a key
-% |hvlines-except-corners| (now considered as obsolete).
+% rules (the rules won't be drawn in the corners). 
 %
 % \bigskip
 % \begin{BVerbatim}[boxwidth=11cm,baseline=c]
@@ -1196,8 +1187,7 @@
 %
 % In the environments of the package \pkg{nicematrix}, it's possible to use
 % the command |\hdottedline| (provided by \pkg{nicematrix}) which is a
-% counterpart of the classical commands |\hline| and |\hdashline| (the latter is
-% a command of \pkg{arydshln}).
+% counterpart of the classical command |\hline|.
 %
 % \medskip
 % \begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
@@ -1238,10 +1228,7 @@
 % \bigskip
 % It's possible to change in \pkg{nicematrix} the letter used to specify a
 % vertical dotted line with the option |letter-for-dotted-lines| available in
-% |\NiceMatrixOptions|. Thus released, the letter ``|:|'' can be used otherwise
-% (for example by the package \pkg{arydshln}\footnote{However, one should remark
-% that the package \pkg{arydshln} is not fully compatible with
-% \pkg{nicematrix}.}). 
+% |\NiceMatrixOptions|. 
 % 
 % \bigskip
 % \emph{Remark}: In the package \pkg{array} (on which the package
@@ -1253,7 +1240,8 @@
 %
 %
 % \subsection{Commands for customized rules}
-%
+% \label{custom-line}
+% 
 % \colorbox{yellow!50}{\textbf{New 6.5}}\enskip It's possible to define commands
 % and letters for customized rules with the key |custom-line| available in
 % |\NiceMatrixOptions| and in the options of individual environments. That key
@@ -1931,13 +1919,13 @@
 % That command also takes in as optional argument (between square brackets)
 % a list of \textsl{key=value} pairs. 
 % \begin{itemize}
-% \item \colorbox{yellow!50}{\bfseries New 6.3}\enskip The key |nb-rows| sets
+% \item The key |nb-rows| sets
 % the number of rows to which the specifications of the current command will
 % apply. 
 % \item The keys |cell-space-top-limit|, |cell-space-bottom-limit| and
 % |cell-space-limits| are available with the same meaning that the corresponding
 % global keys (cf. p.~\pageref{cell-space}).
-% \item \colorbox{yellow!50}{\bfseries New 6.3}\enskip The key |rowcolor| sets
+% \item The key |rowcolor| sets
 % the color of the background and the key |color| sets the
 % color of the text.\footnote{The key |color| uses the command
 % |\color| but inserts also an instruction |\leavevmode| before. This
@@ -1944,7 +1932,7 @@
 % instruction prevents a extra vertical space in the cells which belong to
 % columns of type |p|, |b|, |m| and |X| (which start in
 % vertical mode).}
-% \item \colorbox{yellow!50}{\bfseries New 6.3}\enskip The key |bold| enforces
+% \item The key |bold| enforces
 % bold characters for the cells of the row, both in math mode and text mode.
 % \end{itemize}
 % 
@@ -2361,12 +2349,9 @@
 % \emph{Remarks}
 % \begin{itemize}[beginpenalty=10000]
 % \item As shown in the previous example, the horizontal and vertical rules
-% don't extend in the exterior rows and columns.
-% 
-% However, if one wishes to define new specifiers for columns in order to draw
-% vertical rules (for example thicker than the standard rules), he should
-% consider the command |\OnlyMainNiceMatrix| described on
-% page~\pageref{OnlyMainNiceMatrix}.
+% don't extend in the exterior rows and columns. This remark also applies to the
+% customized rules created by the key |custom-line|
+% (cf.~p.~\pageref{custom-line}). 
 %
 % \item A specification of color present in |code-for-first-row| also applies to
 % a dotted line drawn in that exterior ``first row'' (excepted if a value has
@@ -2778,7 +2763,8 @@
 %
 % These options may also be fixed with |\NiceMatrixOptions|, as options of
 % |\CodeAfter| or at the level of a given environment but, in those cases, they
-% must be prefixed by |xdots|, and, thus have for names:
+% must be prefixed by |xdots| (\textsl{xdots} to remind that it works for
+% |\Cdots|, |\Ldots|, |\Vdots|, etc.), and, thus have for names:
 % \begin{itemize}
 % \item |xdots/color|;
 % \item |xdots/shorten|;
@@ -2867,8 +2853,9 @@
 % 
 % The dotted lines determine virtual blocks which have the same behaviour
 % regarding the rules (the rules specified by the specifier \verb+|+ in the
-% preamble, by the command |\Hline| and by the keys |hlines|, |vlines|,
-% |hvlines| and |hvlines-except-borders| are not drawn within the
+% preamble, by the command |\Hline|, by the keys |hlines|, |vlines|,
+% |hvlines| and |hvlines-except-borders| and by the tools created by
+% |custom-line| are not drawn within the
 % blocks).\footnote{On the other side, the command |\line| in the
 % |\CodeAfter| (cf.~p.~\pageref{line-in-code-after}) does \emph{not} create
 % block.}
@@ -2903,7 +2890,8 @@
 % possible to give the instructions of the |code-after| at the end of the
 % environment, after the keyword |\CodeAfter|. Although |\CodeAfter| is a
 % keyword, it takes in an optional argument (between square brackets). The keys
-% accepted form a subset of the keys of the command |\WithArrowsOptions|.
+% accepted in that optional ragument form a subset of the keys of the command
+% |\WithArrowsOptions|. 
 %
 %
 % \medskip
@@ -3230,7 +3218,10 @@
 % \item |shorten|, which is the conjunction of the keys |left-shorten| and
 % |right-shorten|;
 %
-% \item |yshift|, which shifts vertically the brace (and its label).
+% \item |yshift|, which shifts vertically the brace (and its label) ;
+%
+% \item \colorbox{yellow!50}{\textbf{New 6.7}}\enskip |color|, which sets the
+% color of the brace (and its label).
 % \end{itemize}
 %
 % \bigskip
@@ -3904,7 +3895,13 @@
 % 7 & 8 & 9 
 % \end{NiceArrayWithDelims}$
 %
+% \subsection{The command \textbackslash OnlyMainNiceMatrix}
 %
+% The command |\OnlyMainNiceMatrix| executes its argument only when it is in the
+% main part of the array, that is to say it is not in one of the exterior rows.
+% If it is used outside an environment of \pkg{nicematrix}, that command is no-op.
+%
+% For an example of utilisation, see \url{tex.stackexchange.com/questions/488566}
 % 
 % \section{Use of Tikz with nicematrix}
 % 
@@ -4024,10 +4021,9 @@
 % \end{pNiceMatrix}\]
 %
 %
-% \colorbox{yellow!50}{\bfseries New 6.3}\enskip The nodes of the last column
-% (excepted the potential «last column» specified by |last-col|) may also be
-% indicated by $i$-|last|. Similarly, the nodes of the last row may be indicated
-% by |last|-$j$.
+% The nodes of the last column (excepted the potential «last column» specified
+% by |last-col|) may also be indicated by $i$-|last|. Similarly, the nodes of
+% the last row may be indicated by |last|-$j$.
 % 
 % \subsubsection{The columns V of varwidth}
 %
@@ -4560,53 +4556,8 @@
 %
 % \section{Technical remarks}
 % 
-% \subsection{Definition of new column types}
-%
-% \label{OnlyMainNiceMatrix}
 % 
-% The package \pkg{nicematrix} provides the command |\OnlyMainNiceMatrix|
-% which is meant to be used in definitions of new column types. Its argument is
-% evaluated if and only if we are in the main part of the array, that is to say
-% not in a potential exterior row.
-%
-% For example, one may wish to define a new column type |?| in order to draw a
-% (black) heavy rule of width 1~pt. The following definition will do the
-% job\footnote{The command |\vrule| is a TeX (and not LaTeX) command.}:
-%
-% \begin{Verbatim}
-% \newcolumntype{?}{!{\OnlyMainNiceMatrix{\vrule width 1 pt}}}
-% \end{Verbatim}
-%
-% The heavy vertical rule won't extend in the exterior rows.\footnote{Of course,
-% such rule is defined by the classical technics of \pkg{nicematrix} and, for
-% this reason, won't cross the double rules of |\hline\hline|.}
-% \medskip
-% \begin{scope}
-% \newcolumntype{?}{!{\OnlyMainNiceMatrix{\vrule width 1 pt}}}
-%
-% \begin{BVerbatim}[baseline = c, boxwidth = 10.5cm]
-% $\begin{pNiceArray}{cc?cc}[first-row,last-row=3]
-% C_1 & C_2 & C_3 & C_4 \\
-% a & b & c & d \\
-% e & f & g & h \\
-% C_1 & C_2 & C_3 & C_4
-% \end{pNiceArray}$
-% \end{BVerbatim}
-% $\begin{pNiceArray}{cc?cc}[first-row,last-row=3]
-% C_1 & C_2 & C_3 & C_4 \\
-% a & b & c & d \\
-% e & f & g & h \\
-% C_1 & C_2 & C_3 & C_4
-% \end{pNiceArray}$
-% \end{scope}
-%
-% \medskip
-% This specifier |?| may be used in the standard environments |{tabular}| and
-% |{array}| (of the package \pkg{array}) and, in this case, the command
-% |\OnlyMainNiceMatrix| is no-op.
-%
 % 
-% 
 % \subsection{Diagonal lines} 
 %
 % \label{parallelization}
@@ -4753,20 +4704,10 @@
 %
 %
 %
+%
 % \subsection{Incompatibilities}
 %
-% The package \pkg{nicematrix} is not fully compatible with the package
-% \pkg{arydshln} (because this package redefines many internal of \pkg{array}).
 %
-% Anyway, in order to use \pkg{arydshln}, one must first free the letter ``|:|''
-% by giving a new letter for the vertical dotted rules of \pkg{nicematrix}:
-%
-% \begin{Verbatim}
-% \NiceMatrixOptions{letter-for-dotted-lines=;}
-% \end{Verbatim}
-%
-%
-% \bigskip
 % The package \pkg{nicematrix} is not compatible with the class \cls{ieeeaccess}
 % (because that class is not compatible with PGF/Tikz).\footnote{See
 %  \url{https://tex.stackexchange.com/questions/528975/error-loading-tikz-in-ieeeaccess-class}} 
@@ -4790,6 +4731,13 @@
 % \documentclass{sn-jnl}
 % \end{Verbatim}
 %
+% \bigskip
+% The package \pkg{nicematrix} is not fully compatible with the package
+% \pkg{arydshln} (because this package redefines many internal of \pkg{array}).
+% By any means, in the context of \pkg{nicematrix}, it's recommended to draw
+% dashed rules with the tools provided by \pkg{nicematrix}, by creating a
+% customized line style with |custom-line|: cf.~p.~\pageref{custom-line}.
+%
 % 
 % \section{Examples}
 %
@@ -5085,7 +5033,41 @@
 % \end{pNiceMatrix}\]
 % \end{scope}
 %
+% \subsection{Dashed rules}
+% \label{dashed}
 %
+% In the following example, we use the command |\Block| to draw dashed rules.
+% For that example, Tikz should be loaded (by |\usepackage{tikz}|).
+%
+%
+% \begin{Verbatim}
+% \begin{pNiceMatrix}
+% ~emphase#\Block[borders={bottom,right,tikz=dashed}]{2-2}{}@
+% 1 & 2 & 0  & 0 & 0 & 0 \\
+% 4 & 5 & 0  & 0 & 0 & 0 \\
+% 0 & 0 & ~emphase#\Block[borders={bottom,top,right,left,tikz=dashed}]{2-2}{}@
+%         7  & 1 & 0 & 0 \\
+% 0 & 0 & -1 & 2 & 0 & 0 \\
+% 0 & 0 & 0  & 0 & ~emphase#\Block[borders={left,top,tikz=dashed}]{2-2}{}@
+%                  3 & 4 \\
+% 0 & 0 & 0  & 0 & 1 & 4 
+% \end{pNiceMatrix}
+% \end{Verbatim}
+%
+%
+% \[\begin{pNiceMatrix}
+% \Block[borders={bottom,right,tikz=dashed}]{2-2}{}
+% 1 & 2 & 0  & 0 & 0 & 0 \\
+% 4 & 5 & 0  & 0 & 0 & 0 \\
+% 0 & 0 & \Block[borders={bottom,top,right,left,tikz=dashed}]{2-2}{}
+%         7  & 1 & 0 & 0 \\
+% 0 & 0 & -1 & 2 & 0 & 0 \\
+% 0 & 0 & 0  & 0 & \Block[borders={left,top,tikz=dashed}]{2-2}{}
+%                  3 & 4 \\
+% 0 & 0 & 0  & 0 & 1 & 4 
+% \end{pNiceMatrix}\]
+%
+%
 % \subsection{Stacks of matrices}
 %
 % We often need to compose mathematical matrices on top on each other (for
@@ -5725,16 +5707,8 @@
 % \bigskip
 % \subsection*{Technical  definitions}
 %
-% 
 % \medskip
 %    \begin{macrocode}
-\bool_new:N \c_@@_in_preamble_bool
-\bool_set_true:N \c_@@_in_preamble_bool
-\hook_gput_code:nnn { begindocument } { . } 
-  { \bool_set_false:N \c_@@_in_preamble_bool }
-%    \end{macrocode}
-%
-%    \begin{macrocode}
 \bool_new:N \c_@@_arydshln_loaded_bool
 \bool_new:N \c_@@_booktabs_loaded_bool
 \bool_new:N \c_@@_enumitem_loaded_bool
@@ -5947,7 +5921,7 @@
 \cs_set:Npn \@@_standard_cline:w #1-#2 \q_stop
   {
     \int_compare:nNnT \l_@@_first_col_int = 0 { \omit & }
-    \int_compare:nNnT { #1 } > 1 { \multispan { \@@_pred:n { #1 } } & }
+    \int_compare:nNnT { #1 } > 1 { \multispan { \int_eval:n { #1 - 1 } } & }
     \multispan { \int_eval:n { #2 - #1 + 1 } } 
     { 
       \CT at arc@ 
@@ -6016,19 +5990,12 @@
 % several |\cline|).
 %    \begin{macrocode}
     \peek_meaning_remove_ignore_spaces:NTF \cline
-      { & \@@_cline_i:en { \@@_succ:n { #3 } } }
+      { & \@@_cline_i:en { \int_eval:n { #3 + 1 } } }
       { \everycr { } \cr }
   }
 \cs_generate_variant:Nn \@@_cline_i:nn { e n }
 %    \end{macrocode}
 % 
-% \bigskip
-% The following commands are only for efficiency. They must \emph{not} be protected
-% because it will be used (for instance) in names of \textsc{pgf} nodes.
-%    \begin{macrocode}
-\cs_new:Npn \@@_succ:n #1 { \the \numexpr #1 + 1 \relax }
-\cs_new:Npn \@@_pred:n #1 { \the \numexpr #1 - 1 \relax }
-%    \end{macrocode}
 %
 % \bigskip
 % The following command is a small shortcut.
@@ -7358,7 +7325,13 @@
     line-style .value_required:n = true ,
     color .tl_set:N = \l_@@_xdots_color_tl ,
     color .value_required:n = true ,
-    shorten .dim_set:N = \l_@@_xdots_shorten_dim ,
+    shorten .code:n = 
+      \hook_gput_code:nnn { begindocument } { . } 
+        { \dim_set:Nn \l_@@_xdots_shorten_dim { #1 } } ,
+%    \end{macrocode}
+% We use a hook only by security in case \cls{revtex4-1}
+% is used (even though it is obsolete).
+%    \begin{macrocode}
     shorten .value_required:n = true ,
 %    \end{macrocode}
 % The options |down| and |up| are not documented for the final user because he
@@ -7495,6 +7468,11 @@
 %    \begin{macrocode}
     hvlines-except-corners .code:n = 
       { 
+        \@@_error:n { hvlines-except-corners } 
+        \group_begin:
+        \globaldefs = 1
+        \@@_msg_redirect_name:nn { hvlines-except-corners } { none }
+        \group_end:
         \clist_set:Nn \l_@@_corners_clist { #1 }
         \clist_set:Nn \l_@@_vlines_clist { all }
         \clist_set:Nn \l_@@_hlines_clist { all }
@@ -7570,34 +7548,20 @@
     label-in-list .value_required:n = true ,
     enumitem-keys .code:n = 
       { 
-        \bool_if:NTF \c_@@_in_preamble_bool
+        \hook_gput_code:nnn { begindocument } { . } 
           { 
-            \hook_gput_code:nnn { begindocument } { . } 
-              { 
-                \bool_if:NT \c_@@_enumitem_loaded_bool
-                  { \setlist* [ tabularnotes ] { #1 } }
-              } 
-          }
-          { 
-             \bool_if:NT \c_@@_enumitem_loaded_bool
-               { \setlist* [ tabularnotes ] { #1 } }
+            \bool_if:NT \c_@@_enumitem_loaded_bool
+              { \setlist* [ tabularnotes ] { #1 } }
           } 
       } ,
     enumitem-keys .value_required:n = true ,
     enumitem-keys-para .code:n = 
       { 
-        \bool_if:NTF \c_@@_in_preamble_bool
+        \hook_gput_code:nnn { begindocument } { . } 
           { 
-            \hook_gput_code:nnn { begindocument } { . } 
-              { 
-                \bool_if:NT \c_@@_enumitem_loaded_bool
-                  { \setlist* [ tabularnotes* ] { #1 } }
-              } 
-          }
-          { 
             \bool_if:NT \c_@@_enumitem_loaded_bool
               { \setlist* [ tabularnotes* ] { #1 } }
-          }
+          } 
       } ,
     enumitem-keys-para .value_required:n = true ,
     unknown .code:n  = \@@_error:n { Unknown~key~for~notes } 
@@ -7736,7 +7700,7 @@
     notes .code:n = \keys_set:nn { NiceMatrix / notes } { #1 } ,
     notes .value_required:n = true ,
     sub-matrix .code:n = 
-     \keys_set:nn { NiceMatrix / sub-matrix } { #1 } ,
+      \keys_set:nn { NiceMatrix / sub-matrix } { #1 } ,
     sub-matrix .value_required:n = true ,
     unknown .code:n  = \@@_error:n { Unknown~key~for~NiceMatrixOptions } 
   }
@@ -8170,12 +8134,12 @@
               }
             \box_use:N \l_@@_cell_box 
             \box_move_down:nn { \box_dp:N \l_@@_cell_box }
-              \hbox_overlap_left:n 
-                { 
-                  \pgfsys at markposition 
-                    { \@@_env: - \int_use:N \c at iRow - \int_use:N \c at jCol - SE } 
-                  #1 
-                }
+            \hbox_overlap_left:n 
+              { 
+                \pgfsys at markposition 
+                  { \@@_env: - \int_use:N \c at iRow - \int_use:N \c at jCol - SE } 
+                #1 
+              }
           }
       }
   } 
@@ -8294,19 +8258,20 @@
             \vtop
               {
                 \skip_vertical:N 0.5\arrayrulewidth 
-                \pgfsys at markposition { \@@_env: - row - \@@_succ:n \c at iRow } 
+                \pgfsys at markposition 
+                  { \@@_env: - row - \int_eval:n { \c at iRow + 1 } } 
                 \skip_vertical:N -0.5\arrayrulewidth 
               }
           }  
         \pgfpicture 
         \pgfrememberpicturepositiononpagetrue
-        \pgfcoordinate { \@@_env: - row - \@@_succ:n \c at iRow }  
+        \pgfcoordinate { \@@_env: - row - \int_eval:n { \c at iRow + 1 } }  
           { \pgfpoint \c_zero_dim { - 0.5 \arrayrulewidth } } 
         \str_if_empty:NF \l_@@_name_str
           {
             \pgfnodealias 
-              { \l_@@_name_str - row - \@@_succ:n \c at iRow } 
-              { \@@_env: - row - \@@_succ:n \c at iRow } 
+              { \l_@@_name_str - row - \int_eval:n { \c at iRow + 1 } } 
+              { \@@_env: - row - \int_eval:n { \c at iRow + 1 } } 
           }   
         \endpgfpicture  
       }  
@@ -8341,7 +8306,7 @@
                 \exp_args:NNx
                   \clist_if_in:NnT 
                   \l_@@_hlines_clist 
-                  { \@@_succ:n \c at iRow }
+                  { \int_eval:n { \c at iRow + 1 } }
               } 
               {
 %    \end{macrocode}
@@ -9041,9 +9006,9 @@
         \dim_set_eq:NN \l_tmpa_dim \pgf at x 
         \@@_qpoint:n { #1 }
         \dim_set_eq:NN \l_tmpb_dim \pgf at y
-        \@@_qpoint:n { col - \@@_succ:n { #4 } }
+        \@@_qpoint:n { col - \int_eval:n { #4 + 1 } }
         \dim_set_eq:NN \l_@@_tmpc_dim \pgf at x
-        \@@_qpoint:n { \@@_succ:n { #3 } }
+        \@@_qpoint:n { \int_eval:n { #3 + 1 } }
         \dim_set_eq:NN \l_@@_tmpd_dim \pgf at y
         \@@_pgf_rect_node:nnnnn
           { \@@_env: - #5 }
@@ -9834,7 +9799,7 @@
           { 
             \@@_vline:n
               { 
-                position = \@@_succ:n \c at jCol ,
+                position = \int_eval:n { \c at jCol + 1 } ,
                 multiplicity = \int_use:N \l_tmpa_int ,
               } 
 %    \end{macrocode}
@@ -10239,7 +10204,7 @@
 \cs_new_protected:Npn \@@_patch_preamble_viii_i:nn #1 #2
   {
     \tl_gput_right:Nx \g_@@_internal_code_after_tl
-      { \@@_delimiter:nnn #1 { \@@_succ:n \c at jCol } \c_true_bool }  
+      { \@@_delimiter:nnn #1 { \int_eval:n { \c at jCol + 1 } } \c_true_bool }  
     \tl_if_in:nnTF { ( [ \{ ) ] \} } { #2 }
       {
         \@@_error:nn { delimiter~after~opening } { #2 } 
@@ -10454,7 +10419,7 @@
           } 
           { 
             \exp_args:NNx 
-            \clist_if_in:NnT \l_@@_vlines_clist { \@@_succ:n \c at jCol } 
+            \clist_if_in:NnT \l_@@_vlines_clist { \int_eval:n { \c at jCol + 1 } }  
               { 
                 \tl_gput_right:Nn \g_@@_preamble_tl 
                   { ! { \skip_horizontal:N \arrayrulewidth } }
@@ -10526,7 +10491,7 @@
     \int_compare:nNnT { #1 } > 1
       {
         \seq_gput_left:Nx \g_@@_multicolumn_cells_seq
-          { \int_use:N \c at iRow - \@@_succ:n \c at jCol }
+          { \int_use:N \c at iRow - \int_eval:n { \c at jCol + 1 } }
         \seq_gput_left:Nn \g_@@_multicolumn_sizes_seq { #1 } 
         \seq_gput_right:Nx \g_@@_pos_of_blocks_seq
           { 
@@ -10707,7 +10672,7 @@
           } 
           { 
             \exp_args:NNx 
-            \clist_if_in:NnT \l_@@_vlines_clist { \@@_succ:n \c at jCol } 
+            \clist_if_in:NnT \l_@@_vlines_clist { \int_eval:n { \c at jCol + 1 } } 
               { 
                 \tl_gput_right:Nn \g_@@_preamble_tl 
                   { ! { \skip_horizontal:N \arrayrulewidth } }
@@ -10756,7 +10721,7 @@
     \pgfpicture
       \@@_qpoint:n { row - 1 } 
       \dim_gset_eq:NN \g_tmpa_dim \pgf at y
-      \@@_qpoint:n { row - \@@_succ:n \c at iRow }
+      \@@_qpoint:n { row - \int_eval:n { \c at iRow + 1 } }
       \dim_gadd:Nn \g_tmpa_dim \pgf at y
       \dim_gset:Nn \g_tmpa_dim { 0.5 \g_tmpa_dim }
 %    \end{macrocode}
@@ -11317,7 +11282,8 @@
             \hbox
               {
                 \skip_horizontal:N -0.5\arrayrulewidth
-                \pgfsys at markposition { \@@_env: - col - \@@_succ:n \g_tmpa_int } 
+                \pgfsys at markposition 
+                  { \@@_env: - col - \int_eval:n { \g_tmpa_int + 1 } } 
                 \skip_horizontal:N 0.5\arrayrulewidth 
               }
           }   
@@ -11326,13 +11292,13 @@
 %    \begin{macrocode}
         \pgfpicture
           \pgfrememberpicturepositiononpagetrue
-          \pgfcoordinate { \@@_env: - col - \@@_succ:n \g_tmpa_int } 
+          \pgfcoordinate { \@@_env: - col - \int_eval:n { \g_tmpa_int + 1 } } 
             { \pgfpoint { - 0.5 \arrayrulewidth } \c_zero_dim } 
           \str_if_empty:NF \l_@@_name_str
             {
               \pgfnodealias 
-                { \l_@@_name_str - col - \@@_succ:n \g_tmpa_int }
-                { \@@_env: - col - \@@_succ:n \g_tmpa_int } 
+                { \l_@@_name_str - col - \int_eval:n { \g_tmpa_int + 1 } }
+                { \@@_env: - col - \int_eval:n { \g_tmpa_int + 1 } } 
             }   
         \endpgfpicture  
       }
@@ -11372,7 +11338,9 @@
 %    \begin{macrocode}
                 \bool_lazy_and:nnT \l_@@_Matrix_bool \l_@@_NiceArray_bool
                   { \skip_horizontal:N -\arraycolsep }
-                \pgfsys at markposition { \@@_env: - col - \@@_succ:n \g_tmpa_int } 
+                \pgfsys at markposition 
+                  { \@@_env: - col - \int_eval:n {
+                    \g_tmpa_int + 1 } } 
                 \skip_horizontal:N 0.5\arrayrulewidth 
                 \bool_lazy_and:nnT \l_@@_Matrix_bool \l_@@_NiceArray_bool
                   { \skip_horizontal:N \arraycolsep }
@@ -11380,7 +11348,7 @@
           }   
         \pgfpicture
           \pgfrememberpicturepositiononpagetrue
-          \pgfcoordinate { \@@_env: - col - \@@_succ:n \g_tmpa_int } 
+          \pgfcoordinate { \@@_env: - col - \int_eval:n { \g_tmpa_int + 1 } } 
             { 
               \bool_lazy_and:nnTF \l_@@_Matrix_bool \l_@@_NiceArray_bool
                 { 
@@ -11393,8 +11361,8 @@
           \str_if_empty:NF \l_@@_name_str
             {
               \pgfnodealias 
-                { \l_@@_name_str - col - \@@_succ:n \g_tmpa_int }
-                { \@@_env: - col - \@@_succ:n \g_tmpa_int } 
+                { \l_@@_name_str - col - \int_eval:n { \g_tmpa_int + 1 } }
+                { \@@_env: - col - \int_eval:n { \g_tmpa_int + 1 } } 
             }   
         \endpgfpicture  
 %    \end{macrocode}
@@ -11409,17 +11377,21 @@
             \bool_if:NT \l_@@_code_before_bool
               { 
                 \pgfsys at markposition 
-                  { \@@_env: - col - \@@_succ:n \g_@@_col_total_int }
+                  { \@@_env: - col - \int_eval:n { \g_@@_col_total_int + 1 } }
               } 
             \pgfpicture 
             \pgfrememberpicturepositiononpagetrue
-            \pgfcoordinate { \@@_env: - col - \@@_succ:n \g_@@_col_total_int } 
+            \pgfcoordinate 
+              { \@@_env: - col - \int_eval:n { \g_@@_col_total_int + 1 } }  
               \pgfpointorigin 
             \str_if_empty:NF \l_@@_name_str
               { 
-                \pgfnodealias 
-                  { \l_@@_name_str - col - \@@_succ:n \g_@@_col_total_int } 
-                  { \@@_env: - col - \@@_succ:n \g_@@_col_total_int } 
+                \pgfnodealias  
+                  { 
+                     \l_@@_name_str - col 
+                     - \int_eval:n { \g_@@_col_total_int + 1 } 
+                  }  
+                  { \@@_env: - col - \int_eval:n { \g_@@_col_total_int + 1 } } 
               }  
             \endpgfpicture
           }
@@ -11645,7 +11617,7 @@
           { 
             \int_compare:nNnTF \l_@@_last_col_int < 0
               \c at MaxMatrixCols
-              { \@@_pred:n \l_@@_last_col_int }
+              { \int_eval:n { \l_@@_last_col_int - 1 } }
           } 
           { > \@@_cell_begin:w #2 < \@@_cell_end: }
       } 
@@ -12575,7 +12547,7 @@
 %    \begin{macrocode}
     \dim_compare:nNnT \l_@@_x_final_dim = { - \c_max_dim }
       {
-        \@@_qpoint:n { col - \@@_succ:n \l_@@_final_j_int }
+        \@@_qpoint:n { col - \int_eval:n { \l_@@_final_j_int + 1 } }
         \dim_set_eq:NN \l_@@_x_final_dim \pgf at x 
         \dim_sub:Nn \l_@@_x_final_dim \col at sep
       }
@@ -12722,7 +12694,7 @@
       {
         \@@_qpoint:n { row - \int_use:N \l_@@_initial_i_int }
         \dim_set_eq:NN \l_tmpa_dim \pgf at y
-        \@@_qpoint:n { row - \@@_succ:n \l_@@_initial_i_int }
+        \@@_qpoint:n { row - \int_eval:n { \l_@@_initial_i_int + 1 } }
         \dim_set:Nn \l_@@_y_initial_dim { ( \l_tmpa_dim + \pgf at y ) / 2 } 
         \dim_set_eq:NN \l_@@_y_final_dim \l_@@_y_initial_dim
       }     
@@ -12855,7 +12827,7 @@
           {
             \@@_qpoint:n { col - \int_use:N \l_@@_initial_j_int }
             \dim_set_eq:NN \l_tmpa_dim \pgf at x
-            \@@_qpoint:n { col - \@@_succ:n \l_@@_initial_j_int }
+            \@@_qpoint:n { col - \int_eval:n { \l_@@_initial_j_int + 1 } }
             \dim_set:Nn \l_@@_x_initial_dim { ( \pgf at x + \l_tmpa_dim ) / 2 } 
             \dim_set_eq:NN \l_@@_x_final_dim \l_@@_x_initial_dim
 %    \end{macrocode}
@@ -14380,7 +14352,7 @@
   {
     \bool_lazy_or:nnTF 
       { \int_compare_p:nNn { #4 } = \c_zero_int }
-      { \int_compare_p:nNn { #2 } = { \@@_succ:n { \c at jCol } } }
+      { \int_compare_p:nNn { #2 } = { \int_eval:n { \c at jCol + 1 } } }
       \prg_return_false:
       \prg_return_true:
   }
@@ -14456,7 +14428,7 @@
         \int_compare:nNnTF \l_@@_first_col_int = \l_tmpa_tl
           { \dim_set:Nn \l_@@_tmpc_dim { \pgf at x - 0.5 \arrayrulewidth } }
           { \dim_set:Nn \l_@@_tmpc_dim { \pgf at x + 0.5 \arrayrulewidth } }
-        \@@_qpoint:n { col - \@@_succ:n \l_tmpb_tl }
+        \@@_qpoint:n { col - \int_eval:n { \l_tmpb_tl + 1 }  }
         \dim_set:Nn \l_tmpa_dim { \pgf at x + 0.5 \arrayrulewidth }
 %    \end{macrocode}
 % We begin the loop over the rows.
@@ -14478,7 +14450,7 @@
             \seq_if_in:NxF \l_@@_corners_cells_seq
               { \l_tmpa_tl - \l_@@_tmpc_tl }
               {
-                \@@_qpoint:n { row - \@@_succ:n \l_tmpb_tl }
+                \@@_qpoint:n { row - \int_eval:n { \l_tmpb_tl + 1 } }
                 \dim_set:Nn \l_tmpb_dim { \pgf at y + 0.5 \arrayrulewidth }
                 \@@_qpoint:n { row - \l_tmpa_tl }
                 \dim_set:Nn \l_@@_tmpd_dim { \pgf at y + 0.5 \arrayrulewidth }
@@ -14808,11 +14780,11 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_test_in_corner_v:
    {
-     \int_compare:nNnTF \l_tmpb_tl = { \@@_succ:n \c at jCol } 
+     \int_compare:nNnTF \l_tmpb_tl = { \int_eval:n { \c at jCol + 1 } } 
        {
          \seq_if_in:NxT
            \l_@@_corners_cells_seq 
-           { \l_tmpa_tl - \@@_pred:n \l_tmpb_tl }
+           { \l_tmpa_tl - \int_eval:n { \l_tmpb_tl - 1 } }
            { \bool_set_false:N \g_tmpa_bool }
        }
        {
@@ -14825,7 +14797,7 @@
                {
                  \seq_if_in:NxT
                    \l_@@_corners_cells_seq 
-                   { \l_tmpa_tl - \@@_pred:n \l_tmpb_tl }
+                   { \l_tmpa_tl - \int_eval:n { \l_tmpb_tl - 1 } }
                    { \bool_set_false:N \g_tmpa_bool }
                }
            } 
@@ -14964,7 +14936,7 @@
       }
       { 
         \bool_if:nTF { \l_@@_NiceArray_bool && ! \l_@@_except_borders_bool }
-          { \@@_succ:n \c at jCol } 
+          { \int_eval:n { \c at jCol + 1 } } 
           \c at jCol 
       }
       { 
@@ -15057,11 +15029,11 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_test_in_corner_h:
    {
-     \int_compare:nNnTF \l_tmpa_tl = { \@@_succ:n \c at iRow }
+     \int_compare:nNnTF \l_tmpa_tl = { \int_eval:n { \c at iRow + 1 } }
        {
          \seq_if_in:NxT
            \l_@@_corners_cells_seq 
-           { \@@_pred:n \l_tmpa_tl - \l_tmpb_tl }
+           { \int_eval:n { \l_tmpa_tl - 1 } - \l_tmpb_tl }
            { \bool_set_false:N \g_tmpa_bool }
        }
        {
@@ -15074,7 +15046,7 @@
                {
                  \seq_if_in:NxT
                    \l_@@_corners_cells_seq 
-                   { \@@_pred:n \l_tmpa_tl - \l_tmpb_tl }
+                   { \int_eval:n { \l_tmpa_tl - 1 } - \l_tmpb_tl }
                    { \bool_set_false:N \g_tmpa_bool }
                }
            } 
@@ -15273,7 +15245,7 @@
       }
       { 
         \bool_if:nTF { \l_@@_NiceArray_bool && ! \l_@@_except_borders_bool }
-          { \@@_succ:n \c at iRow } 
+          { \int_eval:n { \c at iRow + 1 } } 
           \c at iRow
       }
       { 
@@ -15453,15 +15425,17 @@
 %    \begin{macrocode}
 \keys_define:nn { NiceMatrix / Custom-Line }
   {
-    letter .str_set:N = \l_@@_letter_str , 
+    % here, we will use change in the future to use .tl_set:N 
+    letter .code:n = \str_set:Nn \l_@@_letter_str { #1 } , 
     letter .value_required:n = true ,
-    command .str_set:N = \l_@@_command_str , 
+    % here, we will use change in the future to use .tl_set:N 
+    command .code:n = \str_set:Nn \l_@@_command_str { #1 } , 
     command .value_required:n = true , 
     multiplicity .int_set:N = \l_@@_tmpc_int , 
     multiplicity .initial:n = 1 , 
     multiplicity .value_required:n = true ,
     color .tl_set:N = \l_tmpa_tl , 
-    color. value_required:n = true ,  
+    color .value_required:n = true ,  
 %    \end{macrocode}
 % When the key |tikz| is used, the rule will be drawn with Tikz by using the set
 % of keys specified in the value of that key |tikz|.
@@ -15522,7 +15496,7 @@
           { \skip_horizontal:n { \dim_use:N \l_@@_rule_width_dim } } 
       }
      \tl_gput_right:Nx \g_@@_internal_code_after_tl
-      { \@@_vline:n { #1 , position = \@@_succ:n \c at jCol } }
+      { \@@_vline:n { #1 , position = \int_eval:n { \c at jCol + 1 } } }
   }
 %    \end{macrocode}
 %
@@ -15622,8 +15596,8 @@
           { \@@_error:nn { bad~corner } { ##1 } }
       }
 %    \end{macrocode}
-% Even if the user has used the key |corners| (or the key
-% |hvlines-except-corners|), the list of cells in the corners may be empty.
+% Even if the user has used the key |corners| the list of cells in the corners
+% may be empty. 
 %    \begin{macrocode}
     \seq_if_empty:NF \l_@@_corners_cells_seq
       {
@@ -15764,13 +15738,13 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_test_if_cell_in_block:nnnnnnn #1 #2 #3 #4 #5 #6 #7
   {
-    \int_compare:nNnT { #3 } < { \@@_succ:n { #1 } } 
+    \int_compare:nNnT { #3 } < { \int_eval:n { #1 + 1 } } 
       { 
-        \int_compare:nNnT { #1 } < { \@@_succ:n { #5 } }
+        \int_compare:nNnT { #1 } < { \int_eval:n { #5 + 1 } }
           { 
-            \int_compare:nNnT { #4 } < { \@@_succ:n { #2 } } 
+            \int_compare:nNnT { #4 } < { \int_eval:n { #2 + 1 } } 
               {
-                \int_compare:nNnT { #2 } < { \@@_succ:n { #6 } } 
+                \int_compare:nNnT { #2 } < { \int_eval:n { #6 + 1 } } 
                   { \bool_set_true:N \l_tmpb_bool }
               }
           }
@@ -16137,11 +16111,11 @@
           {
             (  
               \dim_use:c { l_@@_row _ \@@_i: _ min _ dim } + 
-              \dim_use:c { l_@@_row _ \@@_succ:n \@@_i: _ max _ dim }
+              \dim_use:c { l_@@_row _ \int_eval:n { \@@_i: + 1 }  _ max _ dim }
             ) 
             / 2
           }
-        \dim_set_eq:cc { l_@@_row _ \@@_succ:n \@@_i: _ max _ dim } 
+        \dim_set_eq:cc { l_@@_row _ \int_eval:n { \@@_i: + 1 } _ max _ dim } 
           { l_@@_row_\@@_i: _min_dim } 
       }
     \int_step_variable:nNn { \c at jCol - 1 } \@@_j:
@@ -16151,11 +16125,11 @@
             (  
               \dim_use:c { l_@@_column _ \@@_j: _ max _ dim } + 
               \dim_use:c 
-                { l_@@_column _ \@@_succ:n \@@_j: _ min _ dim }
+                { l_@@_column _ \int_eval:n { \@@_j: + 1 } _ min _ dim }
             ) 
             / 2
           }
-        \dim_set_eq:cc { l_@@_column _ \@@_succ:n \@@_j: _ min _ dim }
+        \dim_set_eq:cc { l_@@_column _ \int_eval:n { \@@_j: + 1 } _ min _ dim }
           { l_@@_column _ \@@_j: _ max _ dim } 
       }
 %    \end{macrocode}
@@ -16678,7 +16652,7 @@
     color .value_required:n = true ,
     borders .clist_set:N = \l_@@_borders_clist ,
     borders .value_required:n = true ,
-    hvlines .meta:n = { vlines = #1 , hlines = #1 } , 
+    hvlines .meta:n = { vlines , hlines } , 
     vlines .bool_set:N = \l_@@_vlines_block_bool,
     vlines .default:n = true , 
     hlines .bool_set:N = \l_@@_hlines_block_bool,
@@ -16709,6 +16683,9 @@
     name .initial:n = ,
     respect-arraystretch .bool_set:N = \l_@@_respect_arraystretch_bool ,
     respect-arraystretch .default:n = true ,
+    v-center .bool_set:N = \l_@@_v_center_bool ,
+    v-center .default:n = true , 
+    v-center .initial:n = false ,
     unknown .code:n = \@@_error:n { Unknown~key~for~Block }
   }
 %    \end{macrocode}
@@ -16783,7 +16760,20 @@
     \keys_set:nn { NiceMatrix / Block / SecondPass } { #5 }
 %    \end{macrocode}
 %
+% 
+% We restrict the use of the key |v-center| to the case of a mono-row block.
 %    \begin{macrocode}
+    \bool_if:NT \l_@@_v_center_bool
+      {
+        \int_compare:nNnF { #1 } = { #3 }
+          { 
+            \@@_error:n { Wrong~use~of~v-center } 
+            \bool_set_false:N \l_@@_v_center_bool 
+          }
+      }
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
     \bool_if:NT \l_@@_vlines_block_bool
       {
         \tl_gput_right:Nx \g_nicematrix_code_after_tl
@@ -16959,9 +16949,9 @@
       \dim_set_eq:NN \l_tmpa_dim \pgf at y
       \@@_qpoint:n { col - #2 } 
       \dim_set_eq:NN \l_tmpb_dim \pgf at x
-      \@@_qpoint:n { row - \@@_succ:n { \l_@@_last_row_int } } 
+      \@@_qpoint:n { row - \int_eval:n { \l_@@_last_row_int + 1 } } 
       \dim_set_eq:NN \l_@@_tmpc_dim \pgf at y
-      \@@_qpoint:n { col - \@@_succ:n { \l_@@_last_col_int } } 
+      \@@_qpoint:n { col - \int_eval:n { \l_@@_last_col_int + 1 } } 
       \dim_set_eq:NN \l_@@_tmpd_dim \pgf at x
 %    \end{macrocode}
 %
@@ -17046,7 +17036,7 @@
             }
           \dim_compare:nNnT \l_@@_tmpd_dim = { - \c_max_dim }
             {
-              \@@_qpoint:n { col - \@@_succ:n { \l_@@_last_col_int } } 
+              \@@_qpoint:n { col - \int_eval:n { \l_@@_last_col_int + 1 } } 
               \dim_set_eq:NN \l_@@_tmpd_dim \pgf at x
             }
           \@@_pgf_rect_node:nnnnn
@@ -17079,7 +17069,8 @@
 % Now, we will put the label of the block beginning with the case of a |\Block|
 % of one row.
 %    \begin{macrocode}
-    \int_compare:nNnTF { #1 } = { #3 }
+    \bool_if:nTF
+      { \int_compare_p:nNn { #1 } = { #3 } && ! \l_@@_v_center_bool }
       {
 %    \end{macrocode}
 % We take into account the case of a block of one row in the ``first row'' or
@@ -17239,9 +17230,9 @@
           { \tl_set:Nx \l_tmpa_tl { \int_use:N \c at iRow } }
         \int_compare:nNnT \l_tmpb_tl > \c at jCol
           { \tl_set:Nx \l_tmpb_tl { \int_use:N \c at jCol } }
-        \@@_qpoint:n { row - \@@_succ:n \l_tmpa_tl }
+        \@@_qpoint:n { row - \int_eval:n { \l_tmpa_tl + 1 } }
         \dim_set:Nn \l_tmpa_dim { \pgf at y } 
-        \@@_qpoint:n { col - \@@_succ:n \l_tmpb_tl }
+        \@@_qpoint:n { col - \int_eval:n { \l_tmpb_tl + 1 } }
         \dim_set:Nn \l_@@_tmpd_dim { \pgf at x }
         \pgfpathrectanglecorners
           { \pgfpoint \l_@@_tmpc_dim \l_tmpb_dim }
@@ -17272,7 +17263,7 @@
 % 
 %
 % \bigskip
-% The first argument of |\@@_hvlines_block:nnn| is a list of options for the
+% The first argument of |\@@_vlines_block:nnn| is a list of options for the
 % rules that we will draw. The second argument is the upper-left cell of the
 % block (with, as usual, the syntax $i$|-|$j$) and the third is the last cell of
 % the block (with the same syntax).
@@ -17295,7 +17286,7 @@
               { 
                 position = ##1 ,
                 start = \l_@@_tmpc_tl ,
-                end = \@@_pred:n \l_tmpa_tl 
+                end = \int_eval:n { \l_tmpa_tl - 1 }
               }
           } 
       }
@@ -17338,11 +17329,10 @@
     \dim_compare:nNnTF \l_@@_rounded_corners_dim > \c_zero_dim 
       { \@@_error:n { borders~forbidden } }
       {
-        \clist_map_inline:Nn \l_@@_borders_clist
-          {
-            \clist_if_in:nnF { top , bottom , left , right } { ##1 }
-              { \@@_error:nn { bad~border } { ##1 } }
-          }
+        \tl_clear_new:N \l_@@_borders_tikz_tl
+        \keys_set:nV
+          { NiceMatrix / OnlyForTikzInBorders } 
+          \l_@@_borders_clist 
         \@@_cut_on_hyphen:w #2 \q_stop
         \tl_set_eq:NN \l_@@_tmpc_tl \l_tmpa_tl
         \tl_set_eq:NN \l_@@_tmpd_tl \l_tmpb_tl
@@ -17349,24 +17339,58 @@
         \@@_cut_on_hyphen:w #3 \q_stop
         \tl_set:Nx \l_tmpa_tl { \int_eval:n { \l_tmpa_tl + 1 } }
         \tl_set:Nx \l_tmpb_tl { \int_eval:n { \l_tmpb_tl + 1 } }
-        \pgfpicture
-        \pgfrememberpicturepositiononpagetrue
-        \pgf at relevantforpicturesizefalse
-        \CT at arc@
-        \pgfsetlinewidth { 1.1 \l_@@_line_width_dim }
-        \clist_if_in:NnT \l_@@_borders_clist { right }  
-          { \@@_stroke_vertical:n \l_tmpb_tl }
-        \clist_if_in:NnT \l_@@_borders_clist { left }  
-          { \@@_stroke_vertical:n \l_@@_tmpd_tl }
-        \clist_if_in:NnT \l_@@_borders_clist { bottom }  
-          { \@@_stroke_horizontal:n \l_tmpa_tl }
-        \clist_if_in:NnT \l_@@_borders_clist { top }  
-          { \@@_stroke_horizontal:n \l_@@_tmpc_tl }
-        \endpgfpicture
-     }
+        \@@_stroke_borders_block_i:
+      }
   }
 %    \end{macrocode}
 %
+%    \begin{macrocode}
+\hook_gput_code:nnn { begindocument } { . }
+  {
+    \cs_new_protected:Npx \@@_stroke_borders_block_i:
+      {
+        \c_@@_pgfortikzpicture_tl
+        \@@_stroke_borders_block_ii:
+        \c_@@_endpgfortikzpicture_tl
+      }
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_stroke_borders_block_ii:
+  {
+    \pgfrememberpicturepositiononpagetrue
+    \pgf at relevantforpicturesizefalse
+    \CT at arc@
+    \pgfsetlinewidth { 1.1 \l_@@_line_width_dim }
+    \clist_if_in:NnT \l_@@_borders_clist { right }  
+      { \@@_stroke_vertical:n \l_tmpb_tl }
+    \clist_if_in:NnT \l_@@_borders_clist { left }  
+      { \@@_stroke_vertical:n \l_@@_tmpd_tl }
+    \clist_if_in:NnT \l_@@_borders_clist { bottom }  
+      { \@@_stroke_horizontal:n \l_tmpa_tl }
+    \clist_if_in:NnT \l_@@_borders_clist { top }  
+      { \@@_stroke_horizontal:n \l_@@_tmpc_tl }
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\keys_define:nn { NiceMatrix / OnlyForTikzInBorders }
+  { 
+    tikz .code:n = 
+      \cs_if_exist:NTF \tikzpicture
+        { \tl_set:Nn \l_@@_borders_tikz_tl { #1 } }
+        { \@@_error:n { tikz~in~borders~without~tikz } } ,
+    tikz .value_required:n = true ,
+    top .code:n = ,
+    bottom .code:n = , 
+    left .code:n = ,
+    right .code:n = ,
+    unknown .code:n = \@@_error:n { bad~border } 
+  }
+%    \end{macrocode}
+%
+% 
 % \medskip
 % The following command is used to stroke the left border and the right border.
 % The argument |#1| is the number of column (in the sense of the |col| node).
@@ -17378,9 +17402,16 @@
     \@@_qpoint:n \l_tmpa_tl 
     \dim_set:Nn \l_@@_tmpc_dim { \pgf at y + 0.5 \l_@@_line_width_dim }
     \@@_qpoint:n { #1 }
-    \pgfpathmoveto { \pgfpoint \pgf at x \l_tmpb_dim }
-    \pgfpathlineto { \pgfpoint \pgf at x \l_@@_tmpc_dim }
-    \pgfusepathqstroke
+    \tl_if_empty:NTF \l_@@_borders_tikz_tl
+      {
+        \pgfpathmoveto { \pgfpoint \pgf at x \l_tmpb_dim }
+        \pgfpathlineto { \pgfpoint \pgf at x \l_@@_tmpc_dim }
+        \pgfusepathqstroke
+      }
+      {
+        \use:x { \exp_not:N \draw [ \l_@@_borders_tikz_tl ] }
+          ( \pgf at x , \l_tmpb_dim ) -- ( \pgf at x , \l_@@_tmpc_dim ) ; 
+      }
   }
 %    \end{macrocode}
 % 
@@ -17397,9 +17428,16 @@
     \@@_qpoint:n \l_tmpb_tl 
     \dim_set:Nn \l_tmpb_dim { \pgf at x + 0.5 \l_@@_line_width_dim }
     \@@_qpoint:n { #1 }
-    \pgfpathmoveto { \pgfpoint \l_tmpa_dim \pgf at y }
-    \pgfpathlineto { \pgfpoint \l_tmpb_dim \pgf at y }
-    \pgfusepathqstroke
+    \tl_if_empty:NTF \l_@@_borders_tikz_tl
+      {
+        \pgfpathmoveto { \pgfpoint \l_tmpa_dim \pgf at y }
+        \pgfpathlineto { \pgfpoint \l_tmpb_dim \pgf at y }
+        \pgfusepathqstroke
+      }
+      {
+        \use:x { \exp_not:N \draw [ \l_@@_borders_tikz_tl ] }
+          ( \l_tmpa_dim , \pgf at y ) -- ( \l_tmpb_dim , \pgf at y ) ; 
+      }
   }
 %    \end{macrocode}
 % 
@@ -17411,7 +17449,7 @@
     borders .clist_set:N = \l_@@_borders_clist ,
     rounded-corners .dim_set:N = \l_@@_rounded_corners_dim ,
     rounded-corners .default:n = 4 pt ,
-    line-width .dim_set:N = \l_@@_line_width_dim 
+    line-width .dim_set:N = \l_@@_line_width_dim ,
   }
 %    \end{macrocode}
 %
@@ -17427,7 +17465,9 @@
     \clist_map_inline:nn { #5 }
       {
         \path [ ##1 ] 
-              ( #1 -| #2 ) rectangle ( \@@_succ:n { #3 } -| \@@_succ:n { #4 } ) ; 
+              ( #1 -| #2 ) 
+              rectangle 
+              ( \int_eval:n { #3 + 1 } -| \int_eval:n { #4 + 1 } ) ; 
       }
     \end { tikzpicture }
   }
@@ -17647,9 +17687,9 @@
     \@@_qpoint:n { col - #2 }
     \dim_set_eq:NN \l_tmpb_dim \pgf at x
     \pgfpathmoveto { \pgfpoint \l_tmpb_dim \l_tmpa_dim }
-    \@@_qpoint:n { row - \@@_succ:n { #3 } }
+    \@@_qpoint:n { row - \int_eval:n { #3 + 1 } }
     \dim_set_eq:NN \l_@@_tmpc_dim \pgf at y 
-    \@@_qpoint:n { col - \@@_succ:n { #4 } }
+    \@@_qpoint:n { col - \int_eval:n { #4 + 1 } }
     \dim_set_eq:NN \l_@@_tmpd_dim \pgf at x
     \pgfpathlineto { \pgfpoint \l_@@_tmpd_dim \l_@@_tmpc_dim }
     {
@@ -17806,7 +17846,7 @@
 %    \begin{macrocode}
     \@@_qpoint:n { row - 1 }
     \dim_set_eq:NN \l_@@_y_initial_dim \pgf at y
-    \@@_qpoint:n { row - \@@_succ:n \c at iRow }
+    \@@_qpoint:n { row - \int_eval:n { \c at iRow + 1 } }
     \dim_set_eq:NN \l_@@_y_final_dim \pgf at y
 %    \end{macrocode}
 % 
@@ -18485,6 +18525,8 @@
     yshift .dim_set:N = \l_@@_brace_yshift_dim , 
     yshift .value_required:n = true ,
     yshift .initial:n = \c_zero_dim ,
+    color .tl_set:N = \l_tmpa_tl , 
+    color .value_required:n = true ,
     unknown .code:n = \@@_error:n { Unknown~key~for~Brace }
   }
 %    \end{macrocode}
@@ -18513,7 +18555,9 @@
           { \@@_error:nn { Construct~too~large } { \OverBrace } }
       }
       {
+        \tl_clear:N \l_tmpa_tl % added the 2022-02-25
         \keys_set:nn { NiceMatrix / Brace } { #4 }
+        \tl_if_empty:NF \l_tmpa_tl { \color { \l_tmpa_tl } } % added the 2022-02-25
         \pgfpicture 
         \pgfrememberpicturepositiononpagetrue
         \pgf at relevantforpicturesizefalse
@@ -18866,6 +18910,16 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\@@_msg_new:nn { hvlines-except-corners } 
+  { 
+    The~key~'hvlines-except-corners'~is~now~obsolete.~You~should~instead~use~the~ 
+    keys~'hvlines'~and~'corners'.\\
+    However,~you~can~go~on~for~this~time.~This~message~won't~be~shown~anymore~
+    in~this~document.
+  }
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
 \@@_msg_new:nn { last~col~not~used }
   {
     The~key~'last-col'~is~in~force~but~you~have~not~used~that~last~column~
@@ -19050,6 +19104,14 @@
 %    \end{macrocode}
 % 
 %    \begin{macrocode}
+\@@_msg_new:nn { Wrong~use~of~v-center }
+  { 
+    You~should~not~use~the~key~'v-center'~here~because~your~block~is~not~ 
+    mono-row.~However,~you~can~go~on.
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \@@_msg_new:nn { No~letter~and~no~command }
   { 
     Your~use~of~'custom-line'~is~no-op~since~you~don't~have~used~the~
@@ -19148,9 +19210,12 @@
 %    \begin{macrocode}
 \@@_msg_new:nn { bad~border }
   {
-    #1~is~an~incorrect~specification~for~a~border~(in~the~key~
-    'borders'~of~the~command~\token_to_str:N \Block).~The~available~
-    values~are:~left,~right,~top~and~bottom.\\
+    \l_keys_key_str\space~is~an~incorrect~specification~for~a~border~
+    (in~the~key~'borders'~of~the~command~\token_to_str:N \Block).~
+    The~available~values~are:~left,~right,~top~and~bottom~(and~you~can~
+    also~use~the~key~'tikz' 
+    \bool_if:nF \c_@@_tikz_loaded_bool
+      {~if~you~load~the~LaTeX~package~'tikz'}).\\ 
     If~you~go~on,~this~specification~of~border~will~be~ignored.
   }
 %    \end{macrocode}
@@ -19277,6 +19342,15 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\@@_msg_new:nn { tikz~in~borders~without~tikz }
+  {
+    You~have~used~the~key~'tikz'~in~a~key~'borders'~(of~a~
+    command~'\token_to_str:N\Block')~but~Tikz~is~not~loaded.~
+    If~you~go~on,~that~key~will~be~ignored.
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \@@_msg_new:nn { color~in~custom-line~with~tikz }
   {
     In~a~'custom-line',~you~have~used~both~'tikz'~and~'color',~
@@ -19361,7 +19435,7 @@
     For~a~list~of~the~available~keys,~type~H~<return>.
   }
   {
-    The~available~keys~are~(in~alphabetic~order):~left-shorten,~
+    The~available~keys~are~(in~alphabetic~order):~color,~left-shorten,~
     right-shorten,~shorten~(which~fixes~both~left-shorten~and~
     right-shorten)~and~yshift.
   }
@@ -20255,6 +20329,13 @@
 % \subsection*{Changes between version 6.5 and 6.6}
 %
 % Keys |tikz| and |width| in |custom-line|.
+%
+% \subsection*{Changes between version 6.6 and 6.7}
+%
+% Key |color| for |\OverBrace| and |\UnderBrace| in the |\CodeAfter|
+%
+% Key |tikz| in the key |borders| of a command |\Block|
+%
 % \PrintIndex
 % 
 % \tableofcontents

Modified: branches/branch2021.final/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
===================================================================
--- branches/branch2021.final/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2022-03-06 22:02:24 UTC (rev 62479)
+++ branches/branch2021.final/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2022-03-06 22:02:34 UTC (rev 62480)
@@ -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.6}
-\def\myfiledate{2022/02/16}
+\def\myfileversion{6.7}
+\def\myfiledate{2022/03/02}
 \RequirePackage{pgfcore}
 \usepgfmodule{shapes}
 \RequirePackage{l3keys2e}
@@ -40,10 +40,6 @@
 \cs_new_protected:Npn \__nicematrix_msg_new:nnn { \msg_new:nnnn { nicematrix } }
 \cs_new_protected:Npn \__nicematrix_msg_redirect_name:nn
   { \msg_redirect_name:nnn { nicematrix } }
-\bool_new:N \c__nicematrix_in_preamble_bool
-\bool_set_true:N \c__nicematrix_in_preamble_bool
-\hook_gput_code:nnn { begindocument } { . }
-  { \bool_set_false:N \c__nicematrix_in_preamble_bool }
 \bool_new:N \c__nicematrix_arydshln_loaded_bool
 \bool_new:N \c__nicematrix_booktabs_loaded_bool
 \bool_new:N \c__nicematrix_enumitem_loaded_bool
@@ -163,7 +159,7 @@
 \cs_set:Npn \__nicematrix_standard_cline:w #1-#2 \q_stop
   {
     \int_compare:nNnT \l__nicematrix_first_col_int = 0 { \omit & }
-    \int_compare:nNnT { #1 } > 1 { \multispan { \__nicematrix_pred:n { #1 } } & }
+    \int_compare:nNnT { #1 } > 1 { \multispan { \int_eval:n { #1 - 1 } } & }
     \multispan { \int_eval:n { #2 - #1 + 1 } }
     {
       \CT at arc@
@@ -196,12 +192,10 @@
         \skip_horizontal:N \c_zero_dim
       }
     \peek_meaning_remove_ignore_spaces:NTF \cline
-      { & \__nicematrix_cline_i:en { \__nicematrix_succ:n { #3 } } }
+      { & \__nicematrix_cline_i:en { \int_eval:n { #3 + 1 } } }
       { \everycr { } \cr }
   }
 \cs_generate_variant:Nn \__nicematrix_cline_i:nn { e n }
-\cs_new:Npn \__nicematrix_succ:n #1 { \the \numexpr #1 + 1 \relax }
-\cs_new:Npn \__nicematrix_pred:n #1 { \the \numexpr #1 - 1 \relax }
 \cs_new:Npn \__nicematrix_math_toggle_token:
   { \bool_if:NF \l__nicematrix_NiceTabular_bool \c_math_toggle_token }
 \cs_new_protected:Npn \__nicematrix_set_CT at arc@:
@@ -557,7 +551,9 @@
     line-style .value_required:n = true ,
     color .tl_set:N = \l__nicematrix_xdots_color_tl ,
     color .value_required:n = true ,
-    shorten .dim_set:N = \l__nicematrix_xdots_shorten_dim ,
+    shorten .code:n =
+      \hook_gput_code:nnn { begindocument } { . }
+        { \dim_set:Nn \l__nicematrix_xdots_shorten_dim { #1 } } ,
     shorten .value_required:n = true ,
     down .tl_set:N = \l__nicematrix_xdots_down_tl ,
     up .tl_set:N = \l__nicematrix_xdots_up_tl ,
@@ -655,6 +651,11 @@
   {
     hvlines-except-corners .code:n =
       {
+        \__nicematrix_error:n { hvlines-except-corners }
+        \group_begin:
+        \globaldefs = 1
+        \__nicematrix_msg_redirect_name:nn { hvlines-except-corners } { none }
+        \group_end:
         \clist_set:Nn \l__nicematrix_corners_clist { #1 }
         \clist_set:Nn \l__nicematrix_vlines_clist { all }
         \clist_set:Nn \l__nicematrix_hlines_clist { all }
@@ -717,31 +718,17 @@
     label-in-list .value_required:n = true ,
     enumitem-keys .code:n =
       {
-        \bool_if:NTF \c__nicematrix_in_preamble_bool
+        \hook_gput_code:nnn { begindocument } { . }
           {
-            \hook_gput_code:nnn { begindocument } { . }
-              {
-                \bool_if:NT \c__nicematrix_enumitem_loaded_bool
-                  { \setlist* [ tabularnotes ] { #1 } }
-              }
+            \bool_if:NT \c__nicematrix_enumitem_loaded_bool
+              { \setlist* [ tabularnotes ] { #1 } }
           }
-          {
-             \bool_if:NT \c__nicematrix_enumitem_loaded_bool
-               { \setlist* [ tabularnotes ] { #1 } }
-          }
       } ,
     enumitem-keys .value_required:n = true ,
     enumitem-keys-para .code:n =
       {
-        \bool_if:NTF \c__nicematrix_in_preamble_bool
+        \hook_gput_code:nnn { begindocument } { . }
           {
-            \hook_gput_code:nnn { begindocument } { . }
-              {
-                \bool_if:NT \c__nicematrix_enumitem_loaded_bool
-                  { \setlist* [ tabularnotes* ] { #1 } }
-              }
-          }
-          {
             \bool_if:NT \c__nicematrix_enumitem_loaded_bool
               { \setlist* [ tabularnotes* ] { #1 } }
           }
@@ -829,7 +816,7 @@
     notes .code:n = \keys_set:nn { NiceMatrix / notes } { #1 } ,
     notes .value_required:n = true ,
     sub-matrix .code:n =
-     \keys_set:nn { NiceMatrix / sub-matrix } { #1 } ,
+      \keys_set:nn { NiceMatrix / sub-matrix } { #1 } ,
     sub-matrix .value_required:n = true ,
     unknown .code:n  = \__nicematrix_error:n { Unknown~key~for~NiceMatrixOptions }
   }
@@ -1067,12 +1054,12 @@
               }
             \box_use:N \l__nicematrix_cell_box
             \box_move_down:nn { \box_dp:N \l__nicematrix_cell_box }
-              \hbox_overlap_left:n
-                {
-                  \pgfsys at markposition
-                    { \__nicematrix_env: - \int_use:N \c at iRow - \int_use:N \c at jCol - SE }
-                  #1
-                }
+            \hbox_overlap_left:n
+              {
+                \pgfsys at markposition
+                  { \__nicematrix_env: - \int_use:N \c at iRow - \int_use:N \c at jCol - SE }
+                #1
+              }
           }
       }
   }
@@ -1114,19 +1101,20 @@
             \vtop
               {
                 \skip_vertical:N 0.5\arrayrulewidth
-                \pgfsys at markposition { \__nicematrix_env: - row - \__nicematrix_succ:n \c at iRow }
+                \pgfsys at markposition
+                  { \__nicematrix_env: - row - \int_eval:n { \c at iRow + 1 } }
                 \skip_vertical:N -0.5\arrayrulewidth
               }
           }
         \pgfpicture
         \pgfrememberpicturepositiononpagetrue
-        \pgfcoordinate { \__nicematrix_env: - row - \__nicematrix_succ:n \c at iRow }
+        \pgfcoordinate { \__nicematrix_env: - row - \int_eval:n { \c at iRow + 1 } }
           { \pgfpoint \c_zero_dim { - 0.5 \arrayrulewidth } }
         \str_if_empty:NF \l__nicematrix_name_str
           {
             \pgfnodealias
-              { \l__nicematrix_name_str - row - \__nicematrix_succ:n \c at iRow }
-              { \__nicematrix_env: - row - \__nicematrix_succ:n \c at iRow }
+              { \l__nicematrix_name_str - row - \int_eval:n { \c at iRow + 1 } }
+              { \__nicematrix_env: - row - \int_eval:n { \c at iRow + 1 } }
           }
         \endpgfpicture
       }
@@ -1146,7 +1134,7 @@
                 \exp_args:NNx
                   \clist_if_in:NnT
                   \l__nicematrix_hlines_clist
-                  { \__nicematrix_succ:n \c at iRow }
+                  { \int_eval:n { \c at iRow + 1 } }
               }
               {
                 \int_compare:nNnT \c at iRow > { -1 }
@@ -1477,9 +1465,9 @@
         \dim_set_eq:NN \l_tmpa_dim \pgf at x
         \__nicematrix_qpoint:n { #1 }
         \dim_set_eq:NN \l_tmpb_dim \pgf at y
-        \__nicematrix_qpoint:n { col - \__nicematrix_succ:n { #4 } }
+        \__nicematrix_qpoint:n { col - \int_eval:n { #4 + 1 } }
         \dim_set_eq:NN \l__nicematrix_tmpc_dim \pgf at x
-        \__nicematrix_qpoint:n { \__nicematrix_succ:n { #3 } }
+        \__nicematrix_qpoint:n { \int_eval:n { #3 + 1 } }
         \dim_set_eq:NN \l__nicematrix_tmpd_dim \pgf at y
         \__nicematrix_pgf_rect_node:nnnnn
           { \__nicematrix_env: - #5 }
@@ -1884,7 +1872,7 @@
           {
             \__nicematrix_vline:n
               {
-                position = \__nicematrix_succ:n \c at jCol ,
+                position = \int_eval:n { \c at jCol + 1 } ,
                 multiplicity = \int_use:N \l_tmpa_int ,
               }
           }
@@ -2109,7 +2097,7 @@
 \cs_new_protected:Npn \__nicematrix_patch_preamble_viii_i:nn #1 #2
   {
     \tl_gput_right:Nx \g__nicematrix_internal_code_after_tl
-      { \__nicematrix_delimiter:nnn #1 { \__nicematrix_succ:n \c at jCol } \c_true_bool }
+      { \__nicematrix_delimiter:nnn #1 { \int_eval:n { \c at jCol + 1 } } \c_true_bool }
     \tl_if_in:nnTF { ( [ \{ ) ] \} } { #2 }
       {
         \__nicematrix_error:nn { delimiter~after~opening } { #2 }
@@ -2239,7 +2227,7 @@
           }
           {
             \exp_args:NNx
-            \clist_if_in:NnT \l__nicematrix_vlines_clist { \__nicematrix_succ:n \c at jCol }
+            \clist_if_in:NnT \l__nicematrix_vlines_clist { \int_eval:n { \c at jCol + 1 } }
               {
                 \tl_gput_right:Nn \g__nicematrix_preamble_tl
                   { ! { \skip_horizontal:N \arrayrulewidth } }
@@ -2269,7 +2257,7 @@
     \int_compare:nNnT { #1 } > 1
       {
         \seq_gput_left:Nx \g__nicematrix_multicolumn_cells_seq
-          { \int_use:N \c at iRow - \__nicematrix_succ:n \c at jCol }
+          { \int_use:N \c at iRow - \int_eval:n { \c at jCol + 1 } }
         \seq_gput_left:Nn \g__nicematrix_multicolumn_sizes_seq { #1 }
         \seq_gput_right:Nx \g__nicematrix_pos_of_blocks_seq
           {
@@ -2390,7 +2378,7 @@
           }
           {
             \exp_args:NNx
-            \clist_if_in:NnT \l__nicematrix_vlines_clist { \__nicematrix_succ:n \c at jCol }
+            \clist_if_in:NnT \l__nicematrix_vlines_clist { \int_eval:n { \c at jCol + 1 } }
               {
                 \tl_gput_right:Nn \g__nicematrix_preamble_tl
                   { ! { \skip_horizontal:N \arrayrulewidth } }
@@ -2417,7 +2405,7 @@
     \pgfpicture
       \__nicematrix_qpoint:n { row - 1 }
       \dim_gset_eq:NN \g_tmpa_dim \pgf at y
-      \__nicematrix_qpoint:n { row - \__nicematrix_succ:n \c at iRow }
+      \__nicematrix_qpoint:n { row - \int_eval:n { \c at iRow + 1 } }
       \dim_gadd:Nn \g_tmpa_dim \pgf at y
       \dim_gset:Nn \g_tmpa_dim { 0.5 \g_tmpa_dim }
       \str_if_in:NnTF \l__nicematrix_baseline_tl { line- }
@@ -2759,19 +2747,20 @@
             \hbox
               {
                 \skip_horizontal:N -0.5\arrayrulewidth
-                \pgfsys at markposition { \__nicematrix_env: - col - \__nicematrix_succ:n \g_tmpa_int }
+                \pgfsys at markposition
+                  { \__nicematrix_env: - col - \int_eval:n { \g_tmpa_int + 1 } }
                 \skip_horizontal:N 0.5\arrayrulewidth
               }
           }
         \pgfpicture
           \pgfrememberpicturepositiononpagetrue
-          \pgfcoordinate { \__nicematrix_env: - col - \__nicematrix_succ:n \g_tmpa_int }
+          \pgfcoordinate { \__nicematrix_env: - col - \int_eval:n { \g_tmpa_int + 1 } }
             { \pgfpoint { - 0.5 \arrayrulewidth } \c_zero_dim }
           \str_if_empty:NF \l__nicematrix_name_str
             {
               \pgfnodealias
-                { \l__nicematrix_name_str - col - \__nicematrix_succ:n \g_tmpa_int }
-                { \__nicematrix_env: - col - \__nicematrix_succ:n \g_tmpa_int }
+                { \l__nicematrix_name_str - col - \int_eval:n { \g_tmpa_int + 1 } }
+                { \__nicematrix_env: - col - \int_eval:n { \g_tmpa_int + 1 } }
             }
         \endpgfpicture
       }
@@ -2797,7 +2786,9 @@
                 \skip_horizontal:N -0.5\arrayrulewidth
                 \bool_lazy_and:nnT \l__nicematrix_Matrix_bool \l__nicematrix_NiceArray_bool
                   { \skip_horizontal:N -\arraycolsep }
-                \pgfsys at markposition { \__nicematrix_env: - col - \__nicematrix_succ:n \g_tmpa_int }
+                \pgfsys at markposition
+                  { \__nicematrix_env: - col - \int_eval:n {
+                    \g_tmpa_int + 1 } }
                 \skip_horizontal:N 0.5\arrayrulewidth
                 \bool_lazy_and:nnT \l__nicematrix_Matrix_bool \l__nicematrix_NiceArray_bool
                   { \skip_horizontal:N \arraycolsep }
@@ -2805,7 +2796,7 @@
           }
         \pgfpicture
           \pgfrememberpicturepositiononpagetrue
-          \pgfcoordinate { \__nicematrix_env: - col - \__nicematrix_succ:n \g_tmpa_int }
+          \pgfcoordinate { \__nicematrix_env: - col - \int_eval:n { \g_tmpa_int + 1 } }
             {
               \bool_lazy_and:nnTF \l__nicematrix_Matrix_bool \l__nicematrix_NiceArray_bool
                 {
@@ -2818,8 +2809,8 @@
           \str_if_empty:NF \l__nicematrix_name_str
             {
               \pgfnodealias
-                { \l__nicematrix_name_str - col - \__nicematrix_succ:n \g_tmpa_int }
-                { \__nicematrix_env: - col - \__nicematrix_succ:n \g_tmpa_int }
+                { \l__nicematrix_name_str - col - \int_eval:n { \g_tmpa_int + 1 } }
+                { \__nicematrix_env: - col - \int_eval:n { \g_tmpa_int + 1 } }
             }
         \endpgfpicture
     \bool_if:NT \g__nicematrix_last_col_found_bool
@@ -2830,17 +2821,21 @@
             \bool_if:NT \l__nicematrix_code_before_bool
               {
                 \pgfsys at markposition
-                  { \__nicematrix_env: - col - \__nicematrix_succ:n \g__nicematrix_col_total_int }
+                  { \__nicematrix_env: - col - \int_eval:n { \g__nicematrix_col_total_int + 1 } }
               }
             \pgfpicture
             \pgfrememberpicturepositiononpagetrue
-            \pgfcoordinate { \__nicematrix_env: - col - \__nicematrix_succ:n \g__nicematrix_col_total_int }
+            \pgfcoordinate
+              { \__nicematrix_env: - col - \int_eval:n { \g__nicematrix_col_total_int + 1 } }
               \pgfpointorigin
             \str_if_empty:NF \l__nicematrix_name_str
               {
                 \pgfnodealias
-                  { \l__nicematrix_name_str - col - \__nicematrix_succ:n \g__nicematrix_col_total_int }
-                  { \__nicematrix_env: - col - \__nicematrix_succ:n \g__nicematrix_col_total_int }
+                  {
+                     \l__nicematrix_name_str - col
+                     - \int_eval:n { \g__nicematrix_col_total_int + 1 }
+                  }
+                  { \__nicematrix_env: - col - \int_eval:n { \g__nicematrix_col_total_int + 1 } }
               }
             \endpgfpicture
           }
@@ -2971,7 +2966,7 @@
           {
             \int_compare:nNnTF \l__nicematrix_last_col_int < 0
               \c at MaxMatrixCols
-              { \__nicematrix_pred:n \l__nicematrix_last_col_int }
+              { \int_eval:n { \l__nicematrix_last_col_int - 1 } }
           }
           { > \__nicematrix_cell_begin:w #2 < \__nicematrix_cell_end: }
       }
@@ -3511,7 +3506,7 @@
       }
     \dim_compare:nNnT \l__nicematrix_x_final_dim = { - \c_max_dim }
       {
-        \__nicematrix_qpoint:n { col - \__nicematrix_succ:n \l__nicematrix_final_j_int }
+        \__nicematrix_qpoint:n { col - \int_eval:n { \l__nicematrix_final_j_int + 1 } }
         \dim_set_eq:NN \l__nicematrix_x_final_dim \pgf at x
         \dim_sub:Nn \l__nicematrix_x_final_dim \col at sep
       }
@@ -3588,7 +3583,7 @@
       {
         \__nicematrix_qpoint:n { row - \int_use:N \l__nicematrix_initial_i_int }
         \dim_set_eq:NN \l_tmpa_dim \pgf at y
-        \__nicematrix_qpoint:n { row - \__nicematrix_succ:n \l__nicematrix_initial_i_int }
+        \__nicematrix_qpoint:n { row - \int_eval:n { \l__nicematrix_initial_i_int + 1 } }
         \dim_set:Nn \l__nicematrix_y_initial_dim { ( \l_tmpa_dim + \pgf at y ) / 2 }
         \dim_set_eq:NN \l__nicematrix_y_final_dim \l__nicematrix_y_initial_dim
       }
@@ -3678,7 +3673,7 @@
           {
             \__nicematrix_qpoint:n { col - \int_use:N \l__nicematrix_initial_j_int }
             \dim_set_eq:NN \l_tmpa_dim \pgf at x
-            \__nicematrix_qpoint:n { col - \__nicematrix_succ:n \l__nicematrix_initial_j_int }
+            \__nicematrix_qpoint:n { col - \int_eval:n { \l__nicematrix_initial_j_int + 1 } }
             \dim_set:Nn \l__nicematrix_x_initial_dim { ( \pgf at x + \l_tmpa_dim ) / 2 }
             \dim_set_eq:NN \l__nicematrix_x_final_dim \l__nicematrix_x_initial_dim
             \int_compare:nNnT \l__nicematrix_last_col_int > { -2 }
@@ -4625,7 +4620,7 @@
   {
     \bool_lazy_or:nnTF
       { \int_compare_p:nNn { #4 } = \c_zero_int }
-      { \int_compare_p:nNn { #2 } = { \__nicematrix_succ:n { \c at jCol } } }
+      { \int_compare_p:nNn { #2 } = { \int_eval:n { \c at jCol + 1 } } }
       \prg_return_false:
       \prg_return_true:
   }
@@ -4670,7 +4665,7 @@
         \int_compare:nNnTF \l__nicematrix_first_col_int = \l_tmpa_tl
           { \dim_set:Nn \l__nicematrix_tmpc_dim { \pgf at x - 0.5 \arrayrulewidth } }
           { \dim_set:Nn \l__nicematrix_tmpc_dim { \pgf at x + 0.5 \arrayrulewidth } }
-        \__nicematrix_qpoint:n { col - \__nicematrix_succ:n \l_tmpb_tl }
+        \__nicematrix_qpoint:n { col - \int_eval:n { \l_tmpb_tl + 1 }  }
         \dim_set:Nn \l_tmpa_dim { \pgf at x + 0.5 \arrayrulewidth }
         \clist_map_inline:Nn \l__nicematrix_rows_tl
           {
@@ -4686,7 +4681,7 @@
             \seq_if_in:NxF \l__nicematrix_corners_cells_seq
               { \l_tmpa_tl - \l__nicematrix_tmpc_tl }
               {
-                \__nicematrix_qpoint:n { row - \__nicematrix_succ:n \l_tmpb_tl }
+                \__nicematrix_qpoint:n { row - \int_eval:n { \l_tmpb_tl + 1 } }
                 \dim_set:Nn \l_tmpb_dim { \pgf at y + 0.5 \arrayrulewidth }
                 \__nicematrix_qpoint:n { row - \l_tmpa_tl }
                 \dim_set:Nn \l__nicematrix_tmpd_dim { \pgf at y + 0.5 \arrayrulewidth }
@@ -4851,11 +4846,11 @@
   }
 \cs_new_protected:Npn \__nicematrix_test_in_corner_v:
    {
-     \int_compare:nNnTF \l_tmpb_tl = { \__nicematrix_succ:n \c at jCol }
+     \int_compare:nNnTF \l_tmpb_tl = { \int_eval:n { \c at jCol + 1 } }
        {
          \seq_if_in:NxT
            \l__nicematrix_corners_cells_seq
-           { \l_tmpa_tl - \__nicematrix_pred:n \l_tmpb_tl }
+           { \l_tmpa_tl - \int_eval:n { \l_tmpb_tl - 1 } }
            { \bool_set_false:N \g_tmpa_bool }
        }
        {
@@ -4868,7 +4863,7 @@
                {
                  \seq_if_in:NxT
                    \l__nicematrix_corners_cells_seq
-                   { \l_tmpa_tl - \__nicematrix_pred:n \l_tmpb_tl }
+                   { \l_tmpa_tl - \int_eval:n { \l_tmpb_tl - 1 } }
                    { \bool_set_false:N \g_tmpa_bool }
                }
            }
@@ -4976,7 +4971,7 @@
       }
       {
         \bool_if:nTF { \l__nicematrix_NiceArray_bool && ! \l__nicematrix_except_borders_bool }
-          { \__nicematrix_succ:n \c at jCol }
+          { \int_eval:n { \c at jCol + 1 } }
           \c at jCol
       }
       {
@@ -5032,11 +5027,11 @@
   }
 \cs_new_protected:Npn \__nicematrix_test_in_corner_h:
    {
-     \int_compare:nNnTF \l_tmpa_tl = { \__nicematrix_succ:n \c at iRow }
+     \int_compare:nNnTF \l_tmpa_tl = { \int_eval:n { \c at iRow + 1 } }
        {
          \seq_if_in:NxT
            \l__nicematrix_corners_cells_seq
-           { \__nicematrix_pred:n \l_tmpa_tl - \l_tmpb_tl }
+           { \int_eval:n { \l_tmpa_tl - 1 } - \l_tmpb_tl }
            { \bool_set_false:N \g_tmpa_bool }
        }
        {
@@ -5049,7 +5044,7 @@
                {
                  \seq_if_in:NxT
                    \l__nicematrix_corners_cells_seq
-                   { \__nicematrix_pred:n \l_tmpa_tl - \l_tmpb_tl }
+                   { \int_eval:n { \l_tmpa_tl - 1 } - \l_tmpb_tl }
                    { \bool_set_false:N \g_tmpa_bool }
                }
            }
@@ -5171,7 +5166,7 @@
       }
       {
         \bool_if:nTF { \l__nicematrix_NiceArray_bool && ! \l__nicematrix_except_borders_bool }
-          { \__nicematrix_succ:n \c at iRow }
+          { \int_eval:n { \c at iRow + 1 } }
           \c at iRow
       }
       {
@@ -5268,15 +5263,17 @@
 \str_const:Nn \c__nicematrix_forbidden_letters_str { lcrpmbVX:|()[]!@<> }
 \keys_define:nn { NiceMatrix / Custom-Line }
   {
-    letter .str_set:N = \l__nicematrix_letter_str ,
+    % here, we will use change in the future to use .tl_set:N
+    letter .code:n = \str_set:Nn \l__nicematrix_letter_str { #1 } ,
     letter .value_required:n = true ,
-    command .str_set:N = \l__nicematrix_command_str ,
+    % here, we will use change in the future to use .tl_set:N
+    command .code:n = \str_set:Nn \l__nicematrix_command_str { #1 } ,
     command .value_required:n = true ,
     multiplicity .int_set:N = \l__nicematrix_tmpc_int ,
     multiplicity .initial:n = 1 ,
     multiplicity .value_required:n = true ,
     color .tl_set:N = \l_tmpa_tl ,
-    color. value_required:n = true ,
+    color .value_required:n = true ,
     tikz .code:n = \bool_set_true:N \l_tmpa_bool ,
     width .code:n = \dim_set:Nn \l__nicematrix_rule_width_dim { #1 }
                     \bool_set_true:N \l_tmpb_bool ,
@@ -5310,7 +5307,7 @@
           { \skip_horizontal:n { \dim_use:N \l__nicematrix_rule_width_dim } }
       }
      \tl_gput_right:Nx \g__nicematrix_internal_code_after_tl
-      { \__nicematrix_vline:n { #1 , position = \__nicematrix_succ:n \c at jCol } }
+      { \__nicematrix_vline:n { #1 , position = \int_eval:n { \c at jCol + 1 } } }
   }
 \cs_new_protected:Npn \__nicematrix_test_hline_in_block:nnnnn #1 #2 #3 #4
   {
@@ -5456,13 +5453,13 @@
   }
 \cs_new_protected:Npn \__nicematrix_test_if_cell_in_block:nnnnnnn #1 #2 #3 #4 #5 #6 #7
   {
-    \int_compare:nNnT { #3 } < { \__nicematrix_succ:n { #1 } }
+    \int_compare:nNnT { #3 } < { \int_eval:n { #1 + 1 } }
       {
-        \int_compare:nNnT { #1 } < { \__nicematrix_succ:n { #5 } }
+        \int_compare:nNnT { #1 } < { \int_eval:n { #5 + 1 } }
           {
-            \int_compare:nNnT { #4 } < { \__nicematrix_succ:n { #2 } }
+            \int_compare:nNnT { #4 } < { \int_eval:n { #2 + 1 } }
               {
-                \int_compare:nNnT { #2 } < { \__nicematrix_succ:n { #6 } }
+                \int_compare:nNnT { #2 } < { \int_eval:n { #6 + 1 } }
                   { \bool_set_true:N \l_tmpb_bool }
               }
           }
@@ -5639,11 +5636,11 @@
           {
             (
               \dim_use:c { l__nicematrix_row _ \__nicematrix_i: _ min _ dim } +
-              \dim_use:c { l__nicematrix_row _ \__nicematrix_succ:n \__nicematrix_i: _ max _ dim }
+              \dim_use:c { l__nicematrix_row _ \int_eval:n { \__nicematrix_i: + 1 }  _ max _ dim }
             )
             / 2
           }
-        \dim_set_eq:cc { l__nicematrix_row _ \__nicematrix_succ:n \__nicematrix_i: _ max _ dim }
+        \dim_set_eq:cc { l__nicematrix_row _ \int_eval:n { \__nicematrix_i: + 1 } _ max _ dim }
           { l__nicematrix_row_\__nicematrix_i: _min_dim }
       }
     \int_step_variable:nNn { \c at jCol - 1 } \__nicematrix_j:
@@ -5653,11 +5650,11 @@
             (
               \dim_use:c { l__nicematrix_column _ \__nicematrix_j: _ max _ dim } +
               \dim_use:c
-                { l__nicematrix_column _ \__nicematrix_succ:n \__nicematrix_j: _ min _ dim }
+                { l__nicematrix_column _ \int_eval:n { \__nicematrix_j: + 1 } _ min _ dim }
             )
             / 2
           }
-        \dim_set_eq:cc { l__nicematrix_column _ \__nicematrix_succ:n \__nicematrix_j: _ min _ dim }
+        \dim_set_eq:cc { l__nicematrix_column _ \int_eval:n { \__nicematrix_j: + 1 } _ min _ dim }
           { l__nicematrix_column _ \__nicematrix_j: _ max _ dim }
       }
     \dim_sub:cn
@@ -5978,7 +5975,7 @@
     color .value_required:n = true ,
     borders .clist_set:N = \l__nicematrix_borders_clist ,
     borders .value_required:n = true ,
-    hvlines .meta:n = { vlines = #1 , hlines = #1 } ,
+    hvlines .meta:n = { vlines , hlines } ,
     vlines .bool_set:N = \l__nicematrix_vlines_block_bool,
     vlines .default:n = true ,
     hlines .bool_set:N = \l__nicematrix_hlines_block_bool,
@@ -6009,6 +6006,9 @@
     name .initial:n = ,
     respect-arraystretch .bool_set:N = \l__nicematrix_respect_arraystretch_bool ,
     respect-arraystretch .default:n = true ,
+    v-center .bool_set:N = \l__nicematrix_v_center_bool ,
+    v-center .default:n = true ,
+    v-center .initial:n = false ,
     unknown .code:n = \__nicematrix_error:n { Unknown~key~for~Block }
   }
 \cs_new_protected:Npn \__nicematrix_draw_blocks:
@@ -6050,6 +6050,14 @@
   {
     \group_begin:
     \keys_set:nn { NiceMatrix / Block / SecondPass } { #5 }
+    \bool_if:NT \l__nicematrix_v_center_bool
+      {
+        \int_compare:nNnF { #1 } = { #3 }
+          {
+            \__nicematrix_error:n { Wrong~use~of~v-center }
+            \bool_set_false:N \l__nicematrix_v_center_bool
+          }
+      }
     \bool_if:NT \l__nicematrix_vlines_block_bool
       {
         \tl_gput_right:Nx \g_nicematrix_code_after_tl
@@ -6144,9 +6152,9 @@
       \dim_set_eq:NN \l_tmpa_dim \pgf at y
       \__nicematrix_qpoint:n { col - #2 }
       \dim_set_eq:NN \l_tmpb_dim \pgf at x
-      \__nicematrix_qpoint:n { row - \__nicematrix_succ:n { \l__nicematrix_last_row_int } }
+      \__nicematrix_qpoint:n { row - \int_eval:n { \l__nicematrix_last_row_int + 1 } }
       \dim_set_eq:NN \l__nicematrix_tmpc_dim \pgf at y
-      \__nicematrix_qpoint:n { col - \__nicematrix_succ:n { \l__nicematrix_last_col_int } }
+      \__nicematrix_qpoint:n { col - \int_eval:n { \l__nicematrix_last_col_int + 1 } }
       \dim_set_eq:NN \l__nicematrix_tmpd_dim \pgf at x
       \__nicematrix_pgf_rect_node:nnnnn
         { \__nicematrix_env: - #1 - #2 - block }
@@ -6200,7 +6208,7 @@
             }
           \dim_compare:nNnT \l__nicematrix_tmpd_dim = { - \c_max_dim }
             {
-              \__nicematrix_qpoint:n { col - \__nicematrix_succ:n { \l__nicematrix_last_col_int } }
+              \__nicematrix_qpoint:n { col - \int_eval:n { \l__nicematrix_last_col_int + 1 } }
               \dim_set_eq:NN \l__nicematrix_tmpd_dim \pgf at x
             }
           \__nicematrix_pgf_rect_node:nnnnn
@@ -6221,7 +6229,8 @@
               { south~east }
           }
       }
-    \int_compare:nNnTF { #1 } = { #3 }
+    \bool_if:nTF
+      { \int_compare_p:nNn { #1 } = { #3 } && ! \l__nicematrix_v_center_bool }
       {
         \int_compare:nNnTF { #1 } = 0
           { \l__nicematrix_code_for_first_row_tl }
@@ -6339,9 +6348,9 @@
           { \tl_set:Nx \l_tmpa_tl { \int_use:N \c at iRow } }
         \int_compare:nNnT \l_tmpb_tl > \c at jCol
           { \tl_set:Nx \l_tmpb_tl { \int_use:N \c at jCol } }
-        \__nicematrix_qpoint:n { row - \__nicematrix_succ:n \l_tmpa_tl }
+        \__nicematrix_qpoint:n { row - \int_eval:n { \l_tmpa_tl + 1 } }
         \dim_set:Nn \l_tmpa_dim { \pgf at y }
-        \__nicematrix_qpoint:n { col - \__nicematrix_succ:n \l_tmpb_tl }
+        \__nicematrix_qpoint:n { col - \int_eval:n { \l_tmpb_tl + 1 } }
         \dim_set:Nn \l__nicematrix_tmpd_dim { \pgf at x }
         \pgfpathrectanglecorners
           { \pgfpoint \l__nicematrix_tmpc_dim \l_tmpb_dim }
@@ -6379,7 +6388,7 @@
               {
                 position = ##1 ,
                 start = \l__nicematrix_tmpc_tl ,
-                end = \__nicematrix_pred:n \l_tmpa_tl
+                end = \int_eval:n { \l_tmpa_tl - 1 }
               }
           }
       }
@@ -6414,11 +6423,10 @@
     \dim_compare:nNnTF \l__nicematrix_rounded_corners_dim > \c_zero_dim
       { \__nicematrix_error:n { borders~forbidden } }
       {
-        \clist_map_inline:Nn \l__nicematrix_borders_clist
-          {
-            \clist_if_in:nnF { top , bottom , left , right } { ##1 }
-              { \__nicematrix_error:nn { bad~border } { ##1 } }
-          }
+        \tl_clear_new:N \l__nicematrix_borders_tikz_tl
+        \keys_set:nV
+          { NiceMatrix / OnlyForTikzInBorders }
+          \l__nicematrix_borders_clist
         \__nicematrix_cut_on_hyphen:w #2 \q_stop
         \tl_set_eq:NN \l__nicematrix_tmpc_tl \l_tmpa_tl
         \tl_set_eq:NN \l__nicematrix_tmpd_tl \l_tmpb_tl
@@ -6425,22 +6433,46 @@
         \__nicematrix_cut_on_hyphen:w #3 \q_stop
         \tl_set:Nx \l_tmpa_tl { \int_eval:n { \l_tmpa_tl + 1 } }
         \tl_set:Nx \l_tmpb_tl { \int_eval:n { \l_tmpb_tl + 1 } }
-        \pgfpicture
-        \pgfrememberpicturepositiononpagetrue
-        \pgf at relevantforpicturesizefalse
-        \CT at arc@
-        \pgfsetlinewidth { 1.1 \l__nicematrix_line_width_dim }
-        \clist_if_in:NnT \l__nicematrix_borders_clist { right }
-          { \__nicematrix_stroke_vertical:n \l_tmpb_tl }
-        \clist_if_in:NnT \l__nicematrix_borders_clist { left }
-          { \__nicematrix_stroke_vertical:n \l__nicematrix_tmpd_tl }
-        \clist_if_in:NnT \l__nicematrix_borders_clist { bottom }
-          { \__nicematrix_stroke_horizontal:n \l_tmpa_tl }
-        \clist_if_in:NnT \l__nicematrix_borders_clist { top }
-          { \__nicematrix_stroke_horizontal:n \l__nicematrix_tmpc_tl }
-        \endpgfpicture
-     }
+        \__nicematrix_stroke_borders_block_i:
+      }
   }
+\hook_gput_code:nnn { begindocument } { . }
+  {
+    \cs_new_protected:Npx \__nicematrix_stroke_borders_block_i:
+      {
+        \c__nicematrix_pgfortikzpicture_tl
+        \__nicematrix_stroke_borders_block_ii:
+        \c__nicematrix_endpgfortikzpicture_tl
+      }
+  }
+\cs_new_protected:Npn \__nicematrix_stroke_borders_block_ii:
+  {
+    \pgfrememberpicturepositiononpagetrue
+    \pgf at relevantforpicturesizefalse
+    \CT at arc@
+    \pgfsetlinewidth { 1.1 \l__nicematrix_line_width_dim }
+    \clist_if_in:NnT \l__nicematrix_borders_clist { right }
+      { \__nicematrix_stroke_vertical:n \l_tmpb_tl }
+    \clist_if_in:NnT \l__nicematrix_borders_clist { left }
+      { \__nicematrix_stroke_vertical:n \l__nicematrix_tmpd_tl }
+    \clist_if_in:NnT \l__nicematrix_borders_clist { bottom }
+      { \__nicematrix_stroke_horizontal:n \l_tmpa_tl }
+    \clist_if_in:NnT \l__nicematrix_borders_clist { top }
+      { \__nicematrix_stroke_horizontal:n \l__nicematrix_tmpc_tl }
+  }
+\keys_define:nn { NiceMatrix / OnlyForTikzInBorders }
+  {
+    tikz .code:n =
+      \cs_if_exist:NTF \tikzpicture
+        { \tl_set:Nn \l__nicematrix_borders_tikz_tl { #1 } }
+        { \__nicematrix_error:n { tikz~in~borders~without~tikz } } ,
+    tikz .value_required:n = true ,
+    top .code:n = ,
+    bottom .code:n = ,
+    left .code:n = ,
+    right .code:n = ,
+    unknown .code:n = \__nicematrix_error:n { bad~border }
+  }
 \cs_new_protected:Npn \__nicematrix_stroke_vertical:n #1
   {
     \__nicematrix_qpoint:n \l__nicematrix_tmpc_tl
@@ -6448,9 +6480,16 @@
     \__nicematrix_qpoint:n \l_tmpa_tl
     \dim_set:Nn \l__nicematrix_tmpc_dim { \pgf at y + 0.5 \l__nicematrix_line_width_dim }
     \__nicematrix_qpoint:n { #1 }
-    \pgfpathmoveto { \pgfpoint \pgf at x \l_tmpb_dim }
-    \pgfpathlineto { \pgfpoint \pgf at x \l__nicematrix_tmpc_dim }
-    \pgfusepathqstroke
+    \tl_if_empty:NTF \l__nicematrix_borders_tikz_tl
+      {
+        \pgfpathmoveto { \pgfpoint \pgf at x \l_tmpb_dim }
+        \pgfpathlineto { \pgfpoint \pgf at x \l__nicematrix_tmpc_dim }
+        \pgfusepathqstroke
+      }
+      {
+        \use:x { \exp_not:N \draw [ \l__nicematrix_borders_tikz_tl ] }
+          ( \pgf at x , \l_tmpb_dim ) -- ( \pgf at x , \l__nicematrix_tmpc_dim ) ;
+      }
   }
 \cs_new_protected:Npn \__nicematrix_stroke_horizontal:n #1
   {
@@ -6461,9 +6500,16 @@
     \__nicematrix_qpoint:n \l_tmpb_tl
     \dim_set:Nn \l_tmpb_dim { \pgf at x + 0.5 \l__nicematrix_line_width_dim }
     \__nicematrix_qpoint:n { #1 }
-    \pgfpathmoveto { \pgfpoint \l_tmpa_dim \pgf at y }
-    \pgfpathlineto { \pgfpoint \l_tmpb_dim \pgf at y }
-    \pgfusepathqstroke
+    \tl_if_empty:NTF \l__nicematrix_borders_tikz_tl
+      {
+        \pgfpathmoveto { \pgfpoint \l_tmpa_dim \pgf at y }
+        \pgfpathlineto { \pgfpoint \l_tmpb_dim \pgf at y }
+        \pgfusepathqstroke
+      }
+      {
+        \use:x { \exp_not:N \draw [ \l__nicematrix_borders_tikz_tl ] }
+          ( \l_tmpa_dim , \pgf at y ) -- ( \l_tmpb_dim , \pgf at y ) ;
+      }
   }
 \keys_define:nn { NiceMatrix / BlockBorders }
   {
@@ -6470,7 +6516,7 @@
     borders .clist_set:N = \l__nicematrix_borders_clist ,
     rounded-corners .dim_set:N = \l__nicematrix_rounded_corners_dim ,
     rounded-corners .default:n = 4 pt ,
-    line-width .dim_set:N = \l__nicematrix_line_width_dim
+    line-width .dim_set:N = \l__nicematrix_line_width_dim ,
   }
 \cs_new_protected:Npn \__nicematrix_block_tikz:nnnnn #1 #2 #3 #4 #5
   {
@@ -6478,7 +6524,9 @@
     \clist_map_inline:nn { #5 }
       {
         \path [ ##1 ]
-              ( #1 -| #2 ) rectangle ( \__nicematrix_succ:n { #3 } -| \__nicematrix_succ:n { #4 } ) ;
+              ( #1 -| #2 )
+              rectangle
+              ( \int_eval:n { #3 + 1 } -| \int_eval:n { #4 + 1 } ) ;
       }
     \end { tikzpicture }
   }
@@ -6609,9 +6657,9 @@
     \__nicematrix_qpoint:n { col - #2 }
     \dim_set_eq:NN \l_tmpb_dim \pgf at x
     \pgfpathmoveto { \pgfpoint \l_tmpb_dim \l_tmpa_dim }
-    \__nicematrix_qpoint:n { row - \__nicematrix_succ:n { #3 } }
+    \__nicematrix_qpoint:n { row - \int_eval:n { #3 + 1 } }
     \dim_set_eq:NN \l__nicematrix_tmpc_dim \pgf at y
-    \__nicematrix_qpoint:n { col - \__nicematrix_succ:n { #4 } }
+    \__nicematrix_qpoint:n { col - \int_eval:n { #4 + 1 } }
     \dim_set_eq:NN \l__nicematrix_tmpd_dim \pgf at x
     \pgfpathlineto { \pgfpoint \l__nicematrix_tmpd_dim \l__nicematrix_tmpc_dim }
     {
@@ -6680,7 +6728,7 @@
     \pgf at relevantforpicturesizefalse
     \__nicematrix_qpoint:n { row - 1 }
     \dim_set_eq:NN \l__nicematrix_y_initial_dim \pgf at y
-    \__nicematrix_qpoint:n { row - \__nicematrix_succ:n \c at iRow }
+    \__nicematrix_qpoint:n { row - \int_eval:n { \c at iRow + 1 } }
     \dim_set_eq:NN \l__nicematrix_y_final_dim \pgf at y
     \bool_if:nTF { #3 }
       { \dim_set_eq:NN \l_tmpa_dim \c_max_dim }
@@ -7136,6 +7184,8 @@
     yshift .dim_set:N = \l__nicematrix_brace_yshift_dim ,
     yshift .value_required:n = true ,
     yshift .initial:n = \c_zero_dim ,
+    color .tl_set:N = \l_tmpa_tl ,
+    color .value_required:n = true ,
     unknown .code:n = \__nicematrix_error:n { Unknown~key~for~Brace }
   }
 \cs_new_protected:Npn \__nicematrix_brace:nnnnn #1 #2 #3 #4 #5
@@ -7151,7 +7201,9 @@
           { \__nicematrix_error:nn { Construct~too~large } { \OverBrace } }
       }
       {
+        \tl_clear:N \l_tmpa_tl % added the 2022-02-25
         \keys_set:nn { NiceMatrix / Brace } { #4 }
+        \tl_if_empty:NF \l_tmpa_tl { \color { \l_tmpa_tl } } % added the 2022-02-25
         \pgfpicture
         \pgfrememberpicturepositiononpagetrue
         \pgf at relevantforpicturesizefalse
@@ -7390,6 +7442,13 @@
     ~(plus~the~potential~exterior~ones).~
     This~error~is~fatal.
   }
+\__nicematrix_msg_new:nn { hvlines-except-corners }
+  {
+    The~key~'hvlines-except-corners'~is~now~obsolete.~You~should~instead~use~the~
+    keys~'hvlines'~and~'corners'.\\
+    However,~you~can~go~on~for~this~time.~This~message~won't~be~shown~anymore~
+    in~this~document.
+  }
 \__nicematrix_msg_new:nn { last~col~not~used }
   {
     The~key~'last-col'~is~in~force~but~you~have~not~used~that~last~column~
@@ -7506,6 +7565,11 @@
   }
 \__nicematrix_msg_new:nn { empty~environment }
   { Your~\__nicematrix_full_name_env:\ is~empty.~This~error~is~fatal. }
+\__nicematrix_msg_new:nn { Wrong~use~of~v-center }
+  {
+    You~should~not~use~the~key~'v-center'~here~because~your~block~is~not~
+    mono-row.~However,~you~can~go~on.
+  }
 \__nicematrix_msg_new:nn { No~letter~and~no~command }
   {
     Your~use~of~'custom-line'~is~no-op~since~you~don't~have~used~the~
@@ -7573,9 +7637,12 @@
   }
 \__nicematrix_msg_new:nn { bad~border }
   {
-    #1~is~an~incorrect~specification~for~a~border~(in~the~key~
-    'borders'~of~the~command~\token_to_str:N \Block).~The~available~
-    values~are:~left,~right,~top~and~bottom.\\
+    \l_keys_key_str\space~is~an~incorrect~specification~for~a~border~
+    (in~the~key~'borders'~of~the~command~\token_to_str:N \Block).~
+    The~available~values~are:~left,~right,~top~and~bottom~(and~you~can~
+    also~use~the~key~'tikz'
+    \bool_if:nF \c__nicematrix_tikz_loaded_bool
+      {~if~you~load~the~LaTeX~package~'tikz'}).\\
     If~you~go~on,~this~specification~of~border~will~be~ignored.
   }
 \__nicematrix_msg_new:nn { tikz~key~without~tikz }
@@ -7660,6 +7727,12 @@
     You~can~go~on~but~you~will~have~another~error~if~you~actually~
     use~that~custom~line.
   }
+\__nicematrix_msg_new:nn { tikz~in~borders~without~tikz }
+  {
+    You~have~used~the~key~'tikz'~in~a~key~'borders'~(of~a~
+    command~'\token_to_str:N\Block')~but~Tikz~is~not~loaded.~
+    If~you~go~on,~that~key~will~be~ignored.
+  }
 \__nicematrix_msg_new:nn { color~in~custom-line~with~tikz }
   {
     In~a~'custom-line',~you~have~used~both~'tikz'~and~'color',~
@@ -7718,7 +7791,7 @@
     For~a~list~of~the~available~keys,~type~H~<return>.
   }
   {
-    The~available~keys~are~(in~alphabetic~order):~left-shorten,~
+    The~available~keys~are~(in~alphabetic~order):~color,~left-shorten,~
     right-shorten,~shorten~(which~fixes~both~left-shorten~and~
     right-shorten)~and~yshift.
   }



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