texlive[76149] Master/texmf-dist: nicematrix (26aug25)
commits+karl at tug.org
commits+karl at tug.org
Tue Aug 26 22:02:23 CEST 2025
Revision: 76149
https://tug.org/svn/texlive?view=revision&revision=76149
Author: karl
Date: 2025-08-26 22:02:23 +0200 (Tue, 26 Aug 2025)
Log Message:
-----------
nicematrix (26aug25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/nicematrix/README.md
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-code.pdf
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/README.md 2025-08-26 06:58:19 UTC (rev 76148)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/README.md 2025-08-26 20:02:23 UTC (rev 76149)
@@ -14,6 +14,7 @@
The LaTeX package `nicematrix` provides new environments similar to the classical environments
`{tabular}`, `{array}` and `{matrix}` but with some additional features. The extension `nicematrix` creates PGF/Tikz nodes corresponding to the cells of the array and uses them to provide new functionalities.
+This package can be used with xelatex, lualatex, pdflatex but also by the classical workflow latex-dvips-ps2pdf (or Adobe Distiller).
## Installation
@@ -28,3 +29,7 @@
The file `nicematrix.sty` is the only file necessary to use the extension `nicematrix`.
You have to put it in the same directory as your document or (best) in a `texmf` tree.
+
+For the documentation in English, run: `lualatex nicematrix.tex` (several compilations are required).
+
+For the documentation in French, run: `lualatex nicematrix-french.tex`
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex 2025-08-26 06:58:19 UTC (rev 76148)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex 2025-08-26 20:02:23 UTC (rev 76149)
@@ -261,8 +261,8 @@
\medskip
\begin{ttfamily}
\setlength{\tabcolsep}{3mm}
-\begin{tabular}{llll}
-\{NiceTabular\} & \{NiceArray\} & \{NiceMatrix\} \\
+\begin{tabular}{lllll}
+\{NiceTabular\} & \{NiceArray\} & \{NiceMatrix\} & \{NiceArrayWithDelims\} \\
\{NiceTabular*\} & \{pNiceArray\} & \{pNiceMatrix\} \\
\{NiceTabularX\} & \{bNiceArray\} & \{bNiceMatrix\} \\
& \{BNiceArray\} & \{BNiceMatrix\} \\
@@ -294,12 +294,19 @@
souhaitée pour le tableau étant spécifiée par la clé |width|:
cf.~p.~\pageref{colonne-X}.}
+\medskip
+L'environnement |{NiceArrayWithDelims}| est une généralisation de |{NiceArray}| et
+ses variantes (cf. p.~\pageref{NiceArrayWithDelims}).
\medskip
\textbf{On conseille d'utiliser prioritairement les environnements classiques et de
n'utiliser les environnements de \pkg{nicematrix} que lorsqu'on utilise les
fonctionnalités supplémentaires offertes par ces environnements (cela permet
-d'économiser la mémoire).}
+d'économiser la mémoire et d'accélérer la compilation).}\footnote{Pour accélérer
+les compilations, on peut aussi utiliser ponctuellement la clé |no-cell-nodes| qui
+supprime la création des nœuds PGF/TikZ correspondants aux contenus des cellules mais
+certains fonctionnalités ne seront plus disponibles (cf.~\pageref{no-cell-nodes}).
+}
\medskip
Tous les environnements de l'extension \pkg{nicematrix} acceptent, entre
@@ -5893,6 +5900,7 @@
\subsection{Les nœuds correspondant aux contenus des cases}
\index{no-cell-nodes}
+\label{no-cell-nodes}
L'extension \pkg{nicematrix} crée un nœud PGF-TikZ\footnote{On rappelle que TikZ
est une sur-couche de PGF. L'extension \pkg{nicematrix} charge PGF et ne
@@ -6004,15 +6012,15 @@
\medskip
-Dans l'exemple suivant, nous avons surligné tous les nœuds de la matrice.
+Dans l'exemple suivant, nous avons encadré tous les nœuds de la matrice.
\[
\NiceMatrixOptions
{
pgf-node-code =
- {
- \pgfsetfillcolor{red!15}%
- \pgfusepathqfill
+ {
+ \pgfsetstrokecolor{red}%
+ \pgfusepathqstroke
}
}
\begin{pNiceMatrix}
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex 2025-08-26 06:58:19 UTC (rev 76148)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex 2025-08-26 20:02:23 UTC (rev 76149)
@@ -234,8 +234,8 @@
\medskip
\begin{ttfamily}
\setlength{\tabcolsep}{3mm}
-\begin{tabular}{llll}
-\{NiceTabular\} & \{NiceArray\} & \{NiceMatrix\} \\
+\begin{tabular}{lllll}
+\{NiceTabular\} & \{NiceArray\} & \{NiceMatrix\} & \{NiceArrayWithDelims\} \\
\{NiceTabular*\} & \{pNiceArray\} & \{pNiceMatrix\} \\
\{NiceTabularX\} & \{bNiceArray\} & \{bNiceMatrix\} \\
& \{BNiceArray\} & \{BNiceMatrix\} \\
@@ -266,10 +266,18 @@
width for the tabular is fixed by the key |width|): cf. p.~\pageref{X-columns}}.
\medskip
-\textbf{It's recommended to use primarily the classical environments and to use the
-environments of \pkg{nicematrix} only when some feature provided by these
-environments is used (this will save memory).}
+The environment |\{NiceArrayWithDelims\}| is a generalisation of the environment
+|{NiceArray}| and its variants (cf. p.~\pageref{NiceArrayWithDelims}).
+\medskip
+\textbf{It's recommended to use primarily the classical environments and to use
+ the environments of \pkg{nicematrix} only when some feature provided by these
+ environments is used (this will save memory and speed up the
+ compilation).}\footnote{In order to speed up the compilations, it's also possible
+ to use ponctually the key |no-cell-nodes| which disables the creation of the PGF/TikZ
+ nodes for the contents of the cells but some functionalities won't work any longer
+ (cf.~\pageref{no-cell-nodes}).}
+
\medskip
All the environments of the package \pkg{nicematrix} accept, between square
brackets, an optional list of \textsl{key=value} pairs. \textbf{There must be
@@ -5729,6 +5737,7 @@
\subsection{The nodes corresponding to the contents of the cells}
\index{no-cell-nodes}
+\label{no-cell-nodes}
The package \pkg{nicematrix} creates a PGF/TikZ node\footnote{We recall that TikZ
is a layer over PGF. The extension \pkg{nicematrix} loads PGF but does not
@@ -5740,7 +5749,7 @@
\smallskip
-\textbf{Caution} : By default, no node is created in a empty cell.
+\textbf{Caution} : By default, no node is created in an empty cell.
\smallskip
However, it's possible to impose the creation of a node with the command
@@ -5836,7 +5845,7 @@
nodes of the last row may be indicated by |last|-$j$.
\bigskip
-In the following example, we have underlined all the nodes of the matrix.
+In the following example, we have stroken all the nodes of the matrix.
\[
\NiceMatrixOptions
@@ -5843,8 +5852,8 @@
{
pgf-node-code =
{
- \pgfsetfillcolor{red!15}%
- \pgfusepathqfill
+ \pgfsetstrokecolor{red}%
+ \pgfusepathqstroke
}
}
\begin{pNiceMatrix}
Modified: trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx 2025-08-26 06:58:19 UTC (rev 76148)
+++ trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx 2025-08-26 20:02:23 UTC (rev 76149)
@@ -17,8 +17,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{7.2a}
-\def\myfiledate{2025/08/17}
+\def\myfileversion{7.2b}
+\def\myfiledate{2025/08/26}
%
%
%<*batchfile>
@@ -3508,7 +3508,7 @@
\cs_new_protected:Npn \@@_print_node_cell:
{
\socket_use:nn { nicematrix / siunitx-wrap }
- { \socket_use:nn { nicematrix / create-cell-nodes } \@@_node_cell: }
+ { \socket_use:nn { nicematrix / create-cell-nodes } { \@@_node_cell: } }
}
% \end{macrocode}
%
@@ -3530,7 +3530,7 @@
% The following instruction |\set at color| has been added on 2022/10/06. It's
% necessary only with XeLaTeX and not with the other engines (we don't know why).
% \begin{macrocode}
- \set at color
+ \sys_if_engine_xetex:T { \set at color }
\box_use:N \l_@@_cell_box
}
{ \@@_env: - \int_use:N \c at iRow - \int_use:N \c at jCol }
@@ -5440,7 +5440,10 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_make_preamble_ii_iv:nnn #1 #2 #3
{
- \use:e
+% \end{macrocode}
+% Here, |\expanded| would probably be slightly faster than |\use:e|
+% \begin{macrocode}
+ \use:e
{
\@@_make_preamble_ii_vi:nnnnnnnn
{ \str_if_eq:eeTF \l_@@_vpos_col_str { p } { t } { b } }
@@ -13609,10 +13612,17 @@
% \begin{macrocode}
\tl_if_blank:nTF { #2 }
{ \@@_Block_ii:nnnnn \c_one_int \c_one_int }
- {
- \int_compare:nNnTF { \char_value_catcode:n { 45 } } = { 13 }
- \@@_Block_i_czech:w \@@_Block_i:w
- #2 \q_stop
+ {
+ \tl_if_in:nnTF { #2 } { - }
+ {
+ \int_compare:nNnTF { \char_value_catcode:n { 45 } } = { 13 }
+ \@@_Block_i_czech:w \@@_Block_i:w
+ #2 \q_stop
+ }
+ {
+ \@@_error:nn { Bad~argument~for~Block } { #2 }
+ \@@_Block_ii:nnnnn \c_one_int \c_one_int
+ }
}
{ #1 } { #3 } { #4 }
\ignorespaces
@@ -14290,7 +14300,7 @@
v-center .meta:n = m ,
p .code:n = \bool_set_true:N \l_@@_p_block_bool ,
p .value_forbidden:n = true ,
- name .tl_set:N = \l_@@_block_name_str ,
+ name .tl_set:N = \l_@@_block_name_str , % .str_set:N ?
name .value_required:n = true ,
name .initial:n = ,
respect-arraystretch .code:n =
@@ -16773,7 +16783,9 @@
% \end{macrocode}
%
% \bigskip
-% The following command must \emph{not} be protected.
+% The following command must \emph{not} be protected because of the
+% |\Hdotsfor| which contains a |\multicolumn|
+% (whereas the similar command |\@@_vbrace:nnn| \emph{must} be protected).
% \begin{macrocode}
\cs_new:Npn \@@_hbrace:nnn #1 #2 #3
{
@@ -16832,9 +16844,8 @@
% \end{macrocode}
%
% \bigskip
-% Here we need an ``fully expandable'' command.
% \begin{macrocode}
-\NewExpandableDocumentCommand { \@@_Vbrace } { O { } m m }
+\NewDocumentCommand { \@@_Vbrace } { O { } m m }
{
\cs_if_exist:cTF { tikz at library@decorations.pathreplacing at loaded }
{ \@@_vbrace:nnn { #1 } { #2 } { #3 } }
@@ -16843,12 +16854,13 @@
% \end{macrocode}
%
%
-% The following command must \emph{not} be protected.
+% The following command must be protected (whereas the similar
+% command |\@@_hbrace:nnn| must not.
% \begin{macrocode}
-\cs_new:Npn \@@_vbrace:nnn #1 #2 #3
+\cs_new_protected:Npn \@@_vbrace:nnn #1 #2 #3
{
\int_compare:nNnTF { \c at jCol } < { 2 }
- {
+ {
\str_if_eq:nnTF { #2 } { * }
{
\NiceMatrixOptions { nullify-dots }
@@ -18000,6 +18012,18 @@
}
% \end{macrocode}
%
+% \begin{macrocode}
+\@@_msg_new:nn { Bad~argument~for~Block }
+ {
+ Bad~argument.\\
+ The~first~mandatory~argument~of~\token_to_str:N \Block\ must~
+ be~of~the~form~'i-j'~(or~completely~empty)~and~you~have~used:~
+ '#1'. \\
+ If~you~go~on,~the~\token_to_str:N \Block\ will~be~mono-cell~(as~if~
+ the~argument~was~empty).
+ }
+% \end{macrocode}
+%
% \begin{macrocode}
\@@_msg_new:nn { last-col~non~empty~for~NiceArray }
{
Modified: trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty 2025-08-26 06:58:19 UTC (rev 76148)
+++ trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty 2025-08-26 20:02:23 UTC (rev 76149)
@@ -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{7.2a}
-\def\myfiledate{2025/08/17}
+\def\myfileversion{7.2b}
+\def\myfiledate{2025/08/26}
\RequirePackage{pgfcore}
\usepgfmodule{shapes}
\ProvidesExplPackage
@@ -1433,7 +1433,7 @@
\cs_new_protected:Npn \__nicematrix_print_node_cell:
{
\socket_use:nn { nicematrix / siunitx-wrap }
- { \socket_use:nn { nicematrix / create-cell-nodes } \__nicematrix_node_cell: }
+ { \socket_use:nn { nicematrix / create-cell-nodes } { \__nicematrix_node_cell: } }
}
\cs_new_protected:Npn \__nicematrix_node_cell:
{
@@ -1445,7 +1445,7 @@
{ rectangle }
{ base }
{
- \set at color
+ \sys_if_engine_xetex:T { \set at color }
\box_use:N \l__nicematrix_cell_box
}
{ \__nicematrix_env: - \int_use:N \c at iRow - \int_use:N \c at jCol }
@@ -7269,9 +7269,16 @@
\tl_if_blank:nTF { #2 }
{ \__nicematrix_Block_ii:nnnnn \c_one_int \c_one_int }
{
- \int_compare:nNnTF { \char_value_catcode:n { 45 } } = { 13 }
- \__nicematrix_Block_i_czech:w \__nicematrix_Block_i:w
- #2 \q_stop
+ \tl_if_in:nnTF { #2 } { - }
+ {
+ \int_compare:nNnTF { \char_value_catcode:n { 45 } } = { 13 }
+ \__nicematrix_Block_i_czech:w \__nicematrix_Block_i:w
+ #2 \q_stop
+ }
+ {
+ \__nicematrix_error:nn { Bad~argument~for~Block } { #2 }
+ \__nicematrix_Block_ii:nnnnn \c_one_int \c_one_int
+ }
}
{ #1 } { #3 } { #4 }
\ignorespaces
@@ -7665,7 +7672,7 @@
v-center .meta:n = m ,
p .code:n = \bool_set_true:N \l__nicematrix_p_block_bool ,
p .value_forbidden:n = true ,
- name .tl_set:N = \l__nicematrix_block_name_str ,
+ name .tl_set:N = \l__nicematrix_block_name_str , % .str_set:N ?
name .value_required:n = true ,
name .initial:n = ,
respect-arraystretch .code:n =
@@ -9330,13 +9337,13 @@
}
\keys_set:nn { nicematrix / Hbrace } { #1 }
}
-\NewExpandableDocumentCommand { \__nicematrix_Vbrace } { O { } m m }
+\NewDocumentCommand { \__nicematrix_Vbrace } { O { } m m }
{
\cs_if_exist:cTF { tikz at library@decorations.pathreplacing at loaded }
{ \__nicematrix_vbrace:nnn { #1 } { #2 } { #3 } }
{ \__nicematrix_error:nn { Hbrace~not~allowed } { \Vbrace } }
}
-\cs_new:Npn \__nicematrix_vbrace:nnn #1 #2 #3
+\cs_new_protected:Npn \__nicematrix_vbrace:nnn #1 #2 #3
{
\int_compare:nNnTF { \c at jCol } < { 2 }
{
@@ -10173,6 +10180,15 @@
\Block '~because~you~have~not~loaded~tikz.~
This~key~will~be~ignored.
}
+\__nicematrix_msg_new:nn { Bad~argument~for~Block }
+ {
+ Bad~argument.\\
+ The~first~mandatory~argument~of~\token_to_str:N \Block\ must~
+ be~of~the~form~'i-j'~(or~completely~empty)~and~you~have~used:~
+ '#1'. \\
+ If~you~go~on,~the~\token_to_str:N \Block\ will~be~mono-cell~(as~if~
+ the~argument~was~empty).
+ }
\__nicematrix_msg_new:nn { last-col~non~empty~for~NiceArray }
{
Erroneous~use.\\
More information about the tex-live-commits
mailing list.