texlive[66151] Master/texmf-dist: nicematrix (25feb23)

commits+karl at tug.org commits+karl at tug.org
Sat Feb 25 23:05:11 CET 2023


Revision: 66151
          http://tug.org/svn/texlive?view=revision&revision=66151
Author:   karl
Date:     2023-02-25 23:05:11 +0100 (Sat, 25 Feb 2023)
Log Message:
-----------
nicematrix (25feb23)

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	2023-02-25 22:04:57 UTC (rev 66150)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex	2023-02-25 22:05:11 UTC (rev 66151)
@@ -526,6 +526,13 @@
 \textsl{liste} est une liste de couples \textsl{clé=valeur} de TikZ spécifiant
 les caractéristiques graphiques des traits qui seront dessinés (pour un exemple,
 voir p.~\pageref{tiretes}).
+
+\item \colorbox{yellow!50}{\textbf{Nouveau 6.15}}\par\nobreak
+Par défaut, les filets ne sont pas tracés dans les blocs (voir à ce sujet la
+partie sur les filets, section~\ref{rules} p.~\pageref{rules}). Néanmoins, si la
+clé |transparent| est utilisée, les filets seront tracés. Pour un example, voir
+la section~\ref{tikz-key-examples}, page~\pageref{tikz-key-examples}.
+
 \end{itemize}
 
 Il existe aussi des clés de positionnement horizontal et vertical du bloc qui
@@ -811,7 +818,7 @@
 impliquées dans le bloc.
 
 \item Avec la clé |T|, le contenu du bloc est calé vers le haut (avec une marge
-égale au paramètre |inner ysep| de PGF/Tikz).
+égale au paramètre |inner ysep| de PGF/Tikz --- que l'on peut régler avec |\pgfset|).
 
 \item Avec la clé |B|, le contenu du bloc est calé vers le bas (avec une marge
 égale au paramètre |inner ysep| de PGF/Tikz).
@@ -3463,7 +3470,36 @@
 Pour un exemple, voir \ref{submatrix-in-codebefore} 
 p.~\pageref{submatrix-in-codebefore}.
 
+\bigskip
+En dépit de son nom, la commande |\SubMatrix| peut être utilisée également dans
+|{NiceTabular}| comme dans l'exemple suivant (qui utilise |\bottomrule| et
+|\toprule| de \pkg{booktabs}). 
 
+\begin{BVerbatim}[baseline=c]
+\begin{NiceTabular}{~@{}ll~@{}}
+\toprule
+Part A              & the first part \\
+\Block{2-1}{Part B} & a first sub-part \\
+                    & a second sub-part \\
+\bottomrule
+\CodeAfter
+  ~emphase#\SubMatrix{\{}{2-2}{3-2}{.}@
+\end{NiceTabular}
+\end{BVerbatim}
+\hspace{2cm}
+\begin{NiceTabular}{@{}ll@{}}
+\toprule
+Part A              & the first part \\
+\Block{2-1}{Part B} & a first sub-part \\
+                    & a second sub-part \\
+\bottomrule
+\CodeAfter
+  \SubMatrix{\{}{2-2}{3-2}{.}
+\end{NiceTabular} 
+
+
+
+
 \subsection{Les commandes \textbackslash OverBrace et \textbackslash
   UnderBrace dans le \textbackslash CodeAfter}
 
@@ -5163,7 +5199,11 @@
 \pkg{nicematrix} en créant un style de ligne personnalisée avec |custom-line| :
 cf.~p.~\pageref{custom-line}.
 
+\medskip
+Les colonnes |d| de l'extension \pkg{dcolumn} ne sont pas prises en compte (mais
+on utiliser la colonne |S| de \pkg{siunitx}). 
 
+
 \section{Exemples}
 
 \subsection{Utilisation de la clé «tikz» de la commande \textbackslash Block}
@@ -5213,6 +5253,35 @@
 \end{center}
 
 
