texlive[76076] Master/texmf-dist: nicematrix (17aug25)

commits+karl at tug.org commits+karl at tug.org
Sun Aug 17 22:17:12 CEST 2025


Revision: 76076
          https://tug.org/svn/texlive?view=revision&revision=76076
Author:   karl
Date:     2025-08-17 22:17:11 +0200 (Sun, 17 Aug 2025)
Log Message:
-----------
nicematrix (17aug25)

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

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

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

Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2025-08-17 20:17:00 UTC (rev 76075)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2025-08-17 20:17:11 UTC (rev 76076)
@@ -832,6 +832,9 @@
 \item Un bloc mono-case permet d'utiliser la commande |\\| pour composer le
 bloc sur plusieurs lignes de texte.
 
+\item On peut couper la case en plusieurs parties avec |&| quand la clé
+|&-in-blocks| est activée (voir p.~\pageref{ampersand-in-blocks}).
+
 \item On peut utiliser l'option d'alignement horizontal du bloc pour déroger à
   la consigne générale donnée dans le préambule pour cette colonne (cf.~\ref{horizontal-pos-block}
   p.~\pageref{horizontal-pos-block}).
@@ -844,35 +847,7 @@
 \item On peut tracer une ou plusieurs bordures de la case avec la clé |borders|.
 \end{itemize}
 
-\medskip
-\begin{Code}[width=10cm]
-\begin{NiceTabular}{cc}
-\toprule
-Écrivain
-& \emph{\Block[l]{}{année de\\ naissance}} \\
-\midrule
-Hugo & 1802 \\
-Balzac & 1799 \\
-\bottomrule
-\end{NiceTabular}
-\end{Code}
-%
-\begin{NiceTabular}{cc}[no-cell-nodes]
-\toprule
-Écrivain
-& \Block[l]{}{année de\\ naissance} \\
-\midrule
-Hugo & 1802 \\
-Balzac & 1799 \\
-\bottomrule
-\end{NiceTabular}
 
-\medskip
-On rappelle que si le premier argument obligatoire de |\Block| est laissé
-blanc, alors le bloc est mono-case\footnote{On peut considérer que la valeur par
-défaut de ce premier argument obligatoire est |1-1|.}.
-
-
 \subsection{Positionnement horizontal du contenu des blocs}
 
 \label{horizontal-pos-block}
@@ -1175,6 +1150,7 @@
 
 \subsection{\textbackslash\textbackslash\ et \& dans les blocs}
 
+\label{ampersand-in-blocks}
 \index{ampersand-in-blocks}
 \index{\&-in-blocks}
 
@@ -5504,7 +5480,7 @@
 environnements de \pkg{nicematrix}. 
 
 \medskip
-\begin{Code}[width = 10.6cm]
+\begin{Code}[width = 10.9cm]
 $\begin{pNiceArray}{\emph{S}cW{c}{1cm}c}[nullify-dots,first-row]
 {C_1} & \Cdots &  & C_n \\
 2.3  & 0 & \Cdots & 0 \\
@@ -5796,7 +5772,7 @@
 
 \medskip
 \begin{scope}
-\begin{Code}[width=10cm]
+\begin{Code}[width=10.5cm]
 $\begin{bNiceMatrix}[\emph{light-syntax},first-row,first-col]
 {} a             b                 ;
 a  2\cos a       {\cos a + \cos b} ;
@@ -5814,7 +5790,7 @@
 \medskip
 \index{end-of-row (à utiliser avec light-syntax)}
 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
+l'option \Definition{end-of-row}. Comme dit précédemment, la valeur initiale de ce
 paramètre est un point-virgule.
 
 \medskip
@@ -6195,19 +6171,18 @@
 
 
 \medskip
