texlive[54509] Master/texmf-dist: nicematrix (23mar20)

commits+karl at tug.org commits+karl at tug.org
Mon Mar 23 23:23:38 CET 2020


Revision: 54509
          http://tug.org/svn/texlive?view=revision&revision=54509
Author:   karl
Date:     2020-03-23 23:23:38 +0100 (Mon, 23 Mar 2020)
Log Message:
-----------
nicematrix (23mar20)

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

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

Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2020-03-23 22:23:26 UTC (rev 54508)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2020-03-23 22:23:38 UTC (rev 54509)
@@ -236,7 +236,8 @@
 entendu, pour |\Ldots| et |\Cdots|, c'est une ligne horizontale ; pour |\Vdots|, c'est une ligne verticale et pour
 |\Ddots| et |\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.)
+  l'option |xdots/color| (\textsl{xdots} pour rappeler que cela s'applique à |\Cdots|, |\Ldots|, |Vdots|, etc.) :
+  cf. p.~\pageref{customization}).
 }\par\nobreak   
 
 \bigskip
@@ -529,6 +530,8 @@
 
 \subsection{Personnalisation des lignes en pointillés}
 
+
+\label{customization}
 Les lignes pointillées tracées par |\Ldots|, |\Cdots|, |\Vdots|, |\Ddots|, |\Idots| et |\Hdotsfor| (ainsi que par la
 commande |\line| dans le |code-after| décrite p.~\pageref{line-in-code-after}) peuvent être
 paramétrées par trois options (que l'on met entre crochets après la commande) :
@@ -1045,11 +1048,10 @@
 \label{exterior}
 
 Si elle est présente, la «première rangée» (extérieure) est numérotée par $0$ (et non $1$). Il en est de même pour
-la «première rangée». Dans le cas général, on doit spécifier le numéro de la dernière rangée et de la dernière
-colonne comme valeurs des options |last-row| et |last-col| (si elles sont présentes).
+la «première rangée». 
 
 \begin{Verbatim}
-$\begin{pNiceMatrix}[~emphase#first-row,last-row=5,first-col,last-col=5@,nullify-dots]
+$\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@,nullify-dots]
        & C_1    & \Cdots &        & C_4    &        \\
 L_1    & a_{11} & a_{12} & a_{13} & a_{14} & L_1    \\
 \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
@@ -1059,7 +1061,7 @@
 \end{pNiceMatrix}$
 \end{Verbatim}
 %
-\[\begin{pNiceMatrix}[first-row,last-row=5,first-col,last-col=5,nullify-dots]
+\[\begin{pNiceMatrix}[first-row,last-row,first-col,last-col,nullify-dots]
        & C_1    & \Cdots &        & C_4    &        \\
 L_1    & a_{11} & a_{12} & a_{13} & a_{14} & L_1    \\
 \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
@@ -1077,18 +1079,30 @@
 dernière colonne : ce sera automatiquement (et nécessairement) une colonne |R| pour la première colonne et une
 colonne |L| pour la dernière.
 
-\item Si on utilise un environnement avec préambule explicite et une dernière colonne, on doit utiliser l'option
-|last-col| \emph{sans} valeur. En effet le numéro de la dernière colonne est, dans ce cas, déduit du préambule (qui
-contient nécessairement implicitement l'information du nombre de colonnes non extérieures).
+\item On peut se demander comment \pkg{nicematrix} détermine le nombre de rangées et de colonnes nécessaires à la
+composition de la «dernière rangée» et de la «dernière colonne».
 
-\item Pour une dernière rangée, l'option |last-row| peut en fait être utilisée sans préciser de valeur. Dans ce
-cas, \pkg{nicematrix} détermine, lors de la première compilation, le nombre de rangées rencontrées dans le tableau
-et l'écrit dans le fichier |.aux| pour la prochaine compilation. Dans l'exemple qui suit, l'option |last-row| sera
-utilisée sans valeur explicite.
+\begin{itemize}
+\item Dans le cas d'un environnement avec préambule, comme |{NiceArray}| ou |{pNiceArray}|, le nombre de colonnes
+se déduit évidemment du préambule.
+
+\item Dans le cas où l'option |light-syntax| (cf. p. \pageref{light-syntax}) est utilisée, \pkg{nicematrix} profite
+du fait que cette option nécessite de toutes manières le chargement complet du contenu de l'environnement (d'où
+l'impossibilité de mettre du verbatim dans ce cas-là) avant composition du tableau. L'analyse du contenu de
+l'environnement donne le nombre de rangées (mais pas le nombre de colonnes).
+
+\item Dans les autres cas, \pkg{nicematrix} détermine le nombre de rangées et de colonnes à la première compilation
+et l'écrit dans le fichier |.aux| pour pouvoir l'utiliser à la compilation suivante.
+
+\textsl{Néanmoins, il est possible de donner le numéro de la dernière rangée et le numéro de la dernière colonne en
+arguments des options |last-row| et |last-col| pour ce qui permettra d'accélérer le processus complet de
+compilation.} C'est ce que nous ferons dans la suite.
 \end{itemize}
 
+\end{itemize}
 
 
+
 \bigskip
 On peut contrôler l'apparence de ces rangées et colonnes avec les options |code-for-first-row|,
 |code-for-last-row|, |code-for-first-col| et |code-for-last-col|. Ces options sont des listes de tokens qui seront
@@ -1099,7 +1113,7 @@
                    ~emphase#code-for-first-col@ = \color{blue},
                    ~emphase#code-for-last-row@ = \color{green},
                    ~emphase#code-for-last-col@ = \color{magenta}}
-$\begin{pNiceArray}{CC|CC}[first-row,last-row,first-col,last-col,nullify-dots]
+$\begin{pNiceArray}{CC|CC}[first-row,last-row=6,first-col,last-col,nullify-dots]
        & C_1    & \Cdots &        & C_4    &        \\
 L_1    & a_{11} & a_{12} & a_{13} & a_{14} & L_1    \\
 \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
@@ -1116,7 +1130,7 @@
                    code-for-last-row = \color{green},
                    code-for-last-col = \color{magenta}}
 \begin{displaymath}
-\begin{pNiceArray}{CC|CC}[first-row,last-row,first-col,last-col,nullify-dots]
+\begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
        & C_1    & \multicolumn1C{\Cdots} &        & C_4    &        \\
 L_1    & a_{11} & a_{12} & a_{13} & a_{14} & L_1    \\
 \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
@@ -1751,13 +1765,15 @@
 
 \subsection{L'option light-syntax}
 
-L'option |light-syntax|\footnote{Cette option est inspirée de 
-l'extension \pkg{spalign} de Joseph Rabinoff.} permet d'alléger la saisie des matrices, ainsi que leur lisibilité dans le source TeX.
-Lorsque cette option est activée, on doit utiliser le point-virgule comme marqueur de fin de rangée et séparer les
-colonnes par des espaces. On remarquera toutefois que, comme souvent dans le monde TeX, les espaces après les
-séquences de contrôle ne sont pas comptées et que les éléments entre accolades sont considérés comme un tout.
+\label{light-syntax}
 
+L'option |light-syntax|\footnote{Cette option est inspirée de l'extension \pkg{spalign} de Joseph Rabinoff.} permet
+d'alléger la saisie des matrices, ainsi que leur lisibilité dans le source TeX. Lorsque cette option est activée,
+on doit utiliser le point-virgule comme marqueur de fin de rangée et séparer les colonnes par des espaces ou des
+tabulations. On remarquera toutefois que, comme souvent dans le monde TeX, les espaces après les séquences de
+contrôle ne sont pas comptées et que les éléments entre accolades sont considérés comme un tout.
 
+
 \medskip
 \begin{scope}
 \begin{BVerbatim}[baseline=c,boxwidth=10cm]
@@ -1779,6 +1795,13 @@
 On peut changer le caractère utilisé pour indiquer les fins de rangées avec l'option |end-of-row|. Comme dit
 précédemment, la valeur initiale de ce paramètre est un point-virgule.
 
+\medskip
+Lorsque l'option |light-syntax| est utilisée, il n'est pas possible de mettre d'éléments en verbatim (avec par
+exemple la commande |\verb|) dans les cases du tableau.\footnote{La raison en est que lorsque l'option
+  |light-syntax| est utilisée, le contenu complet de l'environnement est chargé comme un argument de commande TeX.
+  L'environnement ne se comporte plus comme un «vrai» environnement de LaTeX qui se contente d'insérer des
+  commandes avant et après.}
+
 \subsection{Utilisation du type de colonne S de siunitx}
 
 Si l'extension \pkg{siunitx} est chargée (avant ou après \pkg{nicematrix}), il est possible d'utiliser les colonnes
@@ -1831,7 +1854,7 @@
 \newcolumntype{?}{!{\OnlyMainNiceMatrix{\vrule width 1 pt}}}
 
 \begin{BVerbatim}[baseline = c, boxwidth = 10.5cm]
-$\begin{pNiceArray}{CC?CC}[first-row,last-row]
+$\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 \\
@@ -1838,7 +1861,7 @@
 C_1 & C_2 & C_3 & C_4
 \end{pNiceArray}$
 \end{BVerbatim}
-$\begin{pNiceArray}{CC?CC}[first-row,last-row]
+$\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 \\

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

Modified: trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx	2020-03-23 22:23:26 UTC (rev 54508)
+++ trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx	2020-03-23 22:23:38 UTC (rev 54509)
@@ -15,8 +15,8 @@
 %
 % \fi
 % \iffalse
-\def\myfileversion{3.13}
-\def\myfiledate{2020/03/15}
+\def\myfileversion{3.14}
+\def\myfiledate{2020/03/23}
 %
 %
 %<*batchfile>
@@ -248,7 +248,7 @@
 % |\Iddots| diagonal ones. It's possible to change the color of these lines
 % with the option |color|.\footnote{It's also possible to change the color of
 % all theses dotted lines with the option |xdots/color| (\textsl{xdots} to
-% remind that it works for |\Cdots|, |\Ldots|, |\Vdots|, etc.)}\par\nobreak 
+% remind that it works for |\Cdots|, |\Ldots|, |\Vdots|, etc.): cf. p. \pageref{customization}.}\par\nobreak 
 %
 % \bigskip
 % \begin{BVerbatim}[baseline=c,boxwidth=10cm]
@@ -552,7 +552,8 @@
 % \end{scope}
 % 
 % \subsection{Customization of the dotted lines}