+\bigskip
+Dans l'exemple suivant, on utilise la clé |tikz| pour hachurer une ligne du
+tableau. On remarquera que l'on utilise la clé |transparent| de la commande
+|\Block| pour que les filets sont tracés dans le bloc.\footnote{Par défaut, les filets ne sont pas tracés dans les blocs créés avec la commande 
+\texttt{\textbackslash Block} : cf.~section~\ref{rules} p.~\pageref{rules}}
+
+\begin{Verbatim}
+\begin{NiceTabular}{ccc}[hvlines]
+\CodeBefore
+  \columncolor[RGB]{169,208,142}{2}
+\Body
+un & deux & trois \\
+\Block[~emphase#transparent, tikz={pattern = north west lines, pattern color = gray}@]{1-*}{}
+quatre & cinq & six \\
+sept & huit & neuf
+\end{Verbatim}
+
+\begin{center}
+\begin{NiceTabular}{ccc}[hvlines]
+\CodeBefore
+  \columncolor[RGB]{169,208,142}{2}
+\Body
+un & deux & trois \\
+\Block[transparent, tikz={pattern = north west lines, pattern color = gray}]{1-*}{}
+quatre & cinq & six \\
+sept & huit & neuf
+\end{NiceTabular}
+\end{center}
+
 \subsection{Notes dans les tableaux}
 
 \label{ex:notes}

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	2023-02-25 22:04:57 UTC (rev 66150)
+++ trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix.dtx	2023-02-25 22:05:11 UTC (rev 66151)
@@ -1,4 +1,4 @@
-% \iffalse meta-comment
+% \iffalse meta-comment 
 %
 % This file should be compiled with $xelatex$.
 %
@@ -17,8 +17,8 @@
 %
 % \fi
 % \iffalse
-\def\myfileversion{6.14}
-\def\myfiledate{2023/02/18}
+\def\myfileversion{6.15}
+\def\myfiledate{2023/02/25}
 %
 %
 %<*batchfile>
@@ -577,6 +577,11 @@
 % |tikz={|\textsl{list}|}| where \textsl{list} is a list of couples
 % \textsl{key=value} of Tikz specifying the graphical characteristics of the
 % lines that will be drawn (for an example, see p.~\pageref{dashed}). 
+% \item \colorbox{yellow!50}{\textbf{Nouveau 6.15}}\par\nobreak
+% By default, the rules are not drawn in the blocks (see the section about the
+% rules: section~\ref{rules} p.~\pageref{rules}). However, if the key
+% |transparent| is used, the rules are drawn. For an example, see
+% section~\ref{tikz-key-examples} on page~\pageref{tikz-key-examples}.
 % \end{itemize}
 %
 % There is also keys for the horizontal and vertical positions of the content of
@@ -857,7 +862,8 @@
 % separated by |\\|) is aligned with the baseline of the last of the rows of the
 % array involved in the block.
 % \item With the key |T|, the content of the block is set upwards with only a
-% margin equal to the PGF/Tikz parameter |inner ysep|.
+% margin equal to the PGF/Tikz parameter |inner ysep| (use |\pgfset| to change
+% the value of that parameter).
 % \item With the key |B|, the content of the block is set downwards with only a
 % margin equal to the PGF/Tikz parameter |inner ysep|.
 % \end{itemize}
@@ -3214,8 +3220,35 @@
 % \CodeAfter \line[shorten=6pt]{1-5}{4-7}
 % \end{bNiceMatrix}\]
 % 
+% 
 %
+% \bigskip
+% Despite its name, the command |\SubMatrix| may also be used within a 
+% |{NiceTabular}|. Here is an example (which uses |\bottomrule| and
+% |\toprule| of \pkg{booktabs}). 
 %
