summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-29 22:13:59 +0000
committerKarl Berry <karl@freefriends.org>2019-01-29 22:13:59 +0000
commit2a9521a76a96fe366f1a457019e95659d9464924 (patch)
tree01157c304444d6694fe8637b670baf3dd3584ab5
parent86b66441c6a9beb50462a4afe5daff114d70b0f8 (diff)
nicematrix (29jan19)
git-svn-id: svn://tug.org/texlive/trunk@49866 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdfbin377265 -> 378455 bytes
-rw-r--r--Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx146
-rw-r--r--Master/texmf-dist/source/latex/nicematrix/nicematrix.ins4
-rw-r--r--Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty35
4 files changed, 98 insertions, 87 deletions
diff --git a/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf b/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
index 2aed8722c97..5d6e1f65e26 100644
--- a/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
+++ b/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx b/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx
index 4179d74c84e..f21c03b01e8 100644
--- a/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx
+++ b/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2017-2018 by F. Pantigny
+% Copyright (C) 2018-2019 by F. Pantigny
% -----------------------------------
%
% This file may be distributed and/or modified under the
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{2.1.3}
-\def\myfiledate{2018/10/29}
+\def\myfileversion{2.1.4}
+\def\myfiledate{2019/01/28}
%
%
%<*batchfile>
@@ -26,7 +26,7 @@
\usedir{tex/latex/nicematrix}
\preamble
-Copyright (C) 2018 by F. Pantigny
+Copyright (C) 2018-2019 by F. Pantigny
-----------------------------------
This file may be distributed and/or modified under the
@@ -111,8 +111,7 @@ version 2005/12/01 or later.
% \end{savenotes}
% \hspace{1.4cm}
% $\vcenter{
-% \begin{bNiceArrayRC}{CCCC}%
-% [code-for-last-col=\color{blue}\scriptstyle,
+% \begin{bNiceArrayRC}{CCCC}[code-for-last-col=\color{blue}\scriptstyle,
% code-for-first-row=\color{blue}\scriptstyle,
% columns-width = auto]
% C_1 & C_2 & \Cdots & C_n \\
@@ -446,6 +445,8 @@ version 2005/12/01 or later.
% \medskip
% The option |nullify-dots| smashes the instructions |\Ldots| (and the variants) vertically but also horizontally.
%
+% \medskip
+% \textbf{There must be no space before the opening bracket (|[|) of the options of the environment.}
%
% \subsection{The command Hdotsfor}
%
@@ -552,7 +553,7 @@ version 2005/12/01 or later.
% draw the dotted lines between the cells of the matrix. However, the user may wish to use directly these nodes.
% It's possible. First, the user have to give a name to the array (with the key called |name|). Then, the nodes are
% accessible through the names ``\textsl{name}-$i$-$j$'' where \textsl{name} is the name given to the array and
-% $i$ and $j$ the number of the row and the column of the considered cell.
+% $i$ and $j$ the numbers of the row and the column of the considered cell.
%
% \medskip
% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
@@ -594,9 +595,9 @@ version 2005/12/01 or later.
% \medskip
% The names of the ``medium nodes'' are constructed by adding the suffix ``|-medium|'' to the names of the ``normal
% nodes''. In the following example, we have underlined the ``medium nodes''. We consider that this example is self-explanatory.
-% \[\begin{pNiceMatrix}
-% [create-extra-nodes,
-% code-after = {\begin{tikzpicture}%
+% \[\begin{pNiceMatrix}[
+% create-extra-nodes,
+% code-after = {\begin{tikzpicture}
% [every node/.style = {fill = red!15,
% blend mode = multiply,
% inner sep = -\pgflinewidth/2},
@@ -623,9 +624,9 @@ version 2005/12/01 or later.
% self-explanatory.\footnote{In the environments like |{pNiceArrayC}| and |{pNiceArrayRC}|, there is not ``large
% nodes'' created in the exterior row and column.}
%
-% \[\begin{pNiceMatrix}
-% [create-extra-nodes,
-% code-after = {\begin{tikzpicture}%
+% \[\begin{pNiceMatrix}[
+% create-extra-nodes,
+% code-after = {\begin{tikzpicture}
% [every node/.style = {blend mode = multiply,
% inner sep = -\pgflinewidth/2},
% name suffix = -large]
@@ -651,9 +652,9 @@ version 2005/12/01 or later.
% space in the ``large nodes'' of the first column and last column. In the following example, we have used the
% options |left-margin| and |right-margin|.\footnote{The options |left-margin| and |right-margin| take dimensions
% as values but, if no value is given, the default value is used, which is |\arraycolsep|.}
-% \[\begin{pNiceMatrix}
-% [create-extra-nodes,left-margin,right-margin,
-% code-after = {\begin{tikzpicture}%
+% \[\begin{pNiceMatrix}[
+% create-extra-nodes,left-margin,right-margin,
+% code-after = {\begin{tikzpicture}
% [every node/.style = {blend mode = multiply,
% inner sep = -\pgflinewidth/2},
% name suffix = -large]
@@ -676,9 +677,9 @@ version 2005/12/01 or later.
% It's also possible to add more space on both side of the array with the options |extra-left-margin| and
% |extra-right-margin|. These margins are not incorporated in the ``large nodes''. In the following example, we
% have used |extra-left-margin| and |extra-right-margin| with the value $3$~pt.
-% \[\begin{pNiceMatrix}
-% [create-extra-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt,
-% code-after = {\begin{tikzpicture}%
+% \[\begin{pNiceMatrix}[
+% create-extra-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt,
+% code-after = {\begin{tikzpicture}
% [every node/.style = {blend mode = multiply,
% inner sep = -\pgflinewidth/2},
% name suffix = -large]
@@ -699,9 +700,9 @@ version 2005/12/01 or later.
%
% \medskip
% In this case, if we want a control over the height of the rows, we can add a |\strut| in each row of the array.
-% \[\begin{pNiceMatrix}
-% [create-extra-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt,
-% code-after = {\begin{tikzpicture}%
+% \[\begin{pNiceMatrix}[
+% create-extra-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt,
+% code-after = {\begin{tikzpicture}
% [every node/.style = {blend mode = multiply,
% inner sep = -\pgflinewidth/2},
% name suffix = -large]
@@ -848,14 +849,14 @@ version 2005/12/01 or later.
%
% \medskip
% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% $\begin{NiceArrayCwithDelims}%
+% $\begin{NiceArrayCwithDelims}
% {\downarrow}{\downarrow}{CCC}
% 1 & 2 & 3 & L_1 \\
% 4 & 5 & 6 & L_2 \\
% 7 & 8 & 9 & L_3
% \end{NiceArrayCwithDelims}$
% \end{BVerbatim}
-% $\begin{NiceArrayCwithDelims}%
+% $\begin{NiceArrayCwithDelims}
% {\downarrow}{\downarrow}{CCC}
% 1 & 2 & 3 & L_1 \\
% 4 & 5 & 6 & L_2 \\
@@ -877,7 +878,7 @@ version 2005/12/01 or later.
%
% \bigskip
% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% $\begin{pNiceArrayRC}{CCC}%
+% $\begin{pNiceArrayRC}{CCC}% (here, % is mandatory)
% [columns-width = auto,
% code-for-first-row = \color{blue},
% code-for-last-col = \color{blue}]
@@ -912,7 +913,7 @@ version 2005/12/01 or later.
%
% \medskip
% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% $\begin{NiceArrayRCwithDelims}%
+% $\begin{NiceArrayRCwithDelims}
% {\downarrow}{\downarrow}{CCC}[columns-width=auto]
% C_1 & C_2 & C_3 \\
% 1 & 2 & 3 \\
@@ -920,7 +921,7 @@ version 2005/12/01 or later.
% 7 & 8 & 9
% \end{NiceArrayRCwithDelims}$
% \end{BVerbatim}
-% $\begin{NiceArrayRCwithDelims}%
+% $\begin{NiceArrayRCwithDelims}
% {\downarrow}{\downarrow}{CCC}[columns-width=auto]
% C_1 & C_2 & C_3 \\
% 1 & 2 & 3 \\
@@ -1256,8 +1257,8 @@ version 2005/12/01 or later.
% b & c
% \end{pNiceMatrix}
% \end{BVerbatim}
-% $\begin{pNiceMatrix}
-% [code-after = {\tikz \node [inner sep = 0pt,
+% $\begin{pNiceMatrix}[
+% code-after = {\tikz \node [inner sep = 0pt,
% fill = red!15,
% blend mode = multiply,
% fit = (1-2) ] {} ; } ]
@@ -1277,8 +1278,8 @@ version 2005/12/01 or later.
% b & c
% \end{pNiceMatrix}
% \end{BVerbatim}
-% $\begin{pNiceMatrix}
-% [code-after = {\tikz \node [inner sep = 0pt,
+% $\begin{pNiceMatrix}[
+% code-after = {\tikz \node [inner sep = 0pt,
% fill = red!15,
% blend mode = multiply,
% fit = (1-2) ] {} ; } ]
@@ -1298,8 +1299,8 @@ version 2005/12/01 or later.
% b & c
% \end{pNiceMatrix}
% \end{BVerbatim}
-% $\begin{pNiceMatrix}
-% [code-after = {\tikz \node [inner sep = 0pt,
+% $\begin{pNiceMatrix}[
+% code-after = {\tikz \node [inner sep = 0pt,
% fill = red!15,
% blend mode = multiply,
% fit = (1-2) ] {} ; } ]
@@ -1586,7 +1587,7 @@ version 2005/12/01 or later.
% have the continuity of the lines, we have to set |inner sep = -\pgflinewidth/2|.
%
% \begin{Verbatim}
-% $\left(\,\begin{NiceArray}{>{\strut}CCCC}
+% $\left(\,\begin{NiceArray}{>{\strut}CCCC}%
% [create-extra-nodes,left-margin,right-margin,
% code-after = {\begin{tikzpicture}
% [~emphase#name suffix = -large@,
@@ -1605,8 +1606,8 @@ version 2005/12/01 or later.
% \end{Verbatim}
%
%
-% \[\left(\,\begin{NiceArray}{>{\strut}CCCC}
-% [create-extra-nodes,left-margin,right-margin,
+% \[\left(\,\begin{NiceArray}{>{\strut}CCCC}[
+% create-extra-nodes,left-margin,right-margin,
% code-after = {\begin{tikzpicture}[name suffix = -large,
% every node/.style = {draw,
% inner sep = -\pgflinewidth/2}]
@@ -1746,8 +1747,8 @@ version 2005/12/01 or later.
% \medskip
% We obtain the following matrix.
%
-% \[\begin{pNiceArrayC}{CCC}
-% [create-extra-nodes,
+% \[\begin{pNiceArrayC}{CCC}[
+% create-extra-nodes,
% code-after = {\begin{tikzpicture}[every node/.style = {fill = red!15,
% blend mode = multiply,
% inner sep = 0pt}]
@@ -1774,8 +1775,8 @@ version 2005/12/01 or later.
% \medskip
% We obtain the following matrix.
%
-% \[\begin{pNiceArrayC}{CCC}
-% [create-extra-nodes,
+% \[\begin{pNiceArrayC}{CCC}[
+% create-extra-nodes,
% code-after = {\begin{tikzpicture}[every node/.style = {fill = red!15,
% blend mode = multiply,
% inner sep = 0pt},
@@ -1794,7 +1795,7 @@ version 2005/12/01 or later.
%
% In the following example, we use the ``large nodes'' to highlight a zone of the matrix.\par\nobreak
% \begin{Verbatim}
-% \left(\,\begin{NiceArray}{>{\strut}CCCC}
+% \left(\,\begin{NiceArray}{>{\strut}CCCC}%
% [create-extra-nodes,left-margin,right-margin,
% code-after = {\tikz \path [~emphase#name suffix = -large@,
% fill = red!15,
@@ -1812,8 +1813,8 @@ version 2005/12/01 or later.
% \end{NiceArray}\,\right)
% \end{Verbatim}
%
-% \[\left(\,\begin{NiceArray}{>{\strut}CCCC}
-% [create-extra-nodes,left-margin,right-margin,
+% \[\left(\,\begin{NiceArray}{>{\strut}CCCC}[
+% create-extra-nodes,left-margin,right-margin,
% code-after = {\tikz \path [name suffix = -large,
% fill = red!15,
% blend mode = multiply]
@@ -1836,7 +1837,7 @@ version 2005/12/01 or later.
% In the following example, we use the ``large nodes'' to construct a block matrix (the dashed lines have been
% drawn with \pkg{arydshln}).
% \begin{Verbatim}
-% \left(\begin{NiceArray}{CC:CC}
+% \left(\begin{NiceArray}{CC:CC}%
% [create-extra-nodes,
% ~emphase#code-after = { \tikz \node [fit = (1-1-large) (2-2-large), inner sep = 0 pt]@
% ~emphase# {$0_{22}$} ; }@ ]
@@ -1849,8 +1850,8 @@ version 2005/12/01 or later.
% \end{Verbatim}
%
%
-% \[D = \left(\begin{NiceArray}{CC:CC}
-% [create-extra-nodes,
+% \[D = \left(\begin{NiceArray}{CC:CC}[
+% create-extra-nodes,
% code-after = { \tikz \node [fit = (1-1-large) (2-2-large), inner sep = 0 pt]
% {$0_{22}$} ; } ]
% & & a_{13} & a_{14} \\
@@ -1894,6 +1895,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\RequirePackage{tikz}
\usetikzlibrary{fit}
+\RequirePackage{expl3}[2018-01-01]
% \end{macrocode}
%
% We give the traditionnal declaration of a package written with |expl3|:
@@ -1923,7 +1925,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\RequirePackage{array}
\RequirePackage{amsmath}
-\RequirePackage{xparse}
+\RequirePackage{xparse}[2018-10-17]
% \end{macrocode}
%
% \subsection{Technical definitions}
@@ -2051,9 +2053,9 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% We don't want to patch any existing code. That's why some code must be executed in a |\aftergroup|. That's why
+% We don't want to patch any existing code. That's why some code must be executed in a |\group_insert_after:N|. That's why
% the parameters used in that code must be transfered outside the current group. To do this, we copy those
-% quantities in global variables just before the |\aftergroup|. Therefore, for those quantities, we have two
+% quantities in global variables just before the |\group_insert_after:N|. Therefore, for those quantities, we have two
% parameters, one local and one global. For example, we have |\l_@@_name_tl| and |\g_@@_name_tl|.
%
% \bigskip
@@ -2280,7 +2282,7 @@ version 2005/12/01 or later.
create-extra-nodes,~
extra-left-margin,~
extra-right-margin,~
- left~margin,~
+ left-margin,~
name,~
nullify-dots,~
parallelize-diags,~
@@ -2381,7 +2383,7 @@ version 2005/12/01 or later.
\int_gincr:N \g_@@_column_int
% \end{macrocode}
% Now, we increment the counter of the rows. We don't do this incrementation in the |\everycr| because some
-% packages, like \pkg{arydshln}, creates special rows in the |\halign| that we don't want to take into account.
+% packages, like \pkg{arydshln}, create special rows in the |\halign| that we don't want to take into account.
% \begin{macrocode}
\int_compare:nNnT \g_@@_column_int = 1
{\int_gincr:N \g_@@_row_int}
@@ -2453,7 +2455,7 @@ version 2005/12/01 or later.
% \medskip
% Here's the definition of |{NiceMatrix}|:
% \begin{macrocode}
-\NewDocumentEnvironment {NiceMatrix} {O{}}
+\NewDocumentEnvironment {NiceMatrix} {!O{}}
{\keys_set:nn {NiceMatrix/NiceMatrix} {#1}
\tl_set:Nn \l_@@_pos_env_tl c
\bool_set_false:N \l_@@_exterior_arraycolsep_bool
@@ -2468,7 +2470,7 @@ version 2005/12/01 or later.
% For the definition of |{NiceArray}| (just below), we have the following constraints:
% \begin{itemize}
% \item we must use |\array| in the first part of |{NiceArray}| and, therefore, |\endarray| in the second part;
-% \item we have to put a |\aftergroup \@@_after_array:| in the first part of |{NiceArray}| so that |\@@_draw_lines|
+% \item we have to put a |\group_insert_after:N \@@_after_array:| in the first part of |{NiceArray}| so that |\@@_draw_lines|
% will be executed at the end of the current environment (either |{NiceArray}| or |{NiceMatrix}|).
% \end{itemize}
%
@@ -2532,7 +2534,7 @@ version 2005/12/01 or later.
% First, we test if we are yet in an environment |{NiceArray}| (nested environment are forbidden). It's easy to
% test whether we are in an environment |{NiceArray}| : a special command |\@@_in_NiceArray:| is defined.
% \begin{macrocode}
-\NewDocumentEnvironment {NiceArray} {O{} m O{}}
+\NewDocumentEnvironment {NiceArray} {O{} m !O{}}
{\cs_if_exist:NT \@@_in_NiceArray:
{\@@_error:n {We~are~yet~in~an~environment~NiceArray}}
% \end{macrocode}
@@ -2542,7 +2544,7 @@ version 2005/12/01 or later.
\cs_if_exist:NT \tikz@library@external@loaded
{\tikzset{external/export = false}}
\cs_set:Npn \@@_in_NiceArray: {--Void--}
- \aftergroup \@@_after_array:
+ \group_insert_after:N \@@_after_array:
\tl_gclear_new:N \g_@@_lines_to_draw_tl
% \end{macrocode}
%
@@ -2569,7 +2571,7 @@ version 2005/12/01 or later.
% |\l_@@_columns_width_dim| will be set to zero --- and the columns will have their natural width).
% \begin{macrocode}
\bool_if:NT \l_@@_auto_columns_width_bool
- {\aftergroup \@@_write_max_cell_width:
+ {\group_insert_after:N \@@_write_max_cell_width:
\cs_if_free:cTF {_@@_max_cell_width_\int_use:N \g_@@_env_int}
{\dim_set:Nn \l_@@_columns_width_dim \c_zero_dim}
{\dim_set:Nx \l_@@_columns_width_dim
@@ -2585,8 +2587,8 @@ version 2005/12/01 or later.
{\use:c {_@@_max_cell_width_\l_@@_name_tl}}}}
}
% \end{macrocode}
-% We don't want to patch any code and that's why some code is excuted in a |\aftergroup|. In particular, in this
-% |\aftergroup|, we will have to know the value of some parameters like |\l_@@_extra_nodes_bool|. That's why we transit via a global
+% We don't want to patch any code and that's why some code is excuted in a |\group_insert_after:N|. In particular, in this
+% |\group_insert_after:N|, we will have to know the value of some parameters like |\l_@@_extra_nodes_bool|. That's why we transit via a global
% version for some variables.
% \begin{macrocode}
\bool_gset_eq:NN \g_@@_extra_nodes_bool \l_@@_extra_nodes_bool
@@ -2767,7 +2769,7 @@ version 2005/12/01 or later.
% the cells of the ``exterior'' column of an environment of the kind of |{pNiceAccayC}|). This length can be known
% only after the end of the construction of the array (or at the end of the environment |{NiceMatrixBlock}|).
% That's why we store this value in the main |.aux| file and it will be available in the next run. We write a
-% dedicated command for this because it will be called in a~|\aftergroup|.
+% dedicated command for this because it will be called in a~|\group_insert_after:N|.
% \begin{macrocode}
\cs_new_protected:Nn \@@_write_max_cell_width:
{\bool_if:NF \l_@@_block_auto_columns_width_bool
@@ -3464,7 +3466,7 @@ version 2005/12/01 or later.
{\@@_old_multicolumn{#1}{#2}{#3}
\int_compare:nNnT #1 > 1
{\seq_gput_left:Nx \g_@@_multicolumn_cells_seq
- {\int_eval:n {\g_@@_row_int} -
+ {\int_eval:n \g_@@_row_int -
\int_use:N \g_@@_column_int}
\seq_gput_left:Nn \g_@@_multicolumn_sizes_seq {#1}}
\int_gadd:Nn \g_@@_column_int {#1-1}}
@@ -3571,7 +3573,7 @@ version 2005/12/01 or later.
%
% \bigskip
% \begin{macrocode}
-\NewDocumentEnvironment {NiceMatrixBlock} {O{}}
+\NewDocumentEnvironment {NiceMatrixBlock} {!O{}}
{\keys_set:nn {NiceMatrix/NiceMatrixBlock} {#1}
\int_zero_new:N \l_@@_first_env_block_int
\int_set:Nn \l_@@_first_env_block_int {\g_@@_env_int + 1}}
@@ -3583,12 +3585,12 @@ version 2005/12/01 or later.
% block in the counter |\l_@@_first_env_block_int|).
% \begin{macrocode}
{\bool_if:NT \l_@@_block_auto_columns_width_bool
- {\iow_now:Nn \@mainaux {\ExplSyntaxOn}
+ {\iow_now:Nn \@mainaux \ExplSyntaxOn
\int_step_inline:nnnn \l_@@_first_env_block_int 1 \g_@@_env_int
{\iow_now:Nx \@mainaux
{\cs_gset:cpn {@@_max_cell_width_##1}
{\dim_use:N \g_@@_max_cell_width_dim}}}
- \iow_now:Nn \@mainaux {\ExplSyntaxOff}}}
+ \iow_now:Nn \@mainaux \ExplSyntaxOff}}
% \end{macrocode}
%
% \subsection{The environment \{pNiceArrayC\} and its variants}
@@ -3720,7 +3722,7 @@ version 2005/12/01 or later.
% The environments of the type of |{pNiceArrayC}| will be constructed over |{NiceArrayCwithDelims}|. The first
% two arguments of this environment are the left and the right delimiter.
% \begin{macrocode}
-\NewDocumentEnvironment{NiceArrayCwithDelims} {mm O{} m O{}}
+\NewDocumentEnvironment{NiceArrayCwithDelims} {mm O{} m !O{}}
{\dim_gzero_new:N \g_@@_width_last_col_dim
\keys_set:nn {NiceMatrix/NiceArrayC} {#3,#5}
\bool_set_false:N \l_@@_exterior_arraycolsep_bool
@@ -3822,12 +3824,12 @@ version 2005/12/01 or later.
create-extra-nodes,~
extra-left-margin,~
extra-right-margin,~
- left~margin,~
+ left-margin,~
name,~
nullify-dots,~
parallelize-diags,~
renew-dots~
- and~right~margin.}
+ and~right-margin.}
% \end{macrocode}
%
%
@@ -3836,7 +3838,7 @@ version 2005/12/01 or later.
% because he will use one of the variants |{pNiceArrayRC}|, |{vNiceArrayRC}|, etc.
%
% \begin{macrocode}
-\NewDocumentEnvironment {NiceArrayRCwithDelims} {mm O{} m O{}}
+\NewDocumentEnvironment {NiceArrayRCwithDelims} {mm O{} m !O{}}
{\int_zero:N \l_@@_nb_first_row_int
\dim_gzero_new:N \g_@@_width_last_col_dim
\keys_set:nn {NiceMatrix/NiceArrayRC} {#3,#5}
@@ -4209,7 +4211,8 @@ version 2005/12/01 or later.
% \subsection{Changes between version 2.1 and 2.1.2}
% Option |draft|: with this option, the dotted lines are not drawn (quicker).
%
-% \subsection{Changes between version 2.1 and 2.1.3}
+% \subsection{Changes between version 2.1.2 and 2.1.3}
+%
% When searching the end of a dotted line from a command like |\Cdots| issued in the ``main matrix'' (not in the
% column |C|), the cells in the column |C| are considered as outside the matrix. That means that it's possible to
% do the following matrix with only a |\Cdots| command (and a single |\Vdots|).
@@ -4220,6 +4223,13 @@ version 2005/12/01 or later.
% \mbox{\Large $0$} & & \mbox{\Large $0$} \\
% \end{pNiceArrayRC}\]
%
+% \subsection{Changes between version 2.1.3 and 2.1.4}
+%
+% Replacement of some options |O{}| in commands and environments defined with \pkg{xparse} by |!O{}| (because a
+% recent version of \pkg{xparse} introduced the specifier |!| and modified the default behaviour of the last
+% optional arguments).
+%
+% See |https://www.texdev.net/2018/04/21/xparse-optional-arguments-at-the-end|
%
% \endinput
% Local Variables:
diff --git a/Master/texmf-dist/source/latex/nicematrix/nicematrix.ins b/Master/texmf-dist/source/latex/nicematrix/nicematrix.ins
index 625f62ef07c..316530c421c 100644
--- a/Master/texmf-dist/source/latex/nicematrix/nicematrix.ins
+++ b/Master/texmf-dist/source/latex/nicematrix/nicematrix.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2017-2018 by F. Pantigny
+%% Copyright (C) 2017-2019 by F. Pantigny
%%
%%
%% This file may be distributed and/or modified under the
@@ -17,7 +17,7 @@
\usedir{tex/latex/nicematrix}
\preamble
-Copyright (C) 2017-2018 by F. Pantigny
+Copyright (C) 2017-2019 by F. Pantigny
This file may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
diff --git a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
index 0774cd78404..d681eeb9ac4 100644
--- a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
+++ b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
@@ -6,7 +6,7 @@
%%
%% nicematrix.dtx (with options: `package')
%%
-%% Copyright (C) 2017-2018 by F. Pantigny
+%% Copyright (C) 2017-2019 by F. Pantigny
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -18,10 +18,11 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
-\def\myfileversion{2.1.3}
-\def\myfiledate{2018/10/29}
+\def\myfileversion{2.1.4}
+\def\myfiledate{2019/01/28}
\RequirePackage{tikz}
\usetikzlibrary{fit}
+\RequirePackage{expl3}[2018-01-01]
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{nicematrix}
@@ -34,7 +35,7 @@
\ProcessOptions \relax
\RequirePackage{array}
\RequirePackage{amsmath}
-\RequirePackage{xparse}
+\RequirePackage{xparse}[2018-10-17]
\cs_new_protected:Nn \__nicem_error:n
{\msg_error:nn {nicematrix} {#1}}
\cs_new_protected:Nn \__nicem_error:nn
@@ -171,7 +172,7 @@
create-extra-nodes,~
extra-left-margin,~
extra-right-margin,~
- left~margin,~
+ left-margin,~
name,~
nullify-dots,~
parallelize-diags,~
@@ -273,7 +274,7 @@
\bgroup
\box_use:N \l_tmpa_box
\egroup ;}
-\NewDocumentEnvironment {NiceMatrix} {O{}}
+\NewDocumentEnvironment {NiceMatrix} {!O{}}
{\keys_set:nn {NiceMatrix/NiceMatrix} {#1}
\tl_set:Nn \l__nicem_pos_env_tl c
\bool_set_false:N \l__nicem_exterior_arraycolsep_bool
@@ -316,13 +317,13 @@
\cs_set_eq:NN \iddots \prg_do_nothing:
\cs_set_eq:NN \dots \prg_do_nothing:
\cs_set_eq:NN \hdotsfor \__nicem_Hdotsfor}}
-\NewDocumentEnvironment {NiceArray} {O{} m O{}}
+\NewDocumentEnvironment {NiceArray} {O{} m !O{}}
{\cs_if_exist:NT \__nicem_in_NiceArray:
{\__nicem_error:n {We~are~yet~in~an~environment~NiceArray}}
\cs_if_exist:NT \tikz@library@external@loaded
{\tikzset{external/export = false}}
\cs_set:Npn \__nicem_in_NiceArray: {--Void--}
- \aftergroup \__nicem_after_array:
+ \group_insert_after:N \__nicem_after_array:
\tl_gclear_new:N \g__nicem_lines_to_draw_tl
\int_gincr:N \g__nicem_env_int
\bool_if:NF \l__nicem_block_auto_columns_width_bool
@@ -332,7 +333,7 @@
\dim_gzero_new:N \g__nicem_max_ht_row_one_dim
\keys_set:nn {NiceMatrix/NiceArray} {#1,#3}
\bool_if:NT \l__nicem_auto_columns_width_bool
- {\aftergroup \__nicem_write_max_cell_width:
+ {\group_insert_after:N \__nicem_write_max_cell_width:
\cs_if_free:cTF {__nicem_max_cell_width_\int_use:N \g__nicem_env_int}
{\dim_set:Nn \l__nicem_columns_width_dim \c_zero_dim}
{\dim_set:Nx \l__nicem_columns_width_dim
@@ -747,7 +748,7 @@
{\__nicem_old_multicolumn{#1}{#2}{#3}
\int_compare:nNnT #1 > 1
{\seq_gput_left:Nx \g__nicem_multicolumn_cells_seq
- {\int_eval:n {\g__nicem_row_int} -
+ {\int_eval:n \g__nicem_row_int -
\int_use:N \g__nicem_column_int}
\seq_gput_left:Nn \g__nicem_multicolumn_sizes_seq {#1}}
\int_gadd:Nn \g__nicem_column_int {#1-1}}
@@ -805,17 +806,17 @@
{\bool_set_true:N \l__nicem_block_auto_columns_width_bool
\dim_gzero_new:N \g__nicem_max_cell_width_dim
\bool_set_true:N \l__nicem_auto_columns_width_bool}}
-\NewDocumentEnvironment {NiceMatrixBlock} {O{}}
+\NewDocumentEnvironment {NiceMatrixBlock} {!O{}}
{\keys_set:nn {NiceMatrix/NiceMatrixBlock} {#1}
\int_zero_new:N \l__nicem_first_env_block_int
\int_set:Nn \l__nicem_first_env_block_int {\g__nicem_env_int + 1}}
{\bool_if:NT \l__nicem_block_auto_columns_width_bool
- {\iow_now:Nn \@mainaux {\ExplSyntaxOn}
+ {\iow_now:Nn \@mainaux \ExplSyntaxOn
\int_step_inline:nnnn \l__nicem_first_env_block_int 1 \g__nicem_env_int
{\iow_now:Nx \@mainaux
{\cs_gset:cpn {__nicem_max_cell_width_##1}
{\dim_use:N \g__nicem_max_cell_width_dim}}}
- \iow_now:Nn \@mainaux {\ExplSyntaxOff}}}
+ \iow_now:Nn \@mainaux \ExplSyntaxOff}}
\keys_define:nn {NiceMatrix/NiceArrayC}
{parallelize-diags .bool_set:N = \l__nicem_parallelize_diags_bool,
parallelize-diags .default:n = true,
@@ -897,7 +898,7 @@
\int_use:N \g__nicem_row_int-
\int_use:N \g__nicem_column_int}]
{\box_use:N \l_tmpa_box} ; } }}}
-\NewDocumentEnvironment{NiceArrayCwithDelims} {mm O{} m O{}}
+\NewDocumentEnvironment{NiceArrayCwithDelims} {mm O{} m !O{}}
{\dim_gzero_new:N \g__nicem_width_last_col_dim
\keys_set:nn {NiceMatrix/NiceArrayC} {#3,#5}
\bool_set_false:N \l__nicem_exterior_arraycolsep_bool
@@ -967,13 +968,13 @@
create-extra-nodes,~
extra-left-margin,~
extra-right-margin,~
- left~margin,~
+ left-margin,~
name,~
nullify-dots,~
parallelize-diags,~
renew-dots~
- and~right~margin.}
-\NewDocumentEnvironment {NiceArrayRCwithDelims} {mm O{} m O{}}
+ and~right-margin.}
+\NewDocumentEnvironment {NiceArrayRCwithDelims} {mm O{} m !O{}}
{\int_zero:N \l__nicem_nb_first_row_int
\dim_gzero_new:N \g__nicem_width_last_col_dim
\keys_set:nn {NiceMatrix/NiceArrayRC} {#3,#5}