-%  
+% 
+% \label{customization} 
 % The dotted lines drawn by |\Ldots|, |\Cdots|, |\Vdots|, |\Ddots|, |\Iddots|
 % and |\Hdotsfor| (and by the command |\line| in the |code-after| which is described
 % in p.~\pageref{line-in-code-after}) may be customized by three options (specified
@@ -1086,13 +1087,11 @@
 % \label{exterior}
 %
 % A potential ``first row'' (exterior) has the number $0$ (and not $1$). Idem
-% for the potential ``first column''. In general cases, one must specify the
-% number of the last row and the number of the last column as values of
-% |last-row| and |last-col|.
+% for the potential ``first column''. 
 % 
 % \begin{Verbatim}
-% $\begin{pNiceMatrix}[~emphase#first-row,last-row=5,first-col,last-col=5@]
-% $\begin{pNiceMatrix}[~emphase#first-row,last-row=5,first-col,last-col=5@,nullify-dots]
+% $\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@]
+% $\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@,nullify-dots]
 %        & C_1    & \Cdots &        & C_4    &        \\
 % L_1    & a_{11} & a_{12} & a_{13} & a_{14} & L_1    \\
 % \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
@@ -1103,7 +1102,7 @@
 % \end{pNiceMatrix}$
 % \end{Verbatim}
 %
-% \[\begin{pNiceMatrix}[first-row,last-row=5,first-col,last-col=5,nullify-dots]
+% \[\begin{pNiceMatrix}[first-row,last-row,first-col,last-col,nullify-dots]
 %        & C_1    & \Cdots &        & C_4    &        \\
 % L_1    & a_{11} & a_{12} & a_{13} & a_{14} & L_1    \\
 % \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
@@ -1120,15 +1119,30 @@
 % its variants), no letter must be given in that preamble for the potential
 % first column and the potential last column: they will automatically (and
 % necessarily) be of type |R| for the first column and |L| for the last one.
-% \item In an environment with an explicit preamble, the option |last-col| must
-% be used \emph{without} value: the number of columns will be automatically
-% computed from the preamble of the array.
-% \item For the potential last row, the option |last-row| may, in fact, be used
-% without value. In this case, \pkg{nicematrix} computes, during the first
-% compilation, the number of rows of the array and writes that information in
-% the |.aux| file for the second run. In the following example, the option
-% |last-row| will be used without value. 
+% \item One may wonder how \pkg{nicematrix} determines the number of rows and
+% columns which are needed for the composition of the ``last row'' and ``last
+% column''.
+% \begin{itemize}
+% \item For the environments with explicit preamble, like |{NiceArray}| and
+% |{pNiceArray}|, the number of columns can obviously be computed from the
+% preamble.
+%
+% \item When the option |light-syntax| (cf. p. \pageref{light-syntax}) is used,
+% \pkg{nicematrix} has, in any case, to load the whole body of the environment
+% (and that's why it's not possible to put verbatim material in the array with
+% the option |light-syntax|). The analysis of this whole body gives the number
+% of rows (but not the number of columns).
+%
+% \item In the other cases, \pkg{nicematrix} compute the number of rows and
+% columns during the first compilation and write the result in the |aux| file
+% for the next run.
+% 
+% \textsl{However, it's possible to provide the number of the last row and the number of
+% the last column as values of the options |last-row| and |last-col|, tending to
+% an acceleration of the whole compilation of the document.} That's what we will
+% do throughout the rest of the document.
 % \end{itemize}
+% \end{itemize}
 % 
 % \bigskip
 % It's possible to control the appearance of these rows and columns with options
@@ -1143,7 +1157,7 @@
 %                    ~emphase#code-for-first-col@ = \color{blue},
 %                    ~emphase#code-for-last-row@ = \color{green},
 %                    ~emphase#code-for-last-col@ = \color{magenta}}
-% $\begin{pNiceArray}{CC|CC}[first-row,last-row,first-col,last-col,nullify-dots]
+% $\begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
 %        & C_1    & \Cdots &        & C_4    &        \\
 % L_1    & a_{11} & a_{12} & a_{13} & a_{14} & L_1    \\
 % \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
@@ -1160,7 +1174,7 @@
 %                    code-for-last-row = \color{green},
 %                    code-for-last-col = \color{magenta}}
 % \begin{displaymath}
-% \begin{pNiceArray}{CC|CC}[first-row,last-row,first-col,last-col,nullify-dots]
+% \begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
 %        & C_1    & \multicolumn1C{\Cdots} &        & C_4    &        \\
 % L_1    & a_{11} & a_{12} & a_{13} & a_{14} & L_1    \\
 % \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
@@ -1608,7 +1622,7 @@
 % \NiceMatrixOptions%
 %  {code-for-last-row = \scriptstyle ~emphase#\rotate@ ,
 %   code-for-last-col = \scriptstyle }
-% $A = \begin{pNiceMatrix}[last-row,last-col=4]
+% $A = \begin{pNiceMatrix}[last-row=4,last-col=4]
 % 1   & 2   & 3   & e_1 \\
 % 4   & 5   & 6   & e_2 \\
 % 7   & 8   & 9   & e_3 \\
@@ -1619,7 +1633,7 @@
 % \NiceMatrixOptions%
 %  {code-for-last-row = \scriptstyle\rotate ,
 %   code-for-last-col = \scriptstyle }%
-% $A = \begin{pNiceMatrix}[last-row,last-col=4]
+% $A = \begin{pNiceMatrix}[last-row=4,last-col=4]
 % 1   & 2   & 3  & e_1 \\
 % 4   & 5   & 6  & e_2 \\
 % 7   & 8   & 9  & e_3 \\
@@ -1823,14 +1837,15 @@
 %
 % \subsection{The option light-syntax}
 %
+% \label{light-syntax}
 % The option |light-syntax|\footnote{This option is inspired by the extension
-% \pkg{spalign} of Joseph Rabinoff.} allow the user to compose the arrays with a
+% \pkg{spalign} of Joseph Rabinoff.} allows the user to compose the arrays with a
 % lighter syntax, which gives a more readable TeX source.
 %
 % When this option is used, one should use the semicolon for the end of a row
-% and a space to separate the columns. However, as usual in the TeX world, the
-% spaces after a control sequence are discarded and the elements between curly
-% braces are considered as a whole.
+% and spaces or tabulations to separate the columns. However, as usual in the
+% TeX world, the spaces after a control sequence are discarded and the elements
+% between curly braces are considered as a whole.
 %
 % \bigskip
 % The following example has been composed with XeLaTeX with \pkg{unicode-math},
@@ -1856,6 +1871,14 @@
 % It's possible to change the character used to mark the end of rows with the
 % option |end-of-row|. As said before, the initial value is a semicolon.
 %
+% \medskip
+% When the option |light-syntax| is used, it is not possible to put verbatim
+% material (for example with the command |\verb|) in the cells of the
+% array.\footnote{The reason is that, when the option |light-syntax| is used,
+% the whole content of the environment is loaded as a TeX argument to be
+% analyzed. The environment doesn't behave in that case as a standard
+% environment of LaTeX which only put TeX commands before and after the content.}
+% 
 % \subsection{Use of the column type S of siunitx}
 %
 % If the package \pkg{siunitx} is loaded (before or after \pkg{nicematrix}),
@@ -1913,7 +1936,7 @@
 % \newcolumntype{?}{!{\OnlyMainNiceMatrix{\vrule width 1 pt}}}
 %
 % \begin{BVerbatim}[baseline = c, boxwidth = 10.5cm]
-% $\begin{pNiceArray}{CC?CC}[first-row,last-row]
+% $\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 \\
@@ -1920,7 +1943,7 @@
 % C_1 & C_2 & C_3 & C_4
 % \end{pNiceArray}$
 % \end{BVerbatim}
-% $\begin{pNiceArray}{CC?CC}[first-row,last-row]
+% $\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 \\
@@ -2249,12 +2272,12 @@
 %
 % \vspace{2cm}
 %
-% An example with |\Iddots|. We have raised even more the value of
-% |xdots/shorten|.\par\nobreak 
+% An example with |\Iddots| (we have raised again the value of
+% |xdots/shorten|).\par\nobreak  
 %
 % \bigskip
 % \begin{BVerbatim}[baseline=c]
