From e7ae872926eddb0de09ecfe1c578e0680033955a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 26 Feb 2023 03:02:12 +0000 Subject: CTAN sync 202302260302 --- .../latex/contrib/nicematrix/nicematrix-french.pdf | Bin 527832 -> 533310 bytes .../latex/contrib/nicematrix/nicematrix-french.tex | 71 +++++++++++- macros/latex/contrib/nicematrix/nicematrix.dtx | 121 ++++++++++++++++++--- macros/latex/contrib/nicematrix/nicematrix.pdf | Bin 1339763 -> 1341260 bytes 4 files changed, 173 insertions(+), 19 deletions(-) (limited to 'macros/latex/contrib/nicematrix') diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf index 0d115788fc..3ce4049f78 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix-french.pdf and b/macros/latex/contrib/nicematrix/nicematrix-french.pdf differ diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index 5f3101b372..6340ef2e45 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -526,6 +526,13 @@ la clé |borders| mettre une entrée de la forme |tikz={|\textsl{liste}|}| où \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 @@ ligne de base de la première rangée concernée par le bloc. 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,6 +3470,35 @@ une extrémité ouverte. 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,6 +5199,10 @@ il est conseillé de tracer les filets en tiretés avec les commandes de \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} @@ -5213,6 +5253,35 @@ Pour l'exemple suivant, la bibliothèque \pkg{patterns} de TikZ doit aussi être \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} diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index dceae17ad9..3083528029 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -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 @@ version 2005/12/01 or later. % |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 @@ version 2005/12/01 or later. % 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,7 +3220,34 @@ version 2005/12/01 or later. % \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} % @@ -5093,12 +5126,15 @@ version 2005/12/01 or later. % 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,6 +5180,36 @@ version 2005/12/01 or later. % \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} % @@ -10439,7 +10505,8 @@ version 2005/12/01 or later. % \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 @@ version 2005/12/01 or later. { * { - \int_compare:nNnTF \l_@@_last_col_int < 0 - \c@MaxMatrixCols + \int_case:nnF \l_@@_last_col_int + { + { -2 } { \c@MaxMatrixCols } + { -1 } { \int_eval:n { \c@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 @@ version 2005/12/01 or later. - base } } + \dim_sub:Nn \l_tmpa_dim { 0.5 \arrayrulewidth } % added 2023-02-21 % \end{macrocode} % We retrieve (in |\pgf@x|) the $x$-value of the center of the block. % \begin{macrocode} @@ -20405,8 +20480,12 @@ version 2005/12/01 or later. \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 @@ version 2005/12/01 or later. \@@_msg_new:nn { too~much~cols~for~matrix~with~last~col } { Too~much~columns.\\ - In~the~row~\int_eval:n { \c@iRow - 1 },~ + In~the~row~\int_eval:n { \c@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 @@ version 2005/12/01 or later. \@@_msg_new:nn { too~much~cols~for~matrix } { Too~much~columns.\\ - In~the~row~\int_eval:n { \c@jCol - 1 },~ + In~the~row~\int_eval:n { \c@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@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@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@jCol-1| and not |\c@jCol|. % \begin{macrocode} \@@_msg_new:nn { too~much~cols~for~array } { Too~much~columns.\\ - In~the~row~\int_eval:n { \c@jCol - 1 },~ + In~the~row~\int_eval:n { \c@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 @@ version 2005/12/01 or later. % \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 diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf index 92cfeea69c..0f91df0b72 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix.pdf and b/macros/latex/contrib/nicematrix/nicematrix.pdf differ -- cgit v1.2.3