-\index{left-margin}
-\index{right-margin}
-Les «nœuds larges» de la première colonne et de la dernière colonne peuvent
-apparaître trop petits pour certains usages. C'est pourquoi il est possible
-d'utiliser les options \Definition{left-margin} et \Definition{right-margin}
-pour ajouter de l'espace des deux côtés du tableau et aussi de l'espace dans les
-«nœuds larges» de la première colonne et de la dernière colonne. Dans l'exemple
-suivant, nous avons utilisé les options |left-margin| et
-|right-margin|.\footnote{Les options |left-margin| et |right-margin| prennent
-  des dimensions comme valeurs mais, si aucune valeur n'est donnée, c'est la
-  valeur par défaut qui est utilisée et elle est égale à |\arraycolsep| (valeur
-  initiale : 5~pt). Il existe aussi une option |margin| pour fixer à la fois
-  |left-margin| et |right-margin|.} 
+\index{left-margin} \index{right-margin} Les «nœuds larges» de la première
+colonne et de la dernière colonne peuvent apparaître trop petits pour certains
+usages. C'est pourquoi il est possible d'utiliser les options
+\Definition{left-margin} et \Definition{right-margin} pour ajouter de l'espace
+des deux côtés du tableau et aussi de l'espace dans les «nœuds larges» de la
+première colonne et de la dernière colonne. Dans l'exemple suivant, nous avons
+utilisé les options |left-margin| et |right-margin|.\footnote{Les options
+  |left-margin| et |right-margin| prennent des dimensions comme valeurs mais, si
+  aucune valeur n'est donnée, c'est la valeur par défaut qui est utilisée et
+  elle est égale à |\arraycolsep| (valeur initiale : 5~pt). Il existe aussi une
+  option \Definition{margin} pour fixer à la fois |left-margin| et
+  |right-margin|.}
 \[\begin{pNiceMatrix}[create-large-nodes,left-margin,right-margin]
 \CodeBefore [create-cell-nodes]
     \begin{tikzpicture}
@@ -6265,13 +6240,13 @@
 et ne correspondent donc pas nécessairement aux cases délimitées par des filets.
 
 \medskip
-\begin{minipage}[c]{7.5cm}
+\begin{minipage}[c]{8cm}
 Voici un tableau qui a été composé de la manière suivante :
 
 \medskip
 \begin{Code}
 \large
-\begin{NiceTabular}{wl{2cm}ll}[hvlines]
+\begin{NiceTabular}{w{l}{2cm}ll}[hvlines]
 fraise & amande & abricot \\
 prune & pêche & poire  \\[1ex]
 noix & noisette & brugnon
@@ -6278,10 +6253,10 @@
 \end{NiceTabular}
 \end{Code}
 \end{minipage}
-\hspace{1cm}
+\hspace{7mm}
 \begin{scope}
 \large
-\begin{NiceTabular}[c]{wl{2cm}ll}[hvlines]
+\begin{NiceTabular}[c]{w{l}{2cm}ll}[hvlines]
 fraise & amande & abricot \\
 prune & pêche & poire  \\[1ex]
 noix & noisette & brugnon
@@ -6289,11 +6264,11 @@
 \end{scope}
 
 \vspace{1cm}
-\begin{minipage}[c]{7cm}
+\begin{minipage}[c]{7.5cm}
 Ci-contre, on a colorié toutes les cases de ce tableau avec
 |\chessboardcolors| (cf.~p.~\pageref{chessboardcolors}).
 \end{minipage}
-\hspace{1.5cm}
+\hspace{1.2cm}
 \begin{scope}
 \large
 \begin{NiceTabular}[c]{wl{2cm}ll}[hvlines,code-before = \chessboardcolors{red!15}{blue!15}]
@@ -6592,7 +6567,7 @@
 
 \NewDocumentCommand \crossbox { ! O { } }
   {
-    \tl_gput_right:Nx \emph{\g_nicematrix_code_before_tl}
+    \tl_gput_right:Ne \emph{\g_nicematrix_code_before_tl}
       {
         \__pantigny_crossbox:nnn
           { \arabic { iRow } }
@@ -6617,7 +6592,7 @@
 
 \NewDocumentCommand \crossbox { ! O { } }
   {
-    \tl_gput_right:Nx \g_nicematrix_code_before_tl
+    \tl_gput_right:Ne \g_nicematrix_code_before_tl
       {
         \__pantigny_crossbox:nnn
           { \arabic { iRow } }
@@ -6915,8 +6890,6 @@
 \index{Tagging Project}
 \label{Tagging Project}
 
-\colorbox{yellow!50}{\bfseries Nouveau 7.0}
-
 Depuis la version 7.0, l'extension \pkg{nicematrix} est compatible avec le
 \emph{Tagging Project} de LaTeX visant à la création automatique de PDF balisés.
 Pour le moment, seuls les tableaux simples sont correctement balisés.
@@ -6928,13 +6901,7 @@
 \begin{center}
 \small
 \begin{Code}
-\DocumentMetadata{
-  lang        = en,
-  pdfversion  = 2.0,
-  pdfstandard = ua-2,
-  pdfstandard = a-4f, 
-  \emph{testphase   = {phase-III, table, math}}
-}
+\emph{\DocumentMetadata{tagging = on}}
 \documentclass{article}
 \usepackage{lmodern}
 \usepackage{nicematrix}

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-17 20:17:00 UTC (rev 76075)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex	2025-08-17 20:17:11 UTC (rev 76076)
@@ -780,6 +780,13 @@
 \begin{itemize}
 \item It's possible to use the command |\\| in a (mono-cell) block.
 
+\item It's possible to split the cell in several sub-cells with |&| when the
+key |&-in-blocks| is in force (cf p.~\pageref{ampersand-in-blocks}).
+
+peut couper la case en plusieurs parties avec |&| quand la clé
+|&-in-blocks| est activée (voir p.~\pageref{ampersand-in-blocks}).
+
+
 \item It's possible to use the option of horizontal alignment of the block in
 derogation of the type of column given in the preamble of the array.
 
@@ -792,34 +799,8 @@
 \item It's possible to draw one or several borders of the cell with the key |borders|.
 \end{itemize}
 
-\bigskip
-\begin{Code}[width=10cm]
-\begin{NiceTabular}{cc}
-\toprule
-Writer & \emph{\Block[l]{}{year\\ of birth}} \\
-\midrule
-Hugo & 1802 \\
-Balzac & 1799 \\
-\bottomrule
-\end{NiceTabular}
-\end{Code}
-\begin{NiceTabular}{cc}
-\toprule
-Writer & \Block[l]{}{year\\ of birth} \\
-\midrule
-Hugo & 1802 \\
-Balzac & 1799 \\
-\bottomrule
-\end{NiceTabular}
 
-\medskip
-We recall that if the first mandatory argument of |\Block| is left blank, the
-block is mono-cell.\footnote{One may consider that the default value of the
-first mandatory argument of |\Block| is |1-1|.}
 
-
-
-
 \subsection{Horizontal position of the content of the block}
 
 \label{horizontal-block}
@@ -1114,6 +1095,7 @@
 
 \subsection{\textbackslash\textbackslash\ and \& in the blocks}
 
+\label{ampersand-in-blocks}
 \index{ampersand-in-blocks}
 \index{\&-in-blocks}
 
@@ -2047,6 +2029,8 @@
 
 However, in that case, it's also possible to use two other keys, \Definition{start}
 and \Definition{end}, which specify the extremities of the rule.
+
+\medskip
 \begin{Code}[width=9.5cm]
 \begin{NiceTabular}{cc\emph{|[color=blue,start=2]}ccc}
 one & two & three & four 
@@ -5647,7 +5631,7 @@
 \medskip
 \index{end-of-row (to be used with light-syntax)}
 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.
+option \Definition{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
@@ -6031,7 +6015,7 @@
 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| (by
-default: 5~pt). There is also an option |margin| to fix both |left-margin| and
+default: 5~pt). There is also an option \Definition{margin} to fix both |left-margin| and
 |right-margin| to the same value.}
 \[\begin{pNiceMatrix}[create-large-nodes,left-margin,right-margin]
 \CodeBefore [create-cell-nodes]
@@ -6408,7 +6392,7 @@
 
 \NewDocumentCommand \crossbox { ! O { } }
   {
-    \tl_gput_right:Nx \emph{\g_nicematrix_code_before_tl}
+    \tl_gput_right:Ne \emph{\g_nicematrix_code_before_tl}
       { 
         \__pantigny_crossbox:nnn 
           { \int_use:c { c at iRow } } 
@@ -6433,7 +6417,7 @@
 
 \NewDocumentCommand \crossbox { ! O { } }
   {
-    \tl_gput_right:Nx \g_nicematrix_code_before_tl
+    \tl_gput_right:Ne \g_nicematrix_code_before_tl
       { 
         \__pantigny_crossbox:nnn 
           { \int_use:c { c at iRow } } 
@@ -6717,25 +6701,17 @@
 \index{Tagging Project}
 \label{Tagging Project}
 
-\colorbox{yellow!50}{\bfseries New 7.0}
-
 Since the version 7.0, the extension \pkg{nicematrix} is compatible with the
 \emph{Tagging Project} of LaTeX (whose aim is to create tagged PDF). At this time, only
 simple standard tabulars are correctly tagged.
 
-Here is a example of code which will produce a generate tagged PDF.
+Here is a example of code which will generate a tagged PDF.
 
 \bigskip
 \begin{center}
 \small
 \begin{Code}
-\DocumentMetadata{
-  lang        = en,
-  pdfversion  = 2.0,
-  pdfstandard = ua-2,
-  pdfstandard = a-4f, 
-  \emph{testphase   = {phase-III, table, math}}
-}
+\emph{\DocumentMetadata{tagging = on}}
 \documentclass{article}
 \usepackage{lmodern}
 \usepackage{nicematrix}

Modified: trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx	2025-08-17 20:17:00 UTC (rev 76075)
+++ trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx	2025-08-17 20:17:11 UTC (rev 76076)
@@ -17,8 +17,8 @@
 %
 % \fi
 % \iffalse
-\def\myfileversion{7.2}
-\def\myfiledate{2025/08/05}
+\def\myfileversion{7.2a}
+\def\myfiledate{2025/08/17}
 %
 %
 %<*batchfile>  
@@ -3100,6 +3100,11 @@
 %    \begin{macrocode}
     \cs_set_eq:NN \CodeAfter \@@_CodeAfter_i:
 %    \end{macrocode}
+% The following link only to have a better error message when |\Hline| is used
+% in another place than the beginning of a line.
+%    \begin{macrocode}
+    \cs_set_eq:NN \Hline \@@_Hline_in_cell:
+%    \end{macrocode}
 % We increment the LaTeX counter |jCol|, which is the counter of the columns. 
 %    \begin{macrocode}
     \int_gincr:N \c at jCol 
@@ -4643,7 +4648,7 @@
 %    \end{macrocode}
 %
 % 
-% The sequence |\g_@@_blocks_seq| will contain the charateristics of the blocks
+% The sequence |\g_@@_blocks_seq| will contain the characteristics of the blocks
 % (specified by |\Block|) of the array. The sequence |\g_@@_pos_of_blocks_seq|
 % will contain only the position of the blocks.
 %    \begin{macrocode}
@@ -5415,7 +5420,7 @@
 % the standard version of |\setlength|.
 %    \begin{macrocode}
     \setlength { \l_tmpa_dim } { #2 }
-    \@@_make_preamble_ii_iv:nnn { \l_tmpa_dim } { minipage } { }
+    \@@_make_preamble_ii_iv:nnn { \dim_use:N \l_tmpa_dim } { minipage } { } 
   }
 %    \end{macrocode}
 %
@@ -5717,10 +5722,10 @@
 %    \begin{macrocode}
     \setlength { \l_tmpa_dim } { #2 }    
     \IfPackageLoadedTF { varwidth }
-      { \@@_make_preamble_ii_iv:nnn { \l_tmpa_dim } { varwidth } { } }
+      { \@@_make_preamble_ii_iv:nnn { \dim_use:N \l_tmpa_dim } { varwidth } { } }
       { 
         \@@_error_or_warning:n { varwidth~not~loaded }
-        \@@_make_preamble_ii_iv:nnn { \l_tmpa_dim } { minipage } { } 
+        \@@_make_preamble_ii_iv:nnn { \dim_use:N \l_tmpa_dim } { minipage } { } 
       }
   }
 %    \end{macrocode}
@@ -12469,7 +12474,7 @@
   }
 %    \end{macrocode}
 %
-%
+% 
 % \medskip
 % The command |\@@_Hline:| will be linked to |\Hline| in the environments of
 % \pkg{nicematrix}. 
@@ -17307,7 +17312,22 @@
   }
 %    \end{macrocode}
 %
+% \medskip
 %    \begin{macrocode}
+\cs_new_protected:Npn \@@_Hline_in_cell:
+  { \@@_fatal:n { Misuse~of~Hline } }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\@@_msg_new:nn { Misuse~of~Hline }
+  {
+    Misuse~of~Hline. \\
+    \token_to_str:N \Hline\ must~be~used~only~at~the~beginning~of~a~row.\\
+    That~error~is~fatal.
+  }
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
 \@@_msg_new:nn { hvlines,~rounded-corners~and~corners }
   {
     Incompatible~options.\\

Modified: trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2025-08-17 20:17:00 UTC (rev 76075)
+++ trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2025-08-17 20:17:11 UTC (rev 76076)
@@ -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.2}
-\def\myfiledate{2025/08/05}
+\def\myfileversion{7.2a}
+\def\myfiledate{2025/08/17}
 \RequirePackage{pgfcore}
 \usepgfmodule{shapes}
 \ProvidesExplPackage
@@ -1216,6 +1216,7 @@
   {
     \tl_gclear:N \g__nicematrix_cell_after_hook_tl
     \cs_set_eq:NN \CodeAfter \__nicematrix_CodeAfter_i:
+    \cs_set_eq:NN \Hline \__nicematrix_Hline_in_cell:
     \int_gincr:N \c at jCol
     \int_compare:nNnT { \c at jCol } = { \c_one_int }
       {
@@ -2398,7 +2399,7 @@
     \str_set:Nn \l__nicematrix_hpos_col_str { j }
     \__nicematrix_keys_p_column:n { #1 }
     \setlength { \l_tmpa_dim } { #2 }
-    \__nicematrix_make_preamble_ii_iv:nnn { \l_tmpa_dim } { minipage } { }
+    \__nicematrix_make_preamble_ii_iv:nnn { \dim_use:N \l_tmpa_dim } { minipage } { }
   }
 \cs_new_protected:Npn \__nicematrix_keys_p_column:n #1
   { \keys_set_known:nnN { nicematrix / p-column } { #1 } \l_tmpa_tl }
@@ -2556,10 +2557,10 @@
     \__nicematrix_keys_p_column:n { #1 }
     \setlength { \l_tmpa_dim } { #2 }
     \IfPackageLoadedTF { varwidth }
-      { \__nicematrix_make_preamble_ii_iv:nnn { \l_tmpa_dim } { varwidth } { } }
+      { \__nicematrix_make_preamble_ii_iv:nnn { \dim_use:N \l_tmpa_dim } { varwidth } { } }
       {
         \__nicematrix_error_or_warning:n { varwidth~not~loaded }
-        \__nicematrix_make_preamble_ii_iv:nnn { \l_tmpa_dim } { minipage } { }
+        \__nicematrix_make_preamble_ii_iv:nnn { \dim_use:N \l_tmpa_dim } { minipage } { }
       }
   }
 \cs_new_protected:Npn \__nicematrix_w: { \__nicematrix_make_preamble_w:nnnn { } }
@@ -9684,6 +9685,14 @@
       { ~Maybe~your~use~of~ \token_to_str:N \Hdotsfor \ or~
         \token_to_str:N \Hbrace \ is~incorrect. }
   }
+\cs_new_protected:Npn \__nicematrix_Hline_in_cell:
+  { \__nicematrix_fatal:n { Misuse~of~Hline } }
+\__nicematrix_msg_new:nn { Misuse~of~Hline }
+  {
+    Misuse~of~Hline. \\
+    \token_to_str:N \Hline\ must~be~used~only~at~the~beginning~of~a~row.\\
+    That~error~is~fatal.
+  }
 \__nicematrix_msg_new:nn { hvlines,~rounded-corners~and~corners }
   {
     Incompatible~options.\\



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