-% $\begin{pNiceMatrix}[~emphase#xdots/shorten=0.9em@]
+% $\begin{pNiceMatrix}[xdots/shorten=0.9em]
 % 1       & \Cdots  &         & 1      \\
 % \Vdots  &         &         & 0      \\
 %         & ~emphase#\Iddots@ & ~emphase#\Iddots@ & \Vdots \\
@@ -2262,7 +2285,7 @@
 % \end{pNiceMatrix}$
 % \end{BVerbatim}
 % \hspace{4cm}
-% $\begin{pNiceMatrix}[xdots/shorten=0.9em] 
+% $\begin{pNiceMatrix}[xdots/shorten=0.9em]
 % 1       & \Cdots  &         & 1      \\
 % \Vdots  &         &         & 0      \\
 %         & \Iddots & \Iddots & \Vdots \\
@@ -3338,14 +3361,24 @@
 \bool_new:N \l_@@_last_row_without_value_bool
 %    \end{macrocode}
 %
+% \smallskip
+% Idem for |\l_@@_last_col_without_value_bool|
+%    \begin{macrocode}
+\bool_new:N \l_@@_last_col_without_value_bool
+%    \end{macrocode}
+% 
 % \medskip
 % \item \textbf{Last column}\par\nobreak
 %
-% For the eventual ``last column'', we use an integer. A value of $-1$ means
-% that there is no last column.
+% For the eventual ``last column'', we use an integer. A value of $-2$ means
+% that there is no last column. A value of $-1$ means that there is a last
+% column but we don't know its value because the user has used the option
+% |last-col| without value (it's possible in an environment without preamble
+% like |{pNiceMatrix}|). A value of $0$ means that the option |last-col| has
+% been used in an environment with preamble (like |{pNiceArray}|).
 %    \begin{macrocode}
 \int_new:N \l_@@_last_col_int
-\int_set:Nn \l_@@_last_col_int { -1 }
+\int_set:Nn \l_@@_last_col_int { -2 }
 %    \end{macrocode}
 %
 % However, we have also a boolean. Consider the following code: 
@@ -3489,9 +3522,79 @@
 % The following command is only for efficiency. It 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 \@@_succ:n #1 { \the \numexpr #1 + 1 \relax }
+\cs_new:Npn \@@_pred:n #1 { \the \numexpr #1 - 1 \relax }
 %    \end{macrocode}
 % 
+% \subsection*{Command for creation of rectangle nodes}
+%
+% 
+% The following command should be used in a |{pgfpicture}|. It creates an
+% rectangular (empty but with a name) when the four corners are given.
+% 
+% |#1| is the name of the node which will be created;
+% |#2| and |#3| are the coordinates of one of the corner of the rectangle;
+% |#4| and |#5| are the coordinates of the opposite corner.
+%   \begin{macrocode}
+\cs_new_protected:Npn \@@_pgf_rect_node:nnnnn #1 #2 #3 #4 #5
+  {
+    \begin { pgfscope }
+    \pgfset
+      {
+        outer~sep = \c_zero_dim ,
+        inner~sep = \c_zero_dim ,
+        minimum~size = \c_zero_dim 
+      }
+    \pgftransformshift { \pgfpoint { 0.5 * ( #2 + #4 ) } { 0.5 * ( #3 + #5 ) } } 
+    \pgfnode
+      { rectangle }
+      { center }
+      { 
+        \vbox_to_ht:nn 
+          { \dim_abs:n { #5 - #3 } }
+          { 
+            \vfill
+            \hbox_to_wd:nn { \dim_abs:n { #4 - #2 } } { }
+          }   
+      }
+      { #1 }
+      { }
+    \end { pgfscope }
+  } 
+%    \end{macrocode}
+%
+% \medskip
+% The command |\@@_pgf_rect_node:nnn| is a variant of |\@@_pgr_rect_node:nnnn|:
+% it takes two \textsc{pgf} points as arguments instead of the four dimensions
+% which are the coordinates.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_pgf_rect_node:nnn #1 #2 #3
+  {
+    \begin { pgfscope }
+    \pgfset
+      {
+        outer~sep = \c_zero_dim ,
+        inner~sep = \c_zero_dim ,
+        minimum~size = \c_zero_dim 
+      }
+    \pgftransformshift { \pgfpointscale { 0.5 } { \pgfpointadd { #2 } { #3 } } } 
+    \pgfpointdiff { #3 } { #2 }
+    \pgfgetlastxy \l_tmpa_dim \l_tmpb_dim 
+    \pgfnode
+      { rectangle }
+      { center }
+      { 
+        \vbox_to_ht:nn 
+          { \dim_abs:n \l_tmpb_dim }
+          { \vfill \hbox_to_wd:nn { \dim_abs:n \l_tmpa_dim } { } } 
+      }
+      { #1 }
+      { }
+    \end { pgfscope }
+  }
+%    \end{macrocode}
+%
+%
 % \bigskip 
 % \subsection*{The options}
 % 
@@ -3566,7 +3669,7 @@
 %    \end{macrocode}
 %
 % \bigskip
-% The boolean |\l_@@_extra_medium_bool| will be used to indicate whether the
+% The boolean |\l_@@_medium_nodes_bool| will be used to indicate whether the
 % ``medium nodes'' are created in the array. Idem for the ``large nodes''.
 %    \begin{macrocode}
 \bool_new:N \l_@@_medium_nodes_bool
@@ -3876,7 +3979,10 @@
 \keys_define:nn { NiceMatrix / NiceMatrix }
   { 
     last-col .code:n = \tl_if_empty:nTF {#1}
-                         { \@@_error:n { last-col~empty~for~NiceMatrix } }
+                         {  
+                           \bool_set_true:N \l_@@_last_col_without_value_bool
+                           \int_set:Nn \l_@@_last_col_int { -1 }
+                         }
                          { \int_set:Nn \l_@@_last_col_int { #1 } } ,
     l .code:n = \tl_set:Nn \l_@@_type_of_col_tl L ,
     r .code:n = \tl_set:Nn \l_@@_type_of_col_tl R ,
@@ -4255,7 +4361,7 @@
       {
         \pgfpicture 
         \pgfrememberpicturepositiononpagetrue
-        \pgfcoordinate { \@@_env: - row - \@@_succ:N \c at iRow }  
+        \pgfcoordinate { \@@_env: - row - \@@_succ:n \c at iRow }  
           \pgfpointorigin 
         \str_if_empty:NF \l_@@_name_str
           {
@@ -4681,6 +4787,35 @@
       }
 %    \end{macrocode}
 %
+%
+% A value of $-1$ for the counter |\l_@@_last_col_int| means that the user has
+% used the option |last-col| without value (it's possible in an environment
+% without preamble like |{NiceMatrix}| or |{pNiceMatrix}|), that is to say
+% without specifying the number of that last column. In this case, we try to
+% read that value from the |aux| file (if it has been written on a previous
+% run).
+%    \begin{macrocode}
+    \int_compare:nNnT \l_@@_last_col_int = { -1 }
+      {
+        \str_if_empty:NTF \l_@@_name_str
+          {
+            \cs_if_exist:cT { @@_last_col_ \int_use:N \g_@@_env_int } 
+              { 
+                \int_set:Nn \l_@@_last_col_int 
+                  { \use:c { @@_last_col_ \int_use:N \g_@@_env_int } }
+              }  
+          }
+          {
+            \cs_if_exist:cT { @@_last_col_ \l_@@_name_str } 
+              { 
+                \int_set:Nn \l_@@_last_col_int 
+                  { \use:c { @@_last_col_ \l_@@_name_str } }
+              }  
+          }
+      }
+%    \end{macrocode}
+% 
+% \interitem
 % The code in |\@@_pre_array:| is used only by |{NiceArrayWithDelims}|. 
 %    \begin{macrocode}
     \@@_pre_array:
@@ -5104,6 +5239,13 @@
 % because we have the whole body of the environment in |#1|.
 %    \begin{macrocode}
     \tl_if_empty:nT { #1 } { \@@_fatal:n { empty~environment } }
+    \tl_map_inline:nn { #1 } 
+      {
+        \tl_if_eq:nnT { ##1 } { & }
+          { \@@_fatal:n { ampersand~in~light-syntax } }
+        \tl_if_eq:nnT { ##1 } { \\ }
+          { \@@_fatal:n { double-backslash~in~light-syntax } }
+      }
 %    \end{macrocode}
 % The body of the environment, which is stored in the argument |#1|, is now
 % splitted into items (and \emph{not} tokens) 
@@ -5110,7 +5252,7 @@
 %    \begin{macrocode}
     \seq_gclear_new:N \g_@@_rows_seq
     \tl_set_rescan:Nno \l_@@_end_of_row_tl { } \l_@@_end_of_row_tl
-    \exp_args:NNV \seq_gset_split:Nnn \g_@@_rows_seq \l_@@_end_of_row_tl { #1 } 
+    \exp_args:NNV \seq_gset_split:Nnn \g_@@_rows_seq \l_@@_end_of_row_tl { #1 }
 %    \end{macrocode}
 % If the environment uses the option |last-row| without value (i.e. without
 % saying the number of the rows), we have now the opportunity to know that
@@ -5262,13 +5404,13 @@
 %    \begin{macrocode}
          \pgfpicture
            \pgfrememberpicturepositiononpagetrue
-           \pgfcoordinate { \@@_env: - col - \@@_succ:N \g_tmpa_int } 
+           \pgfcoordinate { \@@_env: - col - \@@_succ:n \g_tmpa_int } 
              \pgfpointorigin 
            \str_if_empty:NF \l_@@_name_str
              {
                \pgfnodealias 
-                 { \@@_env: - col - \@@_succ:N \g_tmpa_int } 
-                 { \l_@@_name_str - col - \@@_succ:N \g_tmpa_int }
+                 { \@@_env: - col - \@@_succ:n \g_tmpa_int } 
+                 { \l_@@_name_str - col - \@@_succ:n \g_tmpa_int }
              }   
          \endpgfpicture  
       }
@@ -5357,8 +5499,7 @@
 %    \begin{macrocode}           
         \bool_gset_true:N \g_@@_last_col_found_bool
         \int_gincr:N \c at jCol
-        \int_gset:Nn \g_@@_col_total_int
-          { \int_max:nn \g_@@_col_total_int \c at jCol }
+        \int_gset_eq:NN \g_@@_col_total_int \c at jCol
 %    \end{macrocode}
 % The contents of the cell is constructed in the box |\l_tmpa_box| because we
 % have to compute some dimensions of this box.
@@ -5517,9 +5658,9 @@
       { 
         * 
           { 
-            \int_compare:nNnTF \l_@@_last_col_int = { -1 }  
+            \int_compare:nNnTF \l_@@_last_col_int < 0
               \c at MaxMatrixCols
-              { \int_eval:n { \l_@@_last_col_int - 1 } }
+              { \@@_pred:n \l_@@_last_col_int }
           } 
           #2
       } 
@@ -5547,15 +5688,40 @@
   { 
     \group_begin:
 %    \end{macrocode}
+% When the option |last-col| is used in the environments with explicit preambles
+% (like |{NiceArray}|, |{pNiceArray}|, etc.) a special type of column is used at
+% the end of the preamble in order to compose the cells in an overlapping
+% position (with |\hbox_overlap_right:n|) but (if |last-col| has been used), we
+% don't have the number of that last column. However, we have to know that
+% number for the color of the potential |\Vdots| drawn in that last column.
+% That's why we fix the correct value of |\l_@@_last_col_int| in that case.
+%    \begin{macrocode}
+    \bool_if:NT \g_@@_last_col_found_bool
+      { \int_set_eq:NN \l_@@_last_col_int \g_@@_col_total_int } 
+%    \end{macrocode}
 %
-% If a last column is announced in the options, but without the value (because
-% we are in an environment with preamble, it's time to fix the real value of
-% |\l_@@_last_col_int|).
+% If we are in an environment without preamble (like |{NiceMatrix}| or
+% |{pNiceMatrix}|) and if the option |last-col| has been used without value
+% we fix the real value of |\l_@@_last_col_int|.
 %    \begin{macrocode}
-    \int_compare:nNnT \l_@@_last_col_int = 0
+    \bool_if:NT \l_@@_last_col_without_value_bool
       {
-        \bool_if:NT \g_@@_last_col_found_bool
-          { \dim_set_eq:NN \l_@@_last_col_int \g_@@_col_total_int }
+        \dim_set_eq:NN \l_@@_last_col_int \g_@@_col_total_int 
+        \iow_shipout:Nn \@mainaux \ExplSyntaxOn 
+        \iow_shipout:Nx \@mainaux 
+          { 
+            \cs_gset:cpn { @@_last_col_ \int_use:N \g_@@_env_int } 
+              { \int_use:N \g_@@_col_total_int }
+          }   
+        \str_if_empty:NF \l_@@_name_str
+          { 
+            \iow_shipout:Nx \@mainaux 
+              { 
+                \cs_gset:cpn { @@_last_col_ \l_@@_name_str } 
+                  { \int_use:N \g_@@_col_total_int }
+              }  
+          }
+        \iow_shipout:Nn \@mainaux \ExplSyntaxOff 
       }
 %    \end{macrocode}
 % 
@@ -5566,26 +5732,33 @@
     \bool_if:NT \l_@@_last_row_without_value_bool
       {
         \dim_set_eq:NN \l_@@_last_row_int \g_@@_row_total_int
-        \iow_now:Nn \@mainaux \ExplSyntaxOn 
-        \iow_now:Nx \@mainaux 
-          { 
-            \cs_gset:cpn { @@_last_row_ \int_use:N \g_@@_env_int } 
-              { \int_use:N \g_@@_row_total_int }
-          }  
 %    \end{macrocode}
+% If the option |light-syntax| is used, we have nothing to write since, in this
+% case, the number of rows is directly determined.
+%    \begin{macrocode}
+        \bool_if:NF \l_@@_light_syntax_bool
+          {
+            \iow_shipout:Nn \@mainaux \ExplSyntaxOn 
+            \iow_shipout:Nx \@mainaux 
+              { 
+                \cs_gset:cpn { @@_last_row_ \int_use:N \g_@@_env_int } 
+                  { \int_use:N \g_@@_row_total_int }
+              }   
+%    \end{macrocode}
 % If the environment has a name, we also write a value based on the name
 % because it's more reliable than a value based on the number of the
 % environment. 
 %    \begin{macrocode}
-        \str_if_empty:NF \l_@@_name_str
-          { 
-            \iow_now:Nx \@mainaux 
+            \str_if_empty:NF \l_@@_name_str
               { 
-                \cs_gset:cpn { @@_last_row_ \l_@@_name_str } 
-                  { \int_use:N \g_@@_row_total_int }
-              }  
+                \iow_shipout:Nx \@mainaux 
+                  { 
+                    \cs_gset:cpn { @@_last_row_ \l_@@_name_str } 
+                      { \int_use:N \g_@@_row_total_int }
+                  }  
+              }
+            \iow_shipout:Nn \@mainaux \ExplSyntaxOff 
           }
-        \iow_now:Nn \@mainaux \ExplSyntaxOff 
       }
 %    \end{macrocode}
 % 
@@ -5644,7 +5817,7 @@
 %    \end{macrocode}
 % The dimension |\l_@@_xdots_shorten_dim| corresponds to the option
 % |xdots/shorten| available to the user. That's why we give a new value
-% according to the current value, and not a absolute value.
+% according to the current value, and not an absolute value.
 %    \begin{macrocode}
         \dim_set:Nn \l_@@_xdots_shorten_dim { 0.6 \l_@@_xdots_shorten_dim }
       }
@@ -6033,7 +6206,7 @@
       { \@@_set_initial_coords_from_anchor:n { base~east } }
     \bool_if:NTF \l_@@_final_open_bool
       {
-        \@@_qpoint: { col - \@@_succ:N \l_@@_final_j_int }
+        \@@_qpoint: { col - \@@_succ:n \l_@@_final_j_int }
         \dim_set_eq:NN \l_@@_x_final_dim \pgf at x 
         \dim_sub:Nn \l_@@_x_final_dim \arraycolsep 
         \@@_qpoint: { row - \int_use:N \l_@@_final_i_int - base }
@@ -6114,7 +6287,7 @@
       { \@@_set_initial_coords_from_anchor:n { mid~east } }
     \bool_if:NTF \l_@@_final_open_bool
       { 
-        \@@_qpoint: { col - \@@_succ:N \l_@@_final_j_int }
+        \@@_qpoint: { col - \@@_succ:n \l_@@_final_j_int }
         \dim_set_eq:NN \l_@@_x_final_dim \pgf at x 
         \dim_sub:Nn \l_@@_x_final_dim \arraycolsep 
       }
@@ -6125,7 +6298,7 @@
       {
         \@@_qpoint: { row - \int_use:N \l_@@_initial_i_int }
         \dim_set_eq:NN \l_tmpa_dim \pgf at y
-        \@@_qpoint: { row - \@@_succ:N \l_@@_initial_i_int }
+        \@@_qpoint: { row - \@@_succ:n \l_@@_initial_i_int }
         \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
       }     
@@ -6212,7 +6385,7 @@
       { \@@_set_initial_coords_from_anchor:n { south } }
     \bool_if:NTF \l_@@_final_open_bool
       { 
-        \@@_qpoint: { row - \@@_succ:N \c at iRow }
+        \@@_qpoint: { row - \@@_succ:n \c at iRow }
         \dim_set_eq:NN \l_@@_y_final_dim \pgf at y 
       }
       { \@@_set_final_coords_from_anchor:n { north } }     
@@ -6222,7 +6395,7 @@
           {
             \@@_qpoint: { col - \int_use:N \l_@@_initial_j_int }
             \dim_set_eq:NN \l_tmpa_dim \pgf at x
-            \@@_qpoint: { col - \@@_succ:N \l_@@_initial_j_int }
+            \@@_qpoint: { col - \@@_succ:n \l_@@_initial_j_int }
             \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
           }
@@ -6310,9 +6483,9 @@
       { \@@_set_initial_coords_from_anchor:n { south~east } }
     \bool_if:NTF \l_@@_final_open_bool
       {
-        \@@_qpoint: { row - \@@_succ:N \l_@@_final_i_int }
+        \@@_qpoint: { row - \@@_succ:n \l_@@_final_i_int }
         \dim_set_eq:NN \l_@@_y_final_dim \pgf at y
-        \@@_qpoint: { col - \@@_succ:N \l_@@_final_j_int }
+        \@@_qpoint: { col - \@@_succ:n \l_@@_final_j_int }
         \dim_set_eq:NN \l_@@_x_final_dim \pgf at x
       }
       { \@@_set_final_coords_from_anchor:n { north~west } }     
@@ -6408,13 +6581,13 @@
       {
         \@@_qpoint: { row - \int_use:N \l_@@_initial_i_int }
         \dim_set_eq:NN \l_@@_y_initial_dim \pgf at y
-        \@@_qpoint: { col - \@@_succ:N \l_@@_initial_j_int }
+        \@@_qpoint: { col - \@@_succ:n \l_@@_initial_j_int }
         \dim_set_eq:NN \l_@@_x_initial_dim \pgf at x
       }
       { \@@_set_initial_coords_from_anchor:n { south~west } }
     \bool_if:NTF \l_@@_final_open_bool
       {
-        \@@_qpoint: { row - \@@_succ:N \l_@@_final_i_int }
+        \@@_qpoint: { row - \@@_succ:n \l_@@_final_i_int }
         \dim_set_eq:NN \l_@@_y_final_dim \pgf at y
         \@@_qpoint: { col - \int_use:N \l_@@_final_j_int }
         \dim_set_eq:NN \l_@@_x_final_dim \pgf at x
@@ -6548,16 +6721,25 @@
             }
         }
 %    \end{macrocode}
-% We draw only if the length is not equal to zero (in fact, in the first
-% compilation, the length may be equal to zero when the command |\line| is used). 
+% It seems that, during the first compilations, the value of |\l_@@_l_dim| may
+% be erroneous (equal to zero or very large). We must detect these cases
+% because they would cause errors during the drawing of the dotted line. Maybe
+% we should also write something in the |aux| file to say that one more
+% compilation should be done.
 %    \begin{macrocode}
-      \dim_compare:nNnF \l_@@_l_dim = \c_zero_dim \@@_actually_draw_line: 
+      \bool_lazy_or:nnF 
+        { \dim_compare_p:nNn { \dim_abs:n \l_@@_l_dim } > \c_@@_max_l_dim }
+        { \dim_compare_p:nNn \l_@@_l_dim = \c_zero_dim }
+        \@@_actually_draw_line: 
     \group_end:
   } 
 %    \end{macrocode}
 %
-%
 %    \begin{macrocode}
+\dim_const:Nn \c_@@_max_l_dim { 50 cm }
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
 \cs_new_protected:Npn \@@_actually_draw_line:
   { 
 %    \end{macrocode}
@@ -6593,7 +6775,7 @@
             \int_set:Nn \l_tmpa_int 
               { 
                 \dim_ratio:nn 
-                  { \l_@@_l_dim - ( 2 \l_@@_xdots_shorten_dim ) } 
+                  { \l_@@_l_dim - 2 \l_@@_xdots_shorten_dim  } 
                   \l_@@_inter_dots_dim
               }
           }
@@ -6768,8 +6950,8 @@
 % |{NiceArrayWithDelims}|. This command uses an optional argument (as does
 % |\hdotsfor|) but this argument is discarded (in |\hdotsfor|, this argument is 
 % used for fine tuning of the space between two consecutive dots). Tikz nodes
-% are created for all the cells of the array, even the implicit cells of the
-% |\Hdotsfor|.
+% are created also the implicit cells of the |\Hdotsfor| (maybe we should modify
+% that point).
 %
 % \medskip
 % This command must \emph{not} be protected since it begins with |\multicolumn|. 
@@ -7142,7 +7324,7 @@
     \@@_qpoint: {row - 1 }
     \dim_set_eq:NN \l_tmpa_dim \pgf at y
     \pgfusepathqfill
-    \@@_qpoint: { row - \@@_succ:N \c at iRow } 
+    \@@_qpoint: { row - \@@_succ:n \c at iRow } 
     \dim_sub:Nn \l_tmpa_dim \pgf at y 
     \pgfusepathqfill
 %    \end{macrocode}
@@ -7157,9 +7339,9 @@
 % We adjust the value of |\l_tmpa_dim| by the width of the horizontal rule just 
 % before the ``last row''.
 %    \begin{macrocode}
-        \@@_qpoint: { row - \@@_succ:N\c at iRow } 
+        \@@_qpoint: { row - \@@_succ:n\c at iRow } 
         \dim_add:Nn \l_tmpa_dim \pgf at y
-        \@@_qpoint: { row - \@@_succ:N \g_@@_row_total_int } 
+        \@@_qpoint: { row - \@@_succ:n \g_@@_row_total_int } 
         \dim_sub:Nn \l_tmpa_dim \pgf at y
         \dim_sub:Nn \l_tmpa_dim \l_tmpb_dim
        }
@@ -7169,7 +7351,7 @@
 %    \begin{macrocode}
     \int_step_inline:nnn 
       { \bool_if:NTF \l_@@_NiceArray_bool 1 2 } 
-      { \bool_if:NTF \l_@@_NiceArray_bool { \@@_succ:N \c at jCol } \c at jCol } 
+      { \bool_if:NTF \l_@@_NiceArray_bool { \@@_succ:n \c at jCol } \c at jCol } 
       {          
         \pgfpathmoveto
           {
@@ -7345,7 +7527,7 @@
     \@@_qpoint: { col - 1 } 
     \dim_set:Nn \l_@@_x_initial_dim 
       { \pgf at x + \arraycolsep - \l_@@_left_margin_dim } 
-    \@@_qpoint: { col - \@@_succ:N \c at jCol } 
+    \@@_qpoint: { col - \@@_succ:n \c at jCol } 
     \dim_set:Nn \l_@@_x_final_dim 
       { \pgf at x - \arraycolsep + \l_@@_right_margin_dim }
 %    \end{macrocode}
@@ -7429,7 +7611,7 @@
 % |\l_@@_inter_dots_dim| in order to improve the visual impact.
 %    \begin{macrocode}
     \dim_set:Nn \l_@@_y_initial_dim { \pgf at y - 0.5 \l_@@_inter_dots_dim }  
-    \@@_qpoint: { row - \@@_succ:N \c at iRow } 
+    \@@_qpoint: { row - \@@_succ:n \c at iRow } 
     \dim_set:Nn \l_@@_y_final_dim { \pgf at y + 0.5 \l_@@_inter_dots_dim } 
 %    \end{macrocode}
 % As for now, we have no option to control the style of the lines drawn by
@@ -7494,8 +7676,8 @@
   { 
     \bool_if:NT \l_@@_block_auto_columns_width_bool
       {
-        \iow_now:Nn \@mainaux \ExplSyntaxOn
-        \iow_now:Nx \@mainaux         
+        \iow_shipout:Nn \@mainaux \ExplSyntaxOn
+        \iow_shipout:Nx \@mainaux         
           { 
             \cs_gset:cpn 
               { @@ _ max _ cell _ width _ \int_use:N \g_@@_NiceMatrixBlock_int } 
@@ -7505,7 +7687,7 @@
 %    \begin{macrocode}
               { \dim_eval:n { \g_@@_max_cell_width_dim + \arrayrulewidth } }
           }
-        \iow_now:Nn \@mainaux \ExplSyntaxOff
+        \iow_shipout:Nn \@mainaux \ExplSyntaxOff
       }
   }
 %    \end{macrocode}
@@ -7576,9 +7758,9 @@
         \int_step_variable:nnNn 
           \l_@@_first_col_int \g_@@_col_total_int \@@_j: 
 %    \end{macrocode}
-% Maybe the cell ($i$-$j$) is an implicit cell (that is to say a cell after
-% implicit ampersands |&|). In this case, of course, we don't update the
-% dimensions we want to compute. 
+% If the cell ($i$-$j$) is empty or an implicit cell (that is to say a cell
+% after implicit ampersands |&|) we don't update the dimensions we want to
+% compute.
 %    \begin{macrocode}
           { 
             \cs_if_exist:cT 
@@ -7588,9 +7770,7 @@
 % the cell ($i$-$j$). They will be stored in |\pgf at x| and |\pgf at y|.
 %    \begin{macrocode}
               {
-                \pgfpointanchor
-                  { \@@_env: - \@@_i: - \@@_j: } 
-                  { south~west }
+                \pgfpointanchor { \@@_env: - \@@_i: - \@@_j: } { south~west }
                 \dim_set:cn { l_@@_row_\@@_i: _min_dim}
                   { \dim_min:vn { l_@@_row _ \@@_i: _min_dim } \pgf at y }  
                 \seq_if_in:NxF \g_@@_multicolumn_cells_seq { \@@_i: - \@@_j: }
@@ -7602,9 +7782,7 @@
 % We retrieve the coordinates of the anchor |north east| of the (normal) node of
 % the cell ($i$-$j$). They will be stored in |\pgf at x| and |\pgf at y|.
 %    \begin{macrocode}
-                \pgfpointanchor
-                  { \@@_env: - \@@_i: - \@@_j: } 
-                  { north~east }
+                \pgfpointanchor { \@@_env: - \@@_i: - \@@_j: } { north~east }
                 \dim_set:cn { l_@@_row _ \@@_i: _ max_dim }
                   { \dim_max:vn { l_@@_row _ \@@_i: _ max_dim } \pgf at y }
                 \seq_if_in:NxF \g_@@_multicolumn_cells_seq { \@@_i: - \@@_j: }
@@ -7615,6 +7793,30 @@
               }
           }
       }
+%    \end{macrocode}
+% Now, we have to deal with empty rows or empty columns since we don't have
+% created nodes in such rows and columns.
+%    \begin{macrocode}
+    \int_step_variable:nnNn \l_@@_first_row_int \g_@@_row_total_int \@@_i:
+      { 
+        \dim_compare:nNnT 
+          { \dim_use:c { l_@@_row _ \@@_i: _ min _ dim } } = \c_max_dim
+          { 
+            \@@_qpoint: { row - \@@_i: - base }
+            \dim_set:cn { l_@@_row _ \@@_i: _ max _ dim } \pgf at y 
+            \dim_set:cn { l_@@_row _ \@@_i: _ min _ dim } \pgf at y 
+          }
+      }
+    \int_step_variable:nnNn \l_@@_first_col_int \g_@@_col_total_int \@@_j:
+      {
+        \dim_compare:nNnT 
+          { \dim_use:c { l_@@_column _ \@@_j: _ min _ dim } } = \c_max_dim 
+          { 
+            \@@_qpoint: { col - \@@_j: }
+            \dim_set:cn { l_@@_column _ \@@_j: _ max _ dim } \pgf at y 
+            \dim_set:cn { l_@@_column _ \@@_j: _ min _ dim } \pgf at y 
+          }
+      }
   }
 %    \end{macrocode}
 %
@@ -7705,11 +7907,11 @@
           {
             (  
               \dim_use:c { l_@@_row _ \@@_i: _ min _ dim } + 
-              \dim_use:c { l_@@_row _ \int_eval:n { \@@_i: + 1 } _ max _ dim }
+              \dim_use:c { l_@@_row _ \@@_succ:n \@@_i: _ max _ dim }
             ) 
             / 2
           }
-        \dim_set_eq:cc { l_@@_row _ \int_eval:n { \@@_i: + 1 } _ max _ dim } 
+        \dim_set_eq:cc { l_@@_row _ \@@_succ:n \@@_i: _ max _ dim } 
           { l_@@_row_\@@_i: _min_dim } 
       }
     \int_step_variable:nNn { \c at jCol - 1 } \@@_j:
@@ -7717,14 +7919,13 @@
         \dim_set:cn { l_@@_column _ \@@_j: _ max _ dim }  
           { 
             (  
+              \dim_use:c { l_@@_column _ \@@_j: _ max _ dim } + 
               \dim_use:c 
-                { l_@@_column _ \@@_j: _ max _ dim } + 
-              \dim_use:c 
-                { l_@@_column _ \int_eval:n { \@@_j: + 1 } _ min _ dim }
+                { l_@@_column _ \@@_succ:n \@@_j: _ min _ dim }
             ) 
             / 2
           }
-        \dim_set_eq:cc { l_@@_column _ \int_eval:n { \@@_j: + 1 } _ min _ dim }
+        \dim_set_eq:cc { l_@@_column _ \@@_succ:n \@@_j: _ min _ dim }
           { l_@@_column _ \@@_j: _ max _ dim } 
       }
 %     \end{macrocode}
@@ -7939,9 +8140,9 @@
           \dim_set_eq:NN \l_tmpa_dim \pgf at y
           \@@_qpoint: { col - #2 } 
           \dim_set_eq:NN \l_tmpb_dim \pgf at x
-          \@@_qpoint: { row - \@@_succ:N #3 } 
+          \@@_qpoint: { row - \@@_succ:n { #3 } } 
           \dim_set_eq:NN \l_tmpc_dim \pgf at y
-          \@@_qpoint: { col - \@@_succ:N #4 } 
+          \@@_qpoint: { col - \@@_succ:n { #4 } } 
           \dim_set_eq:NN \l_tmpd_dim \pgf at x
 %    \end{macrocode}
 % 
@@ -8149,6 +8350,7 @@
 % Of course, the command |\NiceMatrix| must be defined before such an
 % instruction is executed. 
 %    \begin{macrocode}
+\bool_new:N \c_@@_obsolete_environments_bool
 \keys_define:nn { NiceMatrix / Package }
   {
     renew-dots .bool_set:N = \l_@@_renew_dots_bool ,
@@ -8157,9 +8359,9 @@
     renew-matrix .value_forbidden:n = true ,
     transparent .meta:n = { renew-dots , renew-matrix } ,
     transparent .value_forbidden:n = true,
-    obsolete-environments .code:n = 
-      \@@_msg_redirect_name:nn { Obsolete~environment } { none } ,
-        obsolete-environments .value_forbidden:n = true,
+    obsolete-environments .bool_set:N = \c_@@_obsolete_environments_bool ,
+    obsolete-environments .value_forbidden:n = true ,
+    obsolete-environments .default:n = true ,
     starred-commands .code:n = 
       \@@_msg_redirect_name:nn { starred~commands } { none } ,
     starred-commands .value_forbidden:n = true ,
@@ -8286,6 +8488,23 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\@@_msg_new:nn { ampersand~in~light-syntax }
+  {
+    You~can't~use~an~ampersand~(\token_to_str &)~to~separate~columns~because
+    ~you~have~used~the~option~'light-syntax'.~This~error~is~fatal.
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\@@_msg_new:nn { double-backslash~in~light-syntax }
+  {
+    You~can't~use~\token_to_str:N \\~to~separate~rows~because~you~have~used~ 
+    the~option~'light-syntax'.~You~must~use~the~character~'\l_@@_end_of_row_tl'~
+    (set~by~the~option~'end-of-row').~This~error~is~fatal.
+  }
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
 \@@_msg_new:nn { starred~commands }
   {
     The~starred~versions~of~\token_to_str:N \Cdots,~\token_to_str:N \Ldots,~
@@ -8340,14 +8559,6 @@
   }
 %    \end{macrocode}
 %
-%    \begin{macrocode}
-\@@_msg_new:nn { last-col~empty~for~NiceMatrix }
-  {
-    In~the~\@@_full_name_env:, you~can't~use~the~option~
-    'last-col'~without~value.~You~must~give~the~number~of~that~last~column.\\
-    If~you~go~on~this~option~will~be~ignored.
-  }
-%    \end{macrocode}
 % 
 %    \begin{macrocode}
 \@@_msg_new:nn { Block~too~large }
@@ -8570,218 +8781,95 @@
 % \bigskip
 % \subsection*{Obsolete environments}
 %
-%    \begin{macrocode}
-\@@_msg_new:nn { Obsolete~environment }
-  {
-    The~environment~\{\@currenvir\}~is~obsolete.~You~should~use~#1~instead.~
-    However,~it's~still~possible~to~use~the~environment~\{\@currenvir\}~(for~
-    a~few~months)~by~loading~'nicematrix'~with~the~option~
-    'obsolete-environments'. 
-  }
-%    \end{macrocode}
+% The following environments are loaded only when the package \pkg{nicematrix}
+% has been loaded with the option |obsolete-environments|. However, they will be
+% completly deleted in a future version.
 %
 %    \begin{macrocode} 
-\NewDocumentEnvironment { pNiceArrayC } { }
+\bool_if:NT \c_@@_obsolete_environments_bool
   {
-    \@@_fatal:nn { Obsolete~environment } { the~option~'last-col' } 
-    \int_zero:N \l_@@_last_col_int 
-    \pNiceArray
-  }
-  { \endpNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { bNiceArrayC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } { the~option~'last-col' } 
-    \int_zero:N \l_@@_last_col_int 
-    \bNiceArray
-  }
-  { \endbNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { BNiceArrayC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } { the~option~'last-col' }
-    \int_zero:N \l_@@_last_col_int 
-    \BNiceArray
-  }
-  { \endBNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { vNiceArrayC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } { the~option~'last-col' }
-    \int_zero:N \l_@@_last_col_int 
-    \vNiceArray
-  }
-  { \endvNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { VNiceArrayC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } { the~option~'last-col' }
-    \int_zero:N \l_@@_last_col_int 
-    \VNiceArray
-  }
-  { \endVNiceArray }
-%    \end{macrocode}
-% 
-%    \begin{macrocode} 
-\NewDocumentEnvironment { pNiceArrayRC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } 
-      { the~options~'last-col'~and~'first-row' } 
-    \int_zero:N \l_@@_last_col_int 
-    \int_zero:N \l_@@_first_row_int 
-    \pNiceArray
-  }
-  { \endpNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { bNiceArrayRC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } 
-      { the~options~'last-col'~and~'first-row' } 
-    \int_zero:N \l_@@_last_col_int 
-    \int_zero:N \l_@@_first_row_int 
-    \bNiceArray
-  }
-  { \endbNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { BNiceArrayRC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } 
-      { the~options~'last-col'~and~'first-row' } 
-    \int_zero:N \l_@@_last_col_int 
-    \int_zero:N \l_@@_first_row_int 
-    \BNiceArray
-  }
-  { \endBNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { vNiceArrayRC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } 
-      { the~options~'last-col'~and~'first-row' } 
-    \int_zero:N \l_@@_last_col_int 
-    \int_zero:N \l_@@_first_row_int 
-    \vNiceArray
-  }
-  { \endvNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { VNiceArrayRC } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } 
-      { the~options~'last-col'~and~'first-row' } 
-    \int_zero:N \l_@@_last_col_int 
-    \int_zero:N \l_@@_first_row_int 
-    \VNiceArray
-  }
-  { \endVNiceArray }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { NiceArrayCwithDelims } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } 
-      { the~option~'last-col' }
-    \int_zero:N \l_@@_last_col_int 
-    \NiceArrayWithDelims
-  }
-  { \endNiceArrayWithDelims }
-%    \end{macrocode}
-%
-%    \begin{macrocode} 
-\NewDocumentEnvironment { NiceArrayRCwithDelims } { }
-  {
-    \@@_fatal:nn { Obsolete~environment } 
-      { the~options~'last-col'~and~'first-row' } 
-    \int_zero:N \l_@@_last_col_int 
-    \int_zero:N \l_@@_first_row_int 
-    \NiceArrayWithDelims
-  }
-  { \endNiceArrayWithDelims }
-%    \end{macrocode}
-%
-%
-% \subsection*{Command for creation of rectangle nodes}
-%
-% 
-% The following command should be used in a |{pgfpicture}|. It creates an
-% rectangular (empty but with a name) when the four corners are given.
-% 
-% |#1| is the name of the node which will be created;
-% |#2| and |#3| are the coordinates of one of the corner of the rectangle;
-% |#4| and |#5| are the coordinates of the opposite corner.
-%   \begin{macrocode}
-\cs_new_protected:Npn \@@_pgf_rect_node:nnnnn #1 #2 #3 #4 #5
-  {
-    \begin { pgfscope }
-    \pgfset
+    \NewDocumentEnvironment { pNiceArrayC } { }
       {
-        outer~sep = \c_zero_dim ,
-        inner~sep = \c_zero_dim ,
-        minimum~size = \c_zero_dim 
+        \int_zero:N \l_@@_last_col_int 
+        \pNiceArray
       }
-    \pgftransformshift { \pgfpoint { 0.5 * ( #2 + #4 ) } { 0.5 * ( #3 + #5 ) } } 
-    \pgfnode
-      { rectangle }
-      { center }
-      { 
-        \vbox_to_ht:nn 
-          { \dim_abs:n { #5 - #3 } }
-          { 
-            \vfill
-            \hbox_to_wd:nn { \dim_abs:n { #4 - #2 } } { }
-          }   
+      { \endpNiceArray }
+     \NewDocumentEnvironment { bNiceArrayC } { }
+       {
+         \int_zero:N \l_@@_last_col_int 
+         \bNiceArray
+       }
+       { \endbNiceArray }
+    \NewDocumentEnvironment { BNiceArrayC } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \BNiceArray
       }
-      { #1 }
-      { }
-    \end { pgfscope }
-  } 
-%    \end{macrocode}
-%
-% \medskip
-% The command |\@@_pgf_rect_node:nnn| is a variant of |\@@_pgr_rect_node:nnnn|:
-% it takes two \textsc{pgf} points as arguments instead of the four dimensions
-% which are the coordinates.
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_pgf_rect_node:nnn #1 #2 #3
-  {
-    \begin { pgfscope }
-    \pgfset
+      { \endBNiceArray }
+    \NewDocumentEnvironment { vNiceArrayC } { }
       {
-        outer~sep = \c_zero_dim ,
-        inner~sep = \c_zero_dim ,
-        minimum~size = \c_zero_dim 
+        \int_zero:N \l_@@_last_col_int 
+        \vNiceArray
       }
-    \pgftransformshift { \pgfpointscale { 0.5 } { \pgfpointadd { #2 } { #3 } } } 
-    \pgfpointdiff { #3 } { #2 }
-    \pgfgetlastxy \l_tmpa_dim \l_tmpb_dim 
-    \pgfnode
-      { rectangle }
-      { center }
-      { 
-        \vbox_to_ht:nn 
-          { \dim_abs:n { \l_tmpb_dim } }
-          { \vfill \hbox_to_wd:nn { \dim_abs:n { \l_tmpa_dim } } { } } 
+      { \endvNiceArray }
+    \NewDocumentEnvironment { VNiceArrayC } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \VNiceArray
       }
-      { #1 }
-      { }
-    \end { pgfscope }
+      { \endVNiceArray }
+    \NewDocumentEnvironment { pNiceArrayRC } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \int_zero:N \l_@@_first_row_int 
+        \pNiceArray
+      }
+      { \endpNiceArray }
+    \NewDocumentEnvironment { bNiceArrayRC } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \int_zero:N \l_@@_first_row_int 
+        \bNiceArray
+      }
+      { \endbNiceArray }
+    \NewDocumentEnvironment { BNiceArrayRC } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \int_zero:N \l_@@_first_row_int 
+        \BNiceArray
+      }
+      { \endBNiceArray }
+    \NewDocumentEnvironment { vNiceArrayRC } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \int_zero:N \l_@@_first_row_int 
+        \vNiceArray
+      }
+      { \endvNiceArray }
+    \NewDocumentEnvironment { VNiceArrayRC } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \int_zero:N \l_@@_first_row_int 
+        \VNiceArray
+      }
+      { \endVNiceArray }
+    \NewDocumentEnvironment { NiceArrayCwithDelims } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \NiceArrayWithDelims
+      }
+      { \endNiceArrayWithDelims }
+    \NewDocumentEnvironment { NiceArrayRCwithDelims } { }
+      {
+        \int_zero:N \l_@@_last_col_int 
+        \int_zero:N \l_@@_first_row_int 
+        \NiceArrayWithDelims
+      }
+      { \endNiceArrayWithDelims }
   }
 %    \end{macrocode}
 %
+%
 % 
 % \vspace{1cm}
 % \section{History}
@@ -9060,6 +9148,13 @@
 % The code of \pkg{nicematrix} no longer uses Tikz but only \textsc{pgf}. By
 % default, Tikz is \emph{not} loaded by \pkg{nicematrix}.
 %
+% \subsection*{Changes between versions 3.12 and 3.13}
+% 
+% Correction of a bug (question 60761504 on |stakoverflow|).
+%
+% Best error messages when the user uses |&| or |\\| when |light-syntax| is in
+% force. 
+% 
 % \PrintIndex
 % 
 % \tableofcontents

Modified: trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2020-03-23 22:23:26 UTC (rev 54508)
+++ trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2020-03-23 22:23:38 UTC (rev 54509)
@@ -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{3.13}
-\def\myfiledate{2020/03/15}
+\def\myfileversion{3.14}
+\def\myfiledate{2020/03/23}
 \RequirePackage{pgfcore}
 \usepgfmodule{shapes}
 \RequirePackage{expl3}[2020/02/08]
@@ -160,8 +160,9 @@
 \int_new:N \l__nicematrix_last_row_int
 \int_set:Nn \l__nicematrix_last_row_int { -2 }
 \bool_new:N \l__nicematrix_last_row_without_value_bool
+\bool_new:N \l__nicematrix_last_col_without_value_bool
 \int_new:N \l__nicematrix_last_col_int
-\int_set:Nn \l__nicematrix_last_col_int { -1 }
+\int_set:Nn \l__nicematrix_last_col_int { -2 }
 \bool_new:N \g__nicematrix_last_col_found_bool
 \bool_new:N \c__nicematrix_siunitx_loaded_bool
 \AtBeginDocument
@@ -202,7 +203,57 @@
         \NC at find
       }
   }
-\cs_new:Npn \__nicematrix_succ:N #1 { \the \numexpr #1 + 1 \relax }
+\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_protected:Npn \__nicematrix_pgf_rect_node:nnnnn #1 #2 #3 #4 #5
+  {
+    \begin { pgfscope }
+    \pgfset
+      {
+        outer~sep = \c_zero_dim ,
+        inner~sep = \c_zero_dim ,
+        minimum~size = \c_zero_dim
+      }
+    \pgftransformshift { \pgfpoint { 0.5 * ( #2 + #4 ) } { 0.5 * ( #3 + #5 ) } }
+    \pgfnode
+      { rectangle }
+      { center }
+      {
+        \vbox_to_ht:nn
+          { \dim_abs:n { #5 - #3 } }
+          {
+            \vfill
+            \hbox_to_wd:nn { \dim_abs:n { #4 - #2 } } { }
+          }
+      }
+      { #1 }
+      { }
+    \end { pgfscope }
+  }
+\cs_new_protected:Npn \__nicematrix_pgf_rect_node:nnn #1 #2 #3
+  {
+    \begin { pgfscope }
+    \pgfset
+      {
+        outer~sep = \c_zero_dim ,
+        inner~sep = \c_zero_dim ,
+        minimum~size = \c_zero_dim
+      }
+    \pgftransformshift { \pgfpointscale { 0.5 } { \pgfpointadd { #2 } { #3 } } }
+    \pgfpointdiff { #3 } { #2 }
+    \pgfgetlastxy \l_tmpa_dim \l_tmpb_dim
+    \pgfnode
+      { rectangle }
+      { center }
+      {
+        \vbox_to_ht:nn
+          { \dim_abs:n \l_tmpb_dim }
+          { \vfill \hbox_to_wd:nn { \dim_abs:n \l_tmpa_dim } { } }
+      }
+      { #1 }
+      { }
+    \end { pgfscope }
+  }
 \bool_new:N \l__nicematrix_light_syntax_bool
 \str_new:N \l__nicematrix_baseline_str
 \str_set:Nn \l__nicematrix_baseline_str c
@@ -363,7 +414,10 @@
 \keys_define:nn { NiceMatrix / NiceMatrix }
   {
     last-col .code:n = \tl_if_empty:nTF {#1}
-                         { \__nicematrix_error:n { last-col~empty~for~NiceMatrix } }
+                         {
+                           \bool_set_true:N \l__nicematrix_last_col_without_value_bool
+                           \int_set:Nn \l__nicematrix_last_col_int { -1 }
+                         }
                          { \int_set:Nn \l__nicematrix_last_col_int { #1 } } ,
     l .code:n = \tl_set:Nn \l__nicematrix_type_of_col_tl L ,
     r .code:n = \tl_set:Nn \l__nicematrix_type_of_col_tl R ,
@@ -535,7 +589,7 @@
       {
         \pgfpicture
         \pgfrememberpicturepositiononpagetrue
-        \pgfcoordinate { \__nicematrix_env: - row - \__nicematrix_succ:N \c at iRow }
+        \pgfcoordinate { \__nicematrix_env: - row - \__nicematrix_succ:n \c at iRow }
           \pgfpointorigin
         \str_if_empty:NF \l__nicematrix_name_str
           {
@@ -755,6 +809,24 @@
               }
           }
       }
+    \int_compare:nNnT \l__nicematrix_last_col_int = { -1 }
+      {
+        \str_if_empty:NTF \l__nicematrix_name_str
+          {
+            \cs_if_exist:cT { __nicematrix_last_col_ \int_use:N \g__nicematrix_env_int }
+              {
+                \int_set:Nn \l__nicematrix_last_col_int
+                  { \use:c { __nicematrix_last_col_ \int_use:N \g__nicematrix_env_int } }
+              }
+          }
+          {
+            \cs_if_exist:cT { __nicematrix_last_col_ \l__nicematrix_name_str }
+              {
+                \int_set:Nn \l__nicematrix_last_col_int
+                  { \use:c { __nicematrix_last_col_ \l__nicematrix_name_str } }
+              }
+          }
+      }
     \__nicematrix_pre_array:
     \dim_zero_new:N \l__nicematrix_left_delim_dim
     \dim_zero_new:N \l__nicematrix_right_delim_dim
@@ -983,6 +1055,13 @@
 \NewDocumentEnvironment { __nicematrix-light-syntax } { b }
   {
     \tl_if_empty:nT { #1 } { \__nicematrix_fatal:n { empty~environment } }
+    \tl_map_inline:nn { #1 }
+      {
+        \tl_if_eq:nnT { ##1 } { & }
+          { \__nicematrix_fatal:n { ampersand~in~light-syntax } }
+        \tl_if_eq:nnT { ##1 } { \\ }
+          { \__nicematrix_fatal:n { double-backslash~in~light-syntax } }
+      }
     \seq_gclear_new:N \g__nicematrix_rows_seq
     \tl_set_rescan:Nno \l__nicematrix_end_of_row_tl { } \l__nicematrix_end_of_row_tl
     \exp_args:NNV \seq_gset_split:Nnn \g__nicematrix_rows_seq \l__nicematrix_end_of_row_tl { #1 }
@@ -1061,13 +1140,13 @@
          \skip_horizontal:N \g_tmpa_skip
          \pgfpicture
            \pgfrememberpicturepositiononpagetrue
-           \pgfcoordinate { \__nicematrix_env: - col - \__nicematrix_succ:N \g_tmpa_int }
+           \pgfcoordinate { \__nicematrix_env: - col - \__nicematrix_succ:n \g_tmpa_int }
              \pgfpointorigin
            \str_if_empty:NF \l__nicematrix_name_str
              {
                \pgfnodealias
-                 { \__nicematrix_env: - col - \__nicematrix_succ:N \g_tmpa_int }
-                 { \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 - \__nicematrix_succ:n \g_tmpa_int }
              }
          \endpgfpicture
       }
@@ -1119,8 +1198,7 @@
       {
         \bool_gset_true:N \g__nicematrix_last_col_found_bool
         \int_gincr:N \c at jCol
-        \int_gset:Nn \g__nicematrix_col_total_int
-          { \int_max:nn \g__nicematrix_col_total_int \c at jCol }
+        \int_gset_eq:NN \g__nicematrix_col_total_int \c at jCol
         \hbox_set:Nw \l__nicematrix_cell_box
           \c_math_toggle_token
           \bool_if:NT \l__nicematrix_small_bool \scriptstyle
@@ -1221,9 +1299,9 @@
       {
         *
           {
-            \int_compare:nNnTF \l__nicematrix_last_col_int = { -1 }
+            \int_compare:nNnTF \l__nicematrix_last_col_int < 0
               \c at MaxMatrixCols
-              { \int_eval:n { \l__nicematrix_last_col_int - 1 } }
+              { \__nicematrix_pred:n \l__nicematrix_last_col_int }
           }
           #2
       }
@@ -1237,29 +1315,48 @@
 \cs_new_protected:Npn \__nicematrix_after_array:
   {
     \group_begin:
-    \int_compare:nNnT \l__nicematrix_last_col_int = 0
+    \bool_if:NT \g__nicematrix_last_col_found_bool
+      { \int_set_eq:NN \l__nicematrix_last_col_int \g__nicematrix_col_total_int }
+    \bool_if:NT \l__nicematrix_last_col_without_value_bool
       {
-        \bool_if:NT \g__nicematrix_last_col_found_bool
-          { \dim_set_eq:NN \l__nicematrix_last_col_int \g__nicematrix_col_total_int }
+        \dim_set_eq:NN \l__nicematrix_last_col_int \g__nicematrix_col_total_int
+        \iow_shipout:Nn \@mainaux \ExplSyntaxOn
+        \iow_shipout:Nx \@mainaux
+          {
+            \cs_gset:cpn { __nicematrix_last_col_ \int_use:N \g__nicematrix_env_int }
+              { \int_use:N \g__nicematrix_col_total_int }
+          }
+        \str_if_empty:NF \l__nicematrix_name_str
+          {
+            \iow_shipout:Nx \@mainaux
+              {
+                \cs_gset:cpn { __nicematrix_last_col_ \l__nicematrix_name_str }
+                  { \int_use:N \g__nicematrix_col_total_int }
+              }
+          }
+        \iow_shipout:Nn \@mainaux \ExplSyntaxOff
       }
     \bool_if:NT \l__nicematrix_last_row_without_value_bool
       {
         \dim_set_eq:NN \l__nicematrix_last_row_int \g__nicematrix_row_total_int
-        \iow_now:Nn \@mainaux \ExplSyntaxOn
-        \iow_now:Nx \@mainaux
+        \bool_if:NF \l__nicematrix_light_syntax_bool
           {
-            \cs_gset:cpn { __nicematrix_last_row_ \int_use:N \g__nicematrix_env_int }
-              { \int_use:N \g__nicematrix_row_total_int }
-          }
-        \str_if_empty:NF \l__nicematrix_name_str
-          {
-            \iow_now:Nx \@mainaux
+            \iow_shipout:Nn \@mainaux \ExplSyntaxOn
+            \iow_shipout:Nx \@mainaux
               {
-                \cs_gset:cpn { __nicematrix_last_row_ \l__nicematrix_name_str }
+                \cs_gset:cpn { __nicematrix_last_row_ \int_use:N \g__nicematrix_env_int }
                   { \int_use:N \g__nicematrix_row_total_int }
               }
+            \str_if_empty:NF \l__nicematrix_name_str
+              {
+                \iow_shipout:Nx \@mainaux
+                  {
+                    \cs_gset:cpn { __nicematrix_last_row_ \l__nicematrix_name_str }
+                      { \int_use:N \g__nicematrix_row_total_int }
+                  }
+              }
+            \iow_shipout:Nn \@mainaux \ExplSyntaxOff
           }
-        \iow_now:Nn \@mainaux \ExplSyntaxOff
       }
     \bool_if:NT \l__nicematrix_parallelize_diags_bool
       {
@@ -1528,7 +1625,7 @@
       { \__nicematrix_set_initial_coords_from_anchor:n { base~east } }
     \bool_if:NTF \l__nicematrix_final_open_bool
       {
-        \__nicematrix_qpoint: { col - \__nicematrix_succ:N \l__nicematrix_final_j_int }
+        \__nicematrix_qpoint: { col - \__nicematrix_succ:n \l__nicematrix_final_j_int }
         \dim_set_eq:NN \l__nicematrix_x_final_dim \pgf at x
         \dim_sub:Nn \l__nicematrix_x_final_dim \arraycolsep
         \__nicematrix_qpoint: { row - \int_use:N \l__nicematrix_final_i_int - base }
@@ -1568,7 +1665,7 @@
       { \__nicematrix_set_initial_coords_from_anchor:n { mid~east } }
     \bool_if:NTF \l__nicematrix_final_open_bool
       {
-        \__nicematrix_qpoint: { col - \__nicematrix_succ:N \l__nicematrix_final_j_int }
+        \__nicematrix_qpoint: { col - \__nicematrix_succ:n \l__nicematrix_final_j_int }
         \dim_set_eq:NN \l__nicematrix_x_final_dim \pgf at x
         \dim_sub:Nn \l__nicematrix_x_final_dim \arraycolsep
       }
@@ -1579,7 +1676,7 @@
       {
         \__nicematrix_qpoint: { row - \int_use:N \l__nicematrix_initial_i_int }
         \dim_set_eq:NN \l_tmpa_dim \pgf at y
-        \__nicematrix_qpoint: { row - \__nicematrix_succ:N \l__nicematrix_initial_i_int }
+        \__nicematrix_qpoint: { row - \__nicematrix_succ:n \l__nicematrix_initial_i_int }
         \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
       }
@@ -1627,7 +1724,7 @@
       { \__nicematrix_set_initial_coords_from_anchor:n { south } }
     \bool_if:NTF \l__nicematrix_final_open_bool
       {
-        \__nicematrix_qpoint: { row - \__nicematrix_succ:N \c at iRow }
+        \__nicematrix_qpoint: { row - \__nicematrix_succ:n \c at iRow }
         \dim_set_eq:NN \l__nicematrix_y_final_dim \pgf at y
       }
       { \__nicematrix_set_final_coords_from_anchor:n { north } }
@@ -1637,7 +1734,7 @@
           {
             \__nicematrix_qpoint: { col - \int_use:N \l__nicematrix_initial_j_int }
             \dim_set_eq:NN \l_tmpa_dim \pgf at x
-            \__nicematrix_qpoint: { col - \__nicematrix_succ:N \l__nicematrix_initial_j_int }
+            \__nicematrix_qpoint: { col - \__nicematrix_succ:n \l__nicematrix_initial_j_int }
             \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
           }
@@ -1684,9 +1781,9 @@
       { \__nicematrix_set_initial_coords_from_anchor:n { south~east } }
     \bool_if:NTF \l__nicematrix_final_open_bool
       {
-        \__nicematrix_qpoint: { row - \__nicematrix_succ:N \l__nicematrix_final_i_int }
+        \__nicematrix_qpoint: { row - \__nicematrix_succ:n \l__nicematrix_final_i_int }
         \dim_set_eq:NN \l__nicematrix_y_final_dim \pgf at y
-        \__nicematrix_qpoint: { col - \__nicematrix_succ:N \l__nicematrix_final_j_int }
+        \__nicematrix_qpoint: { col - \__nicematrix_succ:n \l__nicematrix_final_j_int }
         \dim_set_eq:NN \l__nicematrix_x_final_dim \pgf at x
       }
       { \__nicematrix_set_final_coords_from_anchor:n { north~west } }
@@ -1729,13 +1826,13 @@
       {
         \__nicematrix_qpoint: { row - \int_use:N \l__nicematrix_initial_i_int }
         \dim_set_eq:NN \l__nicematrix_y_initial_dim \pgf at y
-        \__nicematrix_qpoint: { col - \__nicematrix_succ:N \l__nicematrix_initial_j_int }
+        \__nicematrix_qpoint: { col - \__nicematrix_succ:n \l__nicematrix_initial_j_int }
         \dim_set_eq:NN \l__nicematrix_x_initial_dim \pgf at x
       }
       { \__nicematrix_set_initial_coords_from_anchor:n { south~west } }
     \bool_if:NTF \l__nicematrix_final_open_bool
       {
-        \__nicematrix_qpoint: { row - \__nicematrix_succ:N \l__nicematrix_final_i_int }
+        \__nicematrix_qpoint: { row - \__nicematrix_succ:n \l__nicematrix_final_i_int }
         \dim_set_eq:NN \l__nicematrix_y_final_dim \pgf at y
         \__nicematrix_qpoint: { col - \int_use:N \l__nicematrix_final_j_int }
         \dim_set_eq:NN \l__nicematrix_x_final_dim \pgf at x
@@ -1808,9 +1905,13 @@
                )
             }
         }
-      \dim_compare:nNnF \l__nicematrix_l_dim = \c_zero_dim \__nicematrix_actually_draw_line:
+      \bool_lazy_or:nnF
+        { \dim_compare_p:nNn { \dim_abs:n \l__nicematrix_l_dim } > \c__nicematrix_max_l_dim }
+        { \dim_compare_p:nNn \l__nicematrix_l_dim = \c_zero_dim }
+        \__nicematrix_actually_draw_line:
     \group_end:
   }
+\dim_const:Nn \c__nicematrix_max_l_dim { 50 cm }
 \cs_new_protected:Npn \__nicematrix_actually_draw_line:
   {
     \bool_if:NTF \l__nicematrix_initial_open_bool
@@ -1843,7 +1944,7 @@
             \int_set:Nn \l_tmpa_int
               {
                 \dim_ratio:nn
-                  { \l__nicematrix_l_dim - ( 2 \l__nicematrix_xdots_shorten_dim ) }
+                  { \l__nicematrix_l_dim - 2 \l__nicematrix_xdots_shorten_dim  }
                   \l__nicematrix_inter_dots_dim
               }
           }
@@ -2130,7 +2231,7 @@
     \__nicematrix_qpoint: {row - 1 }
     \dim_set_eq:NN \l_tmpa_dim \pgf at y
     \pgfusepathqfill
-    \__nicematrix_qpoint: { row - \__nicematrix_succ:N \c at iRow }
+    \__nicematrix_qpoint: { row - \__nicematrix_succ:n \c at iRow }
     \dim_sub:Nn \l_tmpa_dim \pgf at y
     \pgfusepathqfill
     \dim_zero:N \l_tmpb_dim
@@ -2138,15 +2239,15 @@
       {
         \dim_set_eq:NN \l_tmpb_dim \g__nicematrix_dp_last_row_dim
         \dim_add:Nn \l_tmpb_dim \g__nicematrix_ht_last_row_dim
-        \__nicematrix_qpoint: { row - \__nicematrix_succ:N\c at iRow }
+        \__nicematrix_qpoint: { row - \__nicematrix_succ:n\c at iRow }
         \dim_add:Nn \l_tmpa_dim \pgf at y
-        \__nicematrix_qpoint: { row - \__nicematrix_succ:N \g__nicematrix_row_total_int }
+        \__nicematrix_qpoint: { row - \__nicematrix_succ:n \g__nicematrix_row_total_int }
         \dim_sub:Nn \l_tmpa_dim \pgf at y
         \dim_sub:Nn \l_tmpa_dim \l_tmpb_dim
        }
     \int_step_inline:nnn
       { \bool_if:NTF \l__nicematrix_NiceArray_bool 1 2 }
-      { \bool_if:NTF \l__nicematrix_NiceArray_bool { \__nicematrix_succ:N \c at jCol } \c at jCol }
+      { \bool_if:NTF \l__nicematrix_NiceArray_bool { \__nicematrix_succ:n \c at jCol } \c at jCol }
       {
         \pgfpathmoveto
           {
@@ -2222,7 +2323,7 @@
     \__nicematrix_qpoint: { col - 1 }
     \dim_set:Nn \l__nicematrix_x_initial_dim
       { \pgf at x + \arraycolsep - \l__nicematrix_left_margin_dim }
-    \__nicematrix_qpoint: { col - \__nicematrix_succ:N \c at jCol }
+    \__nicematrix_qpoint: { col - \__nicematrix_succ:n \c at jCol }
     \dim_set:Nn \l__nicematrix_x_final_dim
       { \pgf at x - \arraycolsep + \l__nicematrix_right_margin_dim }
     \tl_set:Nn \l_tmpa_tl { ( }
@@ -2263,7 +2364,7 @@
     \dim_set:Nn \l__nicematrix_x_final_dim { \pgf at x - \l__nicematrix_radius_dim }
     \__nicematrix_qpoint: { row - 1 }
     \dim_set:Nn \l__nicematrix_y_initial_dim { \pgf at y - 0.5 \l__nicematrix_inter_dots_dim }
-    \__nicematrix_qpoint: { row - \__nicematrix_succ:N \c at iRow }
+    \__nicematrix_qpoint: { row - \__nicematrix_succ:n \c at iRow }
     \dim_set:Nn \l__nicematrix_y_final_dim { \pgf at y + 0.5 \l__nicematrix_inter_dots_dim }
     \tl_set_eq:NN \l__nicematrix_xdots_line_style_tl \c__nicematrix_standard_tl
     \__nicematrix_draw_line:
@@ -2295,14 +2396,14 @@
   {
     \bool_if:NT \l__nicematrix_block_auto_columns_width_bool
       {
-        \iow_now:Nn \@mainaux \ExplSyntaxOn
-        \iow_now:Nx \@mainaux
+        \iow_shipout:Nn \@mainaux \ExplSyntaxOn
+        \iow_shipout:Nx \@mainaux
           {
             \cs_gset:cpn
               { __nicematrix _ max _ cell _ width _ \int_use:N \g__nicematrix_NiceMatrixBlock_int }
               { \dim_eval:n { \g__nicematrix_max_cell_width_dim + \arrayrulewidth } }
           }
-        \iow_now:Nn \@mainaux \ExplSyntaxOff
+        \iow_shipout:Nn \@mainaux \ExplSyntaxOff
       }
   }
 \cs_generate_variant:Nn \dim_min:nn { v n }
@@ -2331,9 +2432,7 @@
             \cs_if_exist:cT
               { pgf @ sh @ ns @ \__nicematrix_env: - \__nicematrix_i: - \__nicematrix_j: }
               {
-                \pgfpointanchor
-                  { \__nicematrix_env: - \__nicematrix_i: - \__nicematrix_j: }
-                  { south~west }
+                \pgfpointanchor { \__nicematrix_env: - \__nicematrix_i: - \__nicematrix_j: } { south~west }
                 \dim_set:cn { l__nicematrix_row_\__nicematrix_i: _min_dim}
                   { \dim_min:vn { l__nicematrix_row _ \__nicematrix_i: _min_dim } \pgf at y }
                 \seq_if_in:NxF \g__nicematrix_multicolumn_cells_seq { \__nicematrix_i: - \__nicematrix_j: }
@@ -2341,9 +2440,7 @@
                     \dim_set:cn { l__nicematrix_column _ \__nicematrix_j: _min_dim}
                       { \dim_min:vn { l__nicematrix_column _ \__nicematrix_j: _min_dim } \pgf at x }
                   }
-                \pgfpointanchor
-                  { \__nicematrix_env: - \__nicematrix_i: - \__nicematrix_j: }
-                  { north~east }
+                \pgfpointanchor { \__nicematrix_env: - \__nicematrix_i: - \__nicematrix_j: } { north~east }
                 \dim_set:cn { l__nicematrix_row _ \__nicematrix_i: _ max_dim }
                   { \dim_max:vn { l__nicematrix_row _ \__nicematrix_i: _ max_dim } \pgf at y }
                 \seq_if_in:NxF \g__nicematrix_multicolumn_cells_seq { \__nicematrix_i: - \__nicematrix_j: }
@@ -2354,6 +2451,26 @@
               }
           }
       }
+    \int_step_variable:nnNn \l__nicematrix_first_row_int \g__nicematrix_row_total_int \__nicematrix_i:
+      {
+        \dim_compare:nNnT
+          { \dim_use:c { l__nicematrix_row _ \__nicematrix_i: _ min _ dim } } = \c_max_dim
+          {
+            \__nicematrix_qpoint: { row - \__nicematrix_i: - base }
+            \dim_set:cn { l__nicematrix_row _ \__nicematrix_i: _ max _ dim } \pgf at y
+            \dim_set:cn { l__nicematrix_row _ \__nicematrix_i: _ min _ dim } \pgf at y
+          }
+      }
+    \int_step_variable:nnNn \l__nicematrix_first_col_int \g__nicematrix_col_total_int \__nicematrix_j:
+      {
+        \dim_compare:nNnT
+          { \dim_use:c { l__nicematrix_column _ \__nicematrix_j: _ min _ dim } } = \c_max_dim
+          {
+            \__nicematrix_qpoint: { col - \__nicematrix_j: }
+            \dim_set:cn { l__nicematrix_column _ \__nicematrix_j: _ max _ dim } \pgf at y
+            \dim_set:cn { l__nicematrix_column _ \__nicematrix_j: _ min _ dim } \pgf at y
+          }
+      }
   }
 \cs_new_protected:Npn \__nicematrix_create_medium_nodes:
   {
@@ -2399,11 +2516,11 @@
           {
             (
               \dim_use:c { l__nicematrix_row _ \__nicematrix_i: _ min _ dim } +
-              \dim_use:c { l__nicematrix_row _ \int_eval:n { \__nicematrix_i: + 1 } _ max _ dim }
+              \dim_use:c { l__nicematrix_row _ \__nicematrix_succ:n \__nicematrix_i: _ max _ dim }
             )
             / 2
           }
-        \dim_set_eq:cc { l__nicematrix_row _ \int_eval:n { \__nicematrix_i: + 1 } _ max _ dim }
+        \dim_set_eq:cc { l__nicematrix_row _ \__nicematrix_succ:n \__nicematrix_i: _ max _ dim }
           { l__nicematrix_row_\__nicematrix_i: _min_dim }
       }
     \int_step_variable:nNn { \c at jCol - 1 } \__nicematrix_j:
@@ -2411,14 +2528,13 @@
         \dim_set:cn { l__nicematrix_column _ \__nicematrix_j: _ max _ dim }
           {
             (
+              \dim_use:c { l__nicematrix_column _ \__nicematrix_j: _ max _ dim } +
               \dim_use:c
-                { l__nicematrix_column _ \__nicematrix_j: _ max _ dim } +
-              \dim_use:c
-                { l__nicematrix_column _ \int_eval:n { \__nicematrix_j: + 1 } _ min _ dim }
+                { l__nicematrix_column _ \__nicematrix_succ:n \__nicematrix_j: _ min _ dim }
             )
             / 2
           }
-        \dim_set_eq:cc { l__nicematrix_column _ \int_eval:n { \__nicematrix_j: + 1 } _ min _ dim }
+        \dim_set_eq:cc { l__nicematrix_column _ \__nicematrix_succ:n \__nicematrix_j: _ min _ dim }
           { l__nicematrix_column _ \__nicematrix_j: _ max _ dim }
       }
     \dim_sub:cn
@@ -2523,9 +2639,9 @@
           \dim_set_eq:NN \l_tmpa_dim \pgf at y
           \__nicematrix_qpoint: { col - #2 }
           \dim_set_eq:NN \l_tmpb_dim \pgf at x
-          \__nicematrix_qpoint: { row - \__nicematrix_succ:N #3 }
+          \__nicematrix_qpoint: { row - \__nicematrix_succ:n { #3 } }
           \dim_set_eq:NN \l_tmpc_dim \pgf at y
-          \__nicematrix_qpoint: { col - \__nicematrix_succ:N #4 }
+          \__nicematrix_qpoint: { col - \__nicematrix_succ:n { #4 } }
           \dim_set_eq:NN \l_tmpd_dim \pgf at x
           \bool_if:NT \l__nicematrix_white_bool
             {
@@ -2635,6 +2751,7 @@
 \__nicematrix_define_com:nnn v | |
 \__nicematrix_define_com:nnn V \| \|
 \__nicematrix_define_com:nnn B \{ \}
+\bool_new:N \c__nicematrix_obsolete_environments_bool
 \keys_define:nn { NiceMatrix / Package }
   {
     renew-dots .bool_set:N = \l__nicematrix_renew_dots_bool ,
@@ -2643,9 +2760,9 @@
     renew-matrix .value_forbidden:n = true ,
     transparent .meta:n = { renew-dots , renew-matrix } ,
     transparent .value_forbidden:n = true,
-    obsolete-environments .code:n =
-      \__nicematrix_msg_redirect_name:nn { Obsolete~environment } { none } ,
-        obsolete-environments .value_forbidden:n = true,
+    obsolete-environments .bool_set:N = \c__nicematrix_obsolete_environments_bool ,
+    obsolete-environments .value_forbidden:n = true ,
+    obsolete-environments .default:n = true ,
     starred-commands .code:n =
       \__nicematrix_msg_redirect_name:nn { starred~commands } { none } ,
     starred-commands .value_forbidden:n = true ,
@@ -2719,6 +2836,17 @@
     and~'shorten'~(and~you~try~to~use~'\l_keys_key_str').~If~you~go~on,~
     this~option~will~be~ignored.
   }
+\__nicematrix_msg_new:nn { ampersand~in~light-syntax }
+  {
+    You~can't~use~an~ampersand~(\token_to_str &)~to~separate~columns~because
+    ~you~have~used~the~option~'light-syntax'.~This~error~is~fatal.
+  }
+\__nicematrix_msg_new:nn { double-backslash~in~light-syntax }
+  {
+    You~can't~use~\token_to_str:N \\~to~separate~rows~because~you~have~used~
+    the~option~'light-syntax'.~You~must~use~the~character~'\l__nicematrix_end_of_row_tl'~
+    (set~by~the~option~'end-of-row').~This~error~is~fatal.
+  }
 \__nicematrix_msg_new:nn { starred~commands }
   {
     The~starred~versions~of~\token_to_str:N \Cdots,~\token_to_str:N \Ldots,~
@@ -2754,12 +2882,6 @@
     However,~you~can~go~on~for~this~time~
     (the~value~'\l_keys_value_tl'~will~be~ignored).
   }
-\__nicematrix_msg_new:nn { last-col~empty~for~NiceMatrix }
-  {
-    In~the~\__nicematrix_full_name_env:, you~can't~use~the~option~
-    'last-col'~without~value.~You~must~give~the~number~of~that~last~column.\\
-    If~you~go~on~this~option~will~be~ignored.
-  }
 \__nicematrix_msg_new:nn { Block~too~large }
   {
     You~try~to~draw~a~block~in~the~cell~#1-#2~of~your~matrix~but~the~matrix~is~
@@ -2936,158 +3058,86 @@
     and~R~in~the~preamble~of~your~environment. \\
     This~error~is~fatal.
   }
-\__nicematrix_msg_new:nn { Obsolete~environment }
+\bool_if:NT \c__nicematrix_obsolete_environments_bool
   {
-    The~environment~\{\@currenvir\}~is~obsolete.~You~should~use~#1~instead.~
-    However,~it's~still~possible~to~use~the~environment~\{\@currenvir\}~(for~
-    a~few~months)~by~loading~'nicematrix'~with~the~option~
-    'obsolete-environments'.
-  }
-\NewDocumentEnvironment { pNiceArrayC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment } { the~option~'last-col' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \pNiceArray
-  }
-  { \endpNiceArray }
-\NewDocumentEnvironment { bNiceArrayC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment } { the~option~'last-col' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \bNiceArray
-  }
-  { \endbNiceArray }
-\NewDocumentEnvironment { BNiceArrayC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment } { the~option~'last-col' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \BNiceArray
-  }
-  { \endBNiceArray }
-\NewDocumentEnvironment { vNiceArrayC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment } { the~option~'last-col' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \vNiceArray
-  }
-  { \endvNiceArray }
-\NewDocumentEnvironment { VNiceArrayC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment } { the~option~'last-col' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \VNiceArray
-  }
-  { \endVNiceArray }
-\NewDocumentEnvironment { pNiceArrayRC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment }
-      { the~options~'last-col'~and~'first-row' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \int_zero:N \l__nicematrix_first_row_int
-    \pNiceArray
-  }
-  { \endpNiceArray }
-\NewDocumentEnvironment { bNiceArrayRC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment }
-      { the~options~'last-col'~and~'first-row' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \int_zero:N \l__nicematrix_first_row_int
-    \bNiceArray
-  }
-  { \endbNiceArray }
-\NewDocumentEnvironment { BNiceArrayRC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment }
-      { the~options~'last-col'~and~'first-row' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \int_zero:N \l__nicematrix_first_row_int
-    \BNiceArray
-  }
-  { \endBNiceArray }
-\NewDocumentEnvironment { vNiceArrayRC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment }
-      { the~options~'last-col'~and~'first-row' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \int_zero:N \l__nicematrix_first_row_int
-    \vNiceArray
-  }
-  { \endvNiceArray }
-\NewDocumentEnvironment { VNiceArrayRC } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment }
-      { the~options~'last-col'~and~'first-row' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \int_zero:N \l__nicematrix_first_row_int
-    \VNiceArray
-  }
-  { \endVNiceArray }
-\NewDocumentEnvironment { NiceArrayCwithDelims } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment }
-      { the~option~'last-col' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \NiceArrayWithDelims
-  }
-  { \endNiceArrayWithDelims }
-\NewDocumentEnvironment { NiceArrayRCwithDelims } { }
-  {
-    \__nicematrix_fatal:nn { Obsolete~environment }
-      { the~options~'last-col'~and~'first-row' }
-    \int_zero:N \l__nicematrix_last_col_int
-    \int_zero:N \l__nicematrix_first_row_int
-    \NiceArrayWithDelims
-  }
-  { \endNiceArrayWithDelims }
-\cs_new_protected:Npn \__nicematrix_pgf_rect_node:nnnnn #1 #2 #3 #4 #5
-  {
-    \begin { pgfscope }
-    \pgfset
+    \NewDocumentEnvironment { pNiceArrayC } { }
       {
-        outer~sep = \c_zero_dim ,
-        inner~sep = \c_zero_dim ,
-        minimum~size = \c_zero_dim
+        \int_zero:N \l__nicematrix_last_col_int
+        \pNiceArray
       }
-    \pgftransformshift { \pgfpoint { 0.5 * ( #2 + #4 ) } { 0.5 * ( #3 + #5 ) } }
-    \pgfnode
-      { rectangle }
-      { center }
+      { \endpNiceArray }
+     \NewDocumentEnvironment { bNiceArrayC } { }
+       {
+         \int_zero:N \l__nicematrix_last_col_int
+         \bNiceArray
+       }
+       { \endbNiceArray }
+    \NewDocumentEnvironment { BNiceArrayC } { }
       {
-        \vbox_to_ht:nn
-          { \dim_abs:n { #5 - #3 } }
-          {
-            \vfill
-            \hbox_to_wd:nn { \dim_abs:n { #4 - #2 } } { }
-          }
+        \int_zero:N \l__nicematrix_last_col_int
+        \BNiceArray
       }
-      { #1 }
-      { }
-    \end { pgfscope }
-  }
-\cs_new_protected:Npn \__nicematrix_pgf_rect_node:nnn #1 #2 #3
-  {
-    \begin { pgfscope }
-    \pgfset
+      { \endBNiceArray }
+    \NewDocumentEnvironment { vNiceArrayC } { }
       {
-        outer~sep = \c_zero_dim ,
-        inner~sep = \c_zero_dim ,
-        minimum~size = \c_zero_dim
+        \int_zero:N \l__nicematrix_last_col_int
+        \vNiceArray
       }
-    \pgftransformshift { \pgfpointscale { 0.5 } { \pgfpointadd { #2 } { #3 } } }
-    \pgfpointdiff { #3 } { #2 }
-    \pgfgetlastxy \l_tmpa_dim \l_tmpb_dim
-    \pgfnode
-      { rectangle }
-      { center }
+      { \endvNiceArray }
+    \NewDocumentEnvironment { VNiceArrayC } { }
       {
-        \vbox_to_ht:nn
-          { \dim_abs:n { \l_tmpb_dim } }
-          { \vfill \hbox_to_wd:nn { \dim_abs:n { \l_tmpa_dim } } { } }
+        \int_zero:N \l__nicematrix_last_col_int
+        \VNiceArray
       }
-      { #1 }
-      { }
-    \end { pgfscope }
+      { \endVNiceArray }
+    \NewDocumentEnvironment { pNiceArrayRC } { }
+      {
+        \int_zero:N \l__nicematrix_last_col_int
+        \int_zero:N \l__nicematrix_first_row_int
+        \pNiceArray
+      }
+      { \endpNiceArray }
+    \NewDocumentEnvironment { bNiceArrayRC } { }
+      {
+        \int_zero:N \l__nicematrix_last_col_int
+        \int_zero:N \l__nicematrix_first_row_int
+        \bNiceArray
+      }
+      { \endbNiceArray }
+    \NewDocumentEnvironment { BNiceArrayRC } { }
+      {
+        \int_zero:N \l__nicematrix_last_col_int
+        \int_zero:N \l__nicematrix_first_row_int
+        \BNiceArray
+      }
+      { \endBNiceArray }
+    \NewDocumentEnvironment { vNiceArrayRC } { }
+      {
+        \int_zero:N \l__nicematrix_last_col_int
+        \int_zero:N \l__nicematrix_first_row_int
+        \vNiceArray
+      }
+      { \endvNiceArray }
+    \NewDocumentEnvironment { VNiceArrayRC } { }
+      {
+        \int_zero:N \l__nicematrix_last_col_int
+        \int_zero:N \l__nicematrix_first_row_int
+        \VNiceArray
+      }
+      { \endVNiceArray }
+    \NewDocumentEnvironment { NiceArrayCwithDelims } { }
+      {
+        \int_zero:N \l__nicematrix_last_col_int
+        \NiceArrayWithDelims
+      }
+      { \endNiceArrayWithDelims }
+    \NewDocumentEnvironment { NiceArrayRCwithDelims } { }
+      {
+        \int_zero:N \l__nicematrix_last_col_int
+        \int_zero:N \l__nicematrix_first_row_int
+        \NiceArrayWithDelims
+      }
+      { \endNiceArrayWithDelims }
   }
 
 \endinput



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