+% \begin{BVerbatim}[baseline=c]
+% \begin{NiceTabular}{~@{}ll~@{}}
+% \toprule
+% Part A              & the first part \\
+% \Block{2-1}{Part B} & a first sub-part \\
+%                     & a second sub-part \\
+% \bottomrule
+% \CodeAfter
+%   ~emphase#\SubMatrix{\{}{2-2}{3-2}{.}@
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \hspace{2cm}
+% \begin{NiceTabular}{@{}ll@{}}
+% \toprule
+% Part A              & the first part \\
+% \Block{2-1}{Part B} & a first sub-part \\
+%                     & a second sub-part \\
+% \bottomrule
+% \CodeAfter
+%   \SubMatrix{\{}{2-2}{3-2}{.}
+% \end{NiceTabular} 
+%
 % \subsection{The command \textbackslash SubMatrix in the \textbackslash CodeAfter}
 % 
 % \label{sub-matrix}
@@ -5093,12 +5126,15 @@
 % dashed rules with the tools provided by \pkg{nicematrix}, by creating a
 % customized line style with |custom-line|: cf.~p.~\pageref{custom-line}.
 %
+% \bigskip
+% The columns |d| of \pkg{dcolumn} are not supported (but it's possible to use
+% the colums |S| of \pkg{siunitx}).
 % 
 % \section{Examples}
 %
 % \subsection[{Utilisation of the key 'tikz' of the command \textbackslash
 % Block}]{Utilisation of the key ``tikz'' of the command \textbackslash Block} 
-%\label{tikz-key-examples}
+% \label{tikz-key-examples}
 %
 %
 % The key |tikz| of the command |\Block| is available only when Tikz is
@@ -5144,7 +5180,37 @@
 % \end{NiceTabular}
 % \end{center}
 %
+% \bigskip
+% In the following example, we use the key |tikz| to hatch a row of the tabular.
+% Remark that you use the key |transparent| of the command |\Block| in order to
+% have the rules drawn in the block.\footnote{By default, the rules are not
+% drawn in the blocks created by the command |\Block|: cf.~section~\ref{rules}
+% p.~\pageref{rules}} 
 %
+% \begin{Verbatim}
+% \begin{NiceTabular}{ccc}[hvlines]
+% \CodeBefore
+%   \columncolor[RGB]{169,208,142}{2}
+% \Body
+% one & two & three \\
+% \Block[~emphase#transparent, tikz={pattern = north west lines, pattern color = gray}@]{1-*}{}
+% four & five & six \\
+% seven & eight & nine
+% \end{Verbatim}
+%
+% \begin{center}
+% \begin{NiceTabular}{ccc}[hvlines]
+% \CodeBefore
+%   \columncolor[RGB]{169,208,142}{2}
+% \Body
+% one & two & three \\
+% \Block[transparent, tikz={pattern = north west lines, pattern color = gray}]{1-*}{}
+% four & five & six \\
+% seven & eight & nine
+% \end{NiceTabular}
+% \end{center}
+%
+%
 % \subsection{Notes in the tabulars}
 %
 % \label{ex:notes}
@@ -10439,7 +10505,8 @@
 %    \end{macrocode}
 % We add a last column to raise a good error message when the user puts more
 % columns than allowed by its preamble. However, for technical reasons, it's not
-% possible to do that in |{NiceTabular*}| (|\l_@@_tabular_width_dim|=0pt).
+% possible to do that in |{NiceTabular*}| (we control that with the value of 
+% |\l_@@_tabular_width_dim|). 
 %    \begin{macrocode}
     \dim_compare:nNnT \l_@@_tabular_width_dim = \c_zero_dim 
       { 
@@ -12690,8 +12757,15 @@
       { 
         * 
           { 
-            \int_compare:nNnTF \l_@@_last_col_int < 0
-              \c at MaxMatrixCols
+            \int_case:nnF \l_@@_last_col_int 
+              { 
+                { -2 } { \c at MaxMatrixCols }
+                { -1 } { \int_eval:n { \c at MaxMatrixCols + 1 } } 
+%    \end{macrocode}
+% The value $0$ can't occur here since we are in a matrix (which is an
+% environment without preamble). 
+%    \begin{macrocode}
+              }
               { \int_eval:n { \l_@@_last_col_int - 1 } }
           } 
           { #2 }
@@ -18459,6 +18533,7 @@
                 - base 
               } 
           } 
+        \dim_sub:Nn \l_tmpa_dim { 0.5 \arrayrulewidth } % added 2023-02-21
 %    \end{macrocode}
 % We retrieve (in |\pgf at x|) the $x$-value of the center of the block.
 %    \begin{macrocode}
@@ -20405,8 +20480,12 @@
         \int_compare:nNnTF \l_@@_last_col_int = { -2 }
         { \@@_fatal:n { too~much~cols~for~matrix } }
         {
-          \bool_if:NF \l_@@_last_col_without_value_bool
-            { \@@_fatal:n { too~much~cols~for~matrix~with~last~col } }
+          \int_compare:nNnTF \l_@@_last_col_int = { -1 }
+            { \@@_fatal:n { too~much~cols~for~matrix } }
+            {
+              \bool_if:NF \l_@@_last_col_without_value_bool
+                { \@@_fatal:n { too~much~cols~for~matrix~with~last~col } }
+            }
         }
       }
       { \@@_fatal:n { too~much~cols~for~array } }
@@ -20445,7 +20524,7 @@
 \@@_msg_new:nn { too~much~cols~for~matrix~with~last~col }
   { 
     Too~much~columns.\\
-    In~the~row~\int_eval:n { \c at iRow - 1 },~
+    In~the~row~\int_eval:n { \c at iRow },~
     you~try~to~use~more~columns~
     than~allowed~by~your~\@@_full_name_env:.\@@_message_hdotsfor:\ 
     The~maximal~number~of~columns~is~\int_eval:n { \l_@@_last_col_int - 1 }~
@@ -20458,24 +20537,23 @@
 \@@_msg_new:nn { too~much~cols~for~matrix }
   { 
     Too~much~columns.\\
-    In~the~row~\int_eval:n { \c at jCol - 1 },~
+    In~the~row~\int_eval:n { \c at iRow },~
     you~try~to~use~more~columns~than~allowed~by~your~
     \@@_full_name_env:.\@@_message_hdotsfor:\ Recall~that~the~maximal~
-    number~of~columns~for~a~matrix~is~fixed~by~the~LaTeX~counter~
-    'MaxMatrixCols'.~Its~current~value~is~\int_use:N \c at MaxMatrixCols.~
+    number~of~columns~for~a~matrix~(excepted~the~potential~exterior~
+    columns)~is~fixed~by~the~LaTeX~counter~'MaxMatrixCols'.~
+    Its~current~value~is~\int_use:N \c at MaxMatrixCols\ (use~
+    \token_to_str:N \setcounter\ to~change~that~value).~
     This~error~is~fatal.
   }
 %    \end{macrocode}
 %
 % \medskip
-% For the following message, remind that the test is not done after the
-% construction of the array but in each row. That's why we have to put
-% |\c at jCol-1| and not |\c at jCol|.
 %    \begin{macrocode}
 \@@_msg_new:nn { too~much~cols~for~array }
   { 
     Too~much~columns.\\
-    In~the~row~\int_eval:n { \c at jCol - 1 },~
+    In~the~row~\int_eval:n { \c at iRow },~
     ~you~try~to~use~more~columns~than~allowed~by~your~
     \@@_full_name_env:.\@@_message_hdotsfor:\ The~maximal~number~of~columns~is~ 
     \int_use:N \g_@@_static_num_of_col_int\ 
@@ -21562,6 +21640,13 @@
 % \small
 % \nolinkurl{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty}
 % }
+%
+%
+% \subsection*{Changes between version 6.14 and 6.15}
+%
+% New key |transparent| for the command |\Block| (with that key, the rules are
+% drawn within the block).
+%
 % \subsection*{Changes between version 6.13 and 6.14}
 %
 % New keys for the command |\Block| for the vertical position of the content of

Modified: trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2023-02-25 22:04:57 UTC (rev 66150)
+++ trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty	2023-02-25 22:05:11 UTC (rev 66151)
@@ -18,8 +18,8 @@
 %% and version 1.3 or later is part of all distributions of
 %% LaTeX version 2005/12/01 or later.
 %% 
-\def\myfileversion{6.14}
-\def\myfiledate{2023/02/18}
+\def\myfileversion{6.15}
+\def\myfiledate{2023/02/25}
 
 \RequirePackage{pgfcore}
 \usepgfmodule{shapes}
@@ -3389,8 +3389,11 @@
       {
         *
           {
-            \int_compare:nNnTF \l__nicematrix_last_col_int < 0
-              \c at MaxMatrixCols
+            \int_case:nnF \l__nicematrix_last_col_int
+              {
+                { -2 } { \c at MaxMatrixCols }
+                { -1 } { \int_eval:n { \c at MaxMatrixCols + 1 } }
+              }
               { \int_eval:n { \l__nicematrix_last_col_int - 1 } }
           }
           { #2 }
@@ -6940,6 +6943,7 @@
                 - base
               }
           }
+        \dim_sub:Nn \l_tmpa_dim { 0.5 \arrayrulewidth } % added 2023-02-21
         \pgfpointanchor
           {
             \__nicematrix_env: - #1 - #2 - block
@@ -8268,8 +8272,12 @@
         \int_compare:nNnTF \l__nicematrix_last_col_int = { -2 }
         { \__nicematrix_fatal:n { too~much~cols~for~matrix } }
         {
-          \bool_if:NF \l__nicematrix_last_col_without_value_bool
-            { \__nicematrix_fatal:n { too~much~cols~for~matrix~with~last~col } }
+          \int_compare:nNnTF \l__nicematrix_last_col_int = { -1 }
+            { \__nicematrix_fatal:n { too~much~cols~for~matrix } }
+            {
+              \bool_if:NF \l__nicematrix_last_col_without_value_bool
+                { \__nicematrix_fatal:n { too~much~cols~for~matrix~with~last~col } }
+            }
         }
       }
       { \__nicematrix_fatal:n { too~much~cols~for~array } }
@@ -8295,7 +8303,7 @@
 \__nicematrix_msg_new:nn { too~much~cols~for~matrix~with~last~col }
   {
     Too~much~columns.\\
-    In~the~row~\int_eval:n { \c at iRow - 1 },~
+    In~the~row~\int_eval:n { \c at iRow },~
     you~try~to~use~more~columns~
     than~allowed~by~your~\__nicematrix_full_name_env:.\__nicematrix_message_hdotsfor:\
     The~maximal~number~of~columns~is~\int_eval:n { \l__nicematrix_last_col_int - 1 }~
@@ -8304,17 +8312,19 @@
 \__nicematrix_msg_new:nn { too~much~cols~for~matrix }
   {
     Too~much~columns.\\
-    In~the~row~\int_eval:n { \c at jCol - 1 },~
+    In~the~row~\int_eval:n { \c at iRow },~
     you~try~to~use~more~columns~than~allowed~by~your~
     \__nicematrix_full_name_env:.\__nicematrix_message_hdotsfor:\ Recall~that~the~maximal~
-    number~of~columns~for~a~matrix~is~fixed~by~the~LaTeX~counter~
-    'MaxMatrixCols'.~Its~current~value~is~\int_use:N \c at MaxMatrixCols.~
+    number~of~columns~for~a~matrix~(excepted~the~potential~exterior~
+    columns)~is~fixed~by~the~LaTeX~counter~'MaxMatrixCols'.~
+    Its~current~value~is~\int_use:N \c at MaxMatrixCols\ (use~
+    \token_to_str:N \setcounter\ to~change~that~value).~
     This~error~is~fatal.
   }
 \__nicematrix_msg_new:nn { too~much~cols~for~array }
   {
     Too~much~columns.\\
-    In~the~row~\int_eval:n { \c at jCol - 1 },~
+    In~the~row~\int_eval:n { \c at iRow },~
     ~you~try~to~use~more~columns~than~allowed~by~your~
     \__nicematrix_full_name_env:.\__nicematrix_message_hdotsfor:\ The~maximal~number~of~columns~is~
     \int_use:N \g__nicematrix_static_num_of_col_int\



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