From fe29944c3d5256062708e9b1ae62dc378f9d9993 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 9 May 2022 03:01:47 +0000 Subject: CTAN sync 202205090301 --- .../latex/contrib/nicematrix/nicematrix-french.pdf | Bin 501742 -> 504733 bytes .../latex/contrib/nicematrix/nicematrix-french.tex | 230 +++++++++---------- macros/latex/contrib/nicematrix/nicematrix.dtx | 253 +++++++++++---------- macros/latex/contrib/nicematrix/nicematrix.pdf | Bin 1511486 -> 1512102 bytes 4 files changed, 247 insertions(+), 236 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 bfccc07f4e..92b1181a85 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 4e76c71235..66246c9ba2 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -1170,64 +1170,6 @@ Cette commande |\diagbox| peut aussi être utilisée dans un |\Block|. -\subsection{Filets en pointillés} - -\label{dotted} - -Dans les environnements de \pkg{nicematrix}, il est possible d'utiliser la -commande |\hdottedline| (fournie par \pkg{nicematrix}) qui est l'équivalent pour -les pointillés de la commande |\hline|. - -\medskip -\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] -\begin{pNiceMatrix} -1 & 2 & 3 & 4 & 5 \\ -~emphase#\hdottedline@ -6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 -\end{pNiceMatrix} -\end{BVerbatim} -$\begin{pNiceMatrix} -1 & 2 & 3 & 4 & 5 \\ -\hdottedline -6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 -\end{pNiceMatrix}$ - - -\medskip -Dans les environnements avec un préambule explicite (comme |{NiceTabular}|, -|{NiceArray}|, etc.), il est possible de dessiner un trait vertical en -pointillés avec le spécificateur «|:|». - -\medskip -\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] -\begin{pNiceArray}{cccc~emphase#:@c} -1 & 2 & 3 & 4 & 5 \\ -6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 -\end{pNiceArray} -\end{BVerbatim} -$\begin{pNiceArray}{cccc:c} -1 & 2 & 3 & 4 & 5 \\ -6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 -\end{pNiceArray}$ - -\medskip -Il est possible de changer dans \pkg{nicematrix} la lettre utilisée pour -indiquer dans le préambule un trait vertical en pointillés avec l'option -|letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|. - -\medskip -\emph{Remarque} : Quand l'extension \pkg{array} (sur laquelle s'appuie -\pkg{nicematrix}) est chargée, les traits verticaux et horizontaux que l'on -insère rendent le tableau plus large ou plus long d'une quantité égale à la -largeur du trait\footnote{En fait, avec l'extension \pkg{array}, cela est vrai - pour |\hline| et «\verb+|+» mais pas pour |\cline| : cf. - p.~\pageref{remark-cline}}. Avec \pkg{nicematrix}, les lignes en pointillés -tracées par |\hdottedline| et «|:|» ont ce même effet. - \subsection{Commandes pour filets personnalisés} \label{custom-line} @@ -1271,36 +1213,10 @@ environnement ; d'intérêt que dans le cas où la clé |multiplicity| est utilisée). \end{itemize} -\medskip -\item \emph{Deuxième possibilité}\par\nobreak - -On peut utiliser la clé |dotted| qui impose un style de pointillés qui utilise -le système de pointillés de la commande |\hdottedline| (et de la lettre -\verb|:|) décrit à la partie précédente (cf. p.~\pageref{dotted}). La clé -|color| est en fait aussi utilisable dans ce cas-là. - -\medskip -\item \colorbox{yellow!50}{\textbf{Nouveau 6.6}}\enskip \emph{Troisième - possibilité} - -On peut utiliser la clé |tikz| (si Tikz est chargé, \pkg{nicematrix} ne -chargeant par défaut que \textsc{pgf}). Dans ce cas-là, le filet est tracé -directement avec Tikz en utilisant comme paramètres la valeur de la clé |tikz| -qui doit être une liste de couples \textsl{clé=valeur} applicables à un chemin -Tikz. - -Par défaut aucune réservation de place n'est faite par défaut pour le filet qui -sera tracé avec Tikz. On peut demander une réservation (horizontale pour un -filet vertical et verticale pour un filet horizontal) avec la clé |width| qui -est donc en quelque sorte la largeur du filet qui sera tracé (cette largeur -n'est pas déduite des caractéristiques fournies par la clé |tikz|). -\end{itemize} - - \medskip Ce système permet en particulier de définir des commandes pour tracer des filets -avec une couleur spécifique (et ces filets respecteront les blocs comme les -autres filets de \pkg{nicematrix}). +avec une couleur spécifique (et ces filets respecteront les blocs et les coinn +comme les autres filets de \pkg{nicematrix}). \medskip \begin{Verbatim} @@ -1331,31 +1247,40 @@ Produit C & 5 & 4 & 1 \\ \end{center} +\item \colorbox{yellow!50}{\textbf{Nouveau 6.6}}\enskip \emph{Deuxième + possibilité} + +On peut utiliser la clé |tikz| (si Tikz est chargé, \pkg{nicematrix} ne +chargeant par défaut que \textsc{pgf}). Dans ce cas-là, le filet est tracé +directement avec Tikz en utilisant comme paramètres la valeur de la clé |tikz| +qui doit être une liste de couples \textsl{clé=valeur} applicables à un chemin +Tikz. + +Par défaut aucune réservation de place n'est faite par défaut pour le filet qui +sera tracé avec Tikz. On peut demander une réservation (horizontale pour un +filet vertical et verticale pour un filet horizontal) avec la clé |width| qui +est donc en quelque sorte la largeur du filet qui sera tracé (cette largeur +n'est pas déduite des caractéristiques fournies par la clé |tikz|). + \bigskip -Voici un exemple avec la clé |tikz|. +Voici ce que l'on obtient avec la clé |dotted| de Tikz. \begin{Verbatim} -\documentclass{article} -\usepackage{nicematrix,tikz} -\usetikzlibrary{decorations.pathmorphing} - \NiceMatrixOptions { custom-line = { letter = I , - ~emphase#tikz = { decorate, decoration = { coil, aspect = 0 } }}@ , - ~emphase#width = 2 mm@ + ~emphase#tikz = dotted @ , + ~emphase#width = \pgflinewidth@ } } -\begin{document} \begin{NiceTabular}{cIcIc} un & deux & trois \\ quatre & cinq & six \\ sept & huit & neuf \end{NiceTabular} -\end{document} \end{Verbatim} \begin{center} @@ -1364,8 +1289,8 @@ sept & huit & neuf custom-line = { letter = I , - tikz = { decorate, decoration = { coil, aspect = 0 } } , - width = 2 mm + tikz = dotted , + width = \pgflinewidth } } \begin{NiceTabular}{cIcIc} @@ -1375,6 +1300,80 @@ sept & huit & neuf \end{NiceTabular} \end{center} +\medskip +\item \emph{Troisième possibilité} : la clé |dotted|\par\nobreak +\label{dotted} + +Comme on le voit dans l'exemple précédent, les pointillés tracés par la clé +|dotted| de Tikz ne sont pas ronds. C'est pourquoi l'extension \pkg{nicematrix} +propose dans la clé |custom-line| une clé |dotted| qui va tracer des pointillés +ronds. La valeur de la clé |width| est, dans ce cas-là, déjà réglée sur le +diamètre des points. Ces pointillés ronds sont aussi utilisés par +\pkg{nicematrix} pour des lignes en pointillées continues créées entre deux +composantes de la matrice par |\Cdots|, |\Vdots|, etc (voir p.~\pageref{Cdots}). + +\medskip +L'extension \pkg{nicematrix} prédéfinit en fait la commande |\hdottedline| et la +lettre «|:|» pour ces filets en pointillés.\footnote{Néanmoins, l'utilisateur peut écraser ces définitions de |\hdottedline| et de +«|:|» avec |custom-line| s'il le souhaite (par exemple pour les remplacer par des +lignes en tiretés).} + +\smallskip +\begin{BVerbatim} +% ~textsl#présent dans nicematrix.sty@ +\NiceMatrixOptions + { + custom-line = + { + letter = : , + command = hdottedline , + dotted + } + } +\end{BVerbatim} + +\bigskip +Dans les environnements de \pkg{nicematrix}, il est donc possible d'utiliser la +commande |\hdottedline| pour tracer des filets horizontaux en pointillés. + +\medskip +\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +\begin{pNiceMatrix} +1 & 2 & 3 & 4 & 5 \\ +~emphase#\hdottedline@ +6 & 7 & 8 & 9 & 10 \\ +11 & 12 & 13 & 14 & 15 +\end{pNiceMatrix} +\end{BVerbatim} +$\begin{pNiceMatrix} +1 & 2 & 3 & 4 & 5 \\ +\hdottedline +6 & 7 & 8 & 9 & 10 \\ +11 & 12 & 13 & 14 & 15 +\end{pNiceMatrix}$ + + +\medskip +Dans les environnements avec un préambule explicite (comme |{NiceTabular}|, +|{NiceArray}|, etc.), il est possible de dessiner un trait vertical en +pointillés avec le spécificateur «|:|». + +\medskip +\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +\begin{pNiceArray}{cccc~emphase#:@c} +1 & 2 & 3 & 4 & 5 \\ +6 & 7 & 8 & 9 & 10 \\ +11 & 12 & 13 & 14 & 15 +\end{pNiceArray} +\end{BVerbatim} +$\begin{pNiceArray}{cccc:c} +1 & 2 & 3 & 4 & 5 \\ +6 & 7 & 8 & 9 & 10 \\ +11 & 12 & 13 & 14 & 15 +\end{pNiceArray}$ +\end{itemize} + + \section{Les couleurs des rangées et des colonnes} @@ -2117,9 +2116,7 @@ $\begin{array}{c} \label{varwidth} -\colorbox{yellow!50}{\textbf{Nouveau 6.3}} -\smallskip Rappelons d'abord le fonctionnement d'un environnement |{varwidth}| de l'extension éponyme \pkg{varwidth}. Un tel environnement est similaire à l'environnement classique |{minipage}| mais la largeur indiquée (en argument) @@ -3211,8 +3208,6 @@ a_{31} & a_{32} & a_{33} \subsection{Les commandes \textbackslash OverBrace et \textbackslash UnderBrace dans le \textbackslash CodeAfter} -\colorbox{yellow!50}{\textbf{Nouveau 6.4}} - Les commandes |\OverBrace| and |\UnderBrace| permettent de placer des accolades horizontales sur une partie du tableau. Ces commandes prennent trois arguments : \begin{itemize} @@ -3392,6 +3387,12 @@ des notes avant les notes numérotées. \pkg{nicematrix}), la clé |notes/bottomrule| permet de faire tracer un |\bottomrule| de \pkg{booktabs} \emph{après} les notes. +\item \colorbox{yellow!50}{\textbf{Nouveau 6.8}}\enskip Lorsque plusieurs +commandes |\tabularnote| sont utilisées avec le même argument, une seule note +est insérée en fin de tableau (mais tous les labels sont marqués). Il est +possible de désactiver cette fonctionnalité avec la clé +|notes/detect-duplicates| + \item Il est possible de référencer une note de tableau (avec la commande |\label| placée après le |\tabularnote|). \end{itemize} @@ -3406,8 +3407,7 @@ remarques illustrées. Cette table a été composée avec le code suivant. \setlength{\belowcaptionskip}{1ex} \centering \caption{Utilisation de \texttt{\textbackslash - tabularnote}~emphase#\tabularnote{On peut! - ~emphase# mettre une note dans le titre.}!} + tabularnote}~emphase#\tabularnote{On peut mettre une note dans le titre.}!} \label{t:tabularnote} \begin{NiceTabular}{@{}llc@{}}% [~emphase#notes/bottomrule!, tabularnote = Un peu de texte avant les notes.] @@ -3417,9 +3417,9 @@ Nom & Prénom & Durée de vie \\ Barrère & Bertrand & 86\\ Nightingale~emphase#\tabularnote{Souvent considérée comme la première! ~emphase#infirmière.}\tabularnote{Surnommée «la Dame à la Lampe».}! -& Florence & 90 \\ +& Florence~emphase#\tabularnote{Cette note est commune à deux appels de notes.}! & 90 \\ Schœlcher & Victor & 89~emphase#\tabularnote{L'appel de note déborde à droite.}!\\ -Touchet & Marie & 89 \\ +Touchet & Marie~emphase#\tabularnote{Cette note est commune à deux appels de notes.}! & 89 \\ Wallis & John & 87 \\ \bottomrule \end{NiceTabular} @@ -3441,9 +3441,9 @@ Nom & Prénom & Durée de vie \\ Barrère & Bertrand & 86\\ Nightingale\tabularnote{Souvent considérée comme la première infirmière.}\tabularnote{Surnommée «la Dame à la Lampe».} -& Florence & 90 \\ +& Florence\tabularnote{Cette note est commune à deux appels de notes.} & 90 \\ Schœlcher & Victor & 89\tabularnote{L'appel de note déborde à droite.}\\ -Touchet & Marie & 89 \\ +Touchet & Marie\tabularnote{Cette note est commune à deux appels de notes.} & 89 \\ Wallis & John & 87 \\ \bottomrule \end{NiceTabular} @@ -3603,13 +3603,10 @@ Si on souhaite, par exemple, que les notes soient composées en gris et en On peut aussi mettre dans cette clé |\raggedright| ou |\RaggedRight| (cette dernière est une commande de \pkg{ragged2e}). -\item \colorbox{yellow!50}{\textbf{Nouveau 6.8}}\enskip À partir de la version -6.8, les doublons dans les notes de tableau sont détectés par défaut: lorsque -plusieurs commandes |\tabularnote| sont utilisées avec le même argument, une -seule note est insérée en fin de tableau (mais tous les labels sont marqués). Il -est possible de désactiver cette fonctionnalité avec la clé -|notes/detect-duplicates| (sa valeur initiale est |true|). +\item La clé |notes/detect-duplicates| active la détection des +commandes |\tabularnote| avec le même argument. +Valeur initiale : |true| \end{itemize} @@ -4085,10 +4082,9 @@ a & a & a \end{pNiceMatrix}\] -\colorbox{yellow!50}{\textbf{Nouveau 6.3}}\enskip Les nœuds de la dernière -colonne (hors éventuelle «colonne extérieure» spécifiée par |last-col|) peuvent -aussi être désignés par $i$-|last|. De même, les nœuds de la dernière ligne -peuvent être désignés par |last|-$j$. +Les nœuds de la dernière colonne (hors éventuelle «colonne extérieure» spécifiée +par |last-col|) peuvent aussi être désignés par $i$-|last|. De même, les nœuds +de la dernière ligne peuvent être désignés par |last|-$j$. \medskip \subsubsection{Les colonnes V de varwidth} diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index 74e7b7c98f..c95554cfac 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{6.8} -\def\myfiledate{2022/03/11} +\def\myfileversion{6.8a} +\def\myfiledate{2022/05/08} % % %<*batchfile> @@ -101,6 +101,8 @@ version 2005/12/01 or later. \makeatother + + \begin{document} \DocInput{nicematrix.dtx} \end{document} @@ -1181,59 +1183,7 @@ version 2005/12/01 or later. % It's possible to use the command |\diagbox| in a |\Block|. % % -% \subsection{Dotted rules} -% -% \label{dotted} -% -% In the environments of the package \pkg{nicematrix}, it's possible to use -% the command |\hdottedline| (provided by \pkg{nicematrix}) which is a -% counterpart of the classical command |\hline|. -% -% \medskip -% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] -% \begin{pNiceMatrix} -% 1 & 2 & 3 & 4 & 5 \\ -% ~emphase#\hdottedline@ -% 6 & 7 & 8 & 9 & 10 \\ -% 11 & 12 & 13 & 14 & 15 -% \end{pNiceMatrix} -% \end{BVerbatim} -% $\begin{pNiceMatrix} -% 1 & 2 & 3 & 4 & 5 \\ -% \hdottedline -% 6 & 7 & 8 & 9 & 10 \\ -% 11 & 12 & 13 & 14 & 15 -% \end{pNiceMatrix}$ -% -% -% \bigskip -% In the environments with an explicit preamble (like |{NiceTabular}|, -% |{NiceArray}|, etc.), it's possible to draw a vertical dotted line with the -% specifier ``|:|''. -% -% \medskip -% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] -% \left(\begin{NiceArray}{cccc~emphase#:@c} -% 1 & 2 & 3 & 4 & 5 \\ -% 6 & 7 & 8 & 9 & 10 \\ -% 11 & 12 & 13 & 14 & 15 -% \end{NiceArray}\right) -% \end{BVerbatim} -% $\left(\begin{NiceArray}{cccc:c} -% 1 & 2 & 3 & 4 & 5 \\ -% 6 & 7 & 8 & 9 & 10 \\ -% 11 & 12 & 13 & 14 & 15 -% \end{NiceArray}\right)$ -% % -% \bigskip -% \emph{Remark}: In the package \pkg{array} (on which the package -% \pkg{nicematrix} relies), horizontal and vertical rules make the array larger -% or wider by a quantity equal to the width of the rule\footnote{In fact, with -% \pkg{array}, this is true only for |\hline| and ``"|"'' but not for |\cline|: -% cf p.~\pageref{remark-cline}}. In \pkg{nicematrix}, the dotted lines drawn by -% |\hdottedline| and ``|:|'' do likewise. -% % % \subsection{Commands for customized rules} % \label{custom-line} @@ -1274,36 +1224,12 @@ version 2005/12/01 or later. % \item the key |sep-color| sets the color between two successive rules (should be % used only in conjonction with |multiplicity|). % \end{itemize} -% -% \bigskip -% \item \emph{Second possibility}\par\nobreak -% -% The key |dotted| forces a style with dotted rules such as those created by -% |\hdottedline| or the letter ``|:|'' in the preamble (cf. -% p.~\pageref{dotted}). The key |color| may be used also in that case. % -% \bigskip -% \item \colorbox{yellow!50}{\textbf{New 6.6}}\enskip \emph{Third -% possibility}\par\nobreak -% -% It's possible to use the key |tikz| (if Tikz is loaded). In that case, the -% rule is drawn directly with Tikz by using as parameters the value of the key -% |tikz| which must be a list of \textsl{key=value} pairs which may be applied -% to a Tikz path. -% -% By default, no space is reserved for the rule that will be drawn with Tikz. It -% possible to specify a reservation (horizontal for a vertical rule and vertical -% for an horizontal one) with the key |width|. That value of that key, is, in -% some ways, the width of the rule that will be drawn (\pkg{nicematrix} does not -% compute that width from the characteristics of the rule specified in |tikz|). -% \end{itemize} -% -% \bigskip +% \medskip % That system may be used, in particular, for the definition of commands and % letters to draw rules with a specific color (and those rules will respect the -% blocks as do all rules of \pkg{nicematrix}). -% -% +% blocks and corners as do all the rules of \pkg{nicematrix}). +% % \medskip % \begin{Verbatim} % \begin{NiceTabular}{lcIcIc}~emphase#[custom-line = {letter=I, color=blue}]@ @@ -1318,6 +1244,23 @@ version 2005/12/01 or later. % \end{NiceTabular} % \end{Verbatim} % +% +% \bigskip +% \item \colorbox{yellow!50}{\textbf{New 6.6}}\enskip \emph{Second +% possibility}\par\nobreak +% +% It's possible to use the key |tikz| (if Tikz is loaded). In that case, the +% rule is drawn directly with Tikz by using as parameters the value of the key +% |tikz| which must be a list of \textsl{key=value} pairs which may be applied +% to a Tikz path. +% +% By default, no space is reserved for the rule that will be drawn with Tikz. It +% is possible to specify a reservation (horizontal for a vertical rule and +% vertical for an horizontal one) with the key |width|. That value of that key, +% is, in some ways, the width of the rule that will be drawn (\pkg{nicematrix} +% does not compute that width from the characteristics of the rule specified in +% |tikz|). +% % % \begin{center} % \begin{NiceTabular}{lcIcIc}[custom-line = {letter=I, color=blue}] @@ -1333,40 +1276,33 @@ version 2005/12/01 or later. % \end{center} % % \bigskip -% Here is an example of the key |tikz|. -% -% \begin{Verbatim} -% \documentclass{article} -% \usepackage{nicematrix,tikz} -% \usetikzlibrary{decorations.pathmorphing} +% Here is an example with the key |dotted| of Tikz. % +% \begin{BVerbatim}[boxwidth=9cm,baseline=c] % \NiceMatrixOptions % { % custom-line = % { % letter = I , -% ~emphase#tikz = { decorate, decoration = { coil, aspect = 0 } }}@ , -% ~emphase#width = 2 mm@ +% ~emphase#tikz = dotted@ , +% ~emphase#width = \pgflinewidth@ % } % } % -% \begin{document} % \begin{NiceTabular}{cIcIc} % one & two & three \\ % four & five & six \\ % seven & eight & nine % \end{NiceTabular} -% \end{document} -% \end{Verbatim} -% -% \begin{center} +% \end{BVerbatim} +% \begin{scope} % \NiceMatrixOptions % { % custom-line = % { % letter = I , -% tikz = { decorate, decoration = { coil, aspect = 0 } } , -% width = 2 mm +% tikz = dotted , +% width = \pgflinewidth % } % } % \begin{NiceTabular}{cIcIc} @@ -1374,9 +1310,81 @@ version 2005/12/01 or later. % four & five & six \\ % seven & eight & nine % \end{NiceTabular} -% \end{center} +% \end{scope} +% +% \bigskip +% \item \emph{Third possibility} : the key |dotted| +% \label{dotted} +% +% As one can see, the dots of a dotted line of Tikz have the shape of a square, +% and not a circle. That's why the extension \pkg{nicematrix} provides in the +% key |custom-line| a key |dotted| which will draw rounded dots. The value of +% the key |width| is, in this case, preset to the diameter of the dots. Those +% dotted rules are also used by \pkg{nicematrix} to draw continuous dotted rules +% between cells of the matrix with |\Cdots|, |\Vdots|, etc. (cf. p.~\pageref{Cdots}). +% +% In fact, \pkg{nicematrix} defines by default the command |\hdottedline| and the +% letter ``|:|'' for those dotted rules.\footnote{However, it's possible to +% overwrite those definitions with a |custom-line| (in order, for example, to +% switch to dashed lines).} +% +%\smallskip +%\begin{BVerbatim} +% +% \NiceMatrixOptions % ~textsl#présent dans nicematrix.sty@ +% { +% custom-line = +% { +% letter = : , +% command = hdottedline , +% ~emphase#dotted@ +% } +% } +% \end{BVerbatim} +% +% Thus, it's possible to use the command |\hdottedline| to draw a horizontal +% dotted rule. +% +% \medskip +% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +% \begin{pNiceMatrix} +% 1 & 2 & 3 & 4 & 5 \\ +% ~emphase#\hdottedline@ +% 6 & 7 & 8 & 9 & 10 \\ +% 11 & 12 & 13 & 14 & 15 +% \end{pNiceMatrix} +% \end{BVerbatim} +% $\begin{pNiceMatrix} +% 1 & 2 & 3 & 4 & 5 \\ +% \hdottedline +% 6 & 7 & 8 & 9 & 10 \\ +% 11 & 12 & 13 & 14 & 15 +% \end{pNiceMatrix}$ % % +% \bigskip +% In the environments with an explicit preamble (like |{NiceTabular}|, +% |{NiceArray}|, etc.), it's possible to draw a vertical dotted line with the +% specifier ``|:|''. +% +% \medskip +% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +% \left(\begin{NiceArray}{cccc~emphase#:@c} +% 1 & 2 & 3 & 4 & 5 \\ +% 6 & 7 & 8 & 9 & 10 \\ +% 11 & 12 & 13 & 14 & 15 +% \end{NiceArray}\right) +% \end{BVerbatim} +% $\left(\begin{NiceArray}{cccc:c} +% 1 & 2 & 3 & 4 & 5 \\ +% 6 & 7 & 8 & 9 & 10 \\ +% 11 & 12 & 13 & 14 & 15 +% \end{NiceArray}\right)$ +% +% \end{itemize} +% +% +% %\section{The color of the rows and columns} % % \subsection{Use of colortbl} @@ -2092,9 +2100,6 @@ version 2005/12/01 or later. % % \label{varwidth} % -% \colorbox{yellow!50}{\textbf{New 6.3}} -% -% \smallskip % Let's recall first the behaviour of the environment |{varwidth}| of the % eponymous package \pkg{varwidth}. That environment is similar to the classical % environment |{minipage}| but the width provided in the argument is only the @@ -3168,8 +3173,6 @@ version 2005/12/01 or later. % \subsection{The commands \textbackslash OverBrace and \textbackslash % UnderBrace in the \textbackslash CodeAfter} % -% \colorbox{yellow!50}{\textbf{New 6.4}} -% % The commands |\OverBrace| and |\UnderBrace| provide a way to put % horizontal braces on a part of the array. These commands take in three % arguments: @@ -3347,6 +3350,12 @@ version 2005/12/01 or later. % the environment of \pkg{nicematrix}. Thus, it's possible to use it on the % title inserted by |\caption| in an environment |{table}| of LaTeX. % +% \colorbox{yellow!50}{\textbf{New 6.8}}\enskip If several commands +% |\tabularnote| are used in a tabular with the same argument, only one note is +% inserted at the end of the tabular (but all the labels are composed, of +% course). It's possible to control that feature with the key +% |notes/detect-duplicates|. +% % \item It's possible to create a reference to a tabular note created by |\tabularnote| % (with the usual command |\label| used after the |\tabularnote|). % \end{itemize} @@ -3370,11 +3379,11 @@ version 2005/12/01 or later. % Last name & First name & Length of life \\ % \midrule % Churchill & Wiston & 91\\ -% Nightingale~emphase#\tabularnote{Considered as the first nurse of! -% ~emphase#history.}\tabularnote{Nicknamed ``the Lady with the Lamp''.}! -% & Florence & 90 \\ +% Nightingale~emphase#\tabularnote{Considered as the first nurse of history}! +% ~emphase#\tabularnote{Nicknamed ``the Lady with the Lamp''.}! +% & Florence~emphase#\tabularnote{This note is shared by two references.}! & 90 \\ % Schoelcher & Victor & 89~emphase#\tabularnote{The label of the note is overlapping.}!\\ -% Touchet & Marie & 89 \\ +% Touchet & Marie~emphase#\tabularnote{This note is shared by two references.}! & 89 \\ % Wallis & John & 87 \\ % \bottomrule % \end{NiceTabular} @@ -3397,9 +3406,9 @@ version 2005/12/01 or later. % Churchill & Wiston & 91\\ % Nightingale\tabularnote{Considered as the first nurse of % history.}\tabularnote{Nicknamed ``the Lady with the Lamp''.} -% & Florence & 90 \\ +% & Florence\tabularnote{This note is shared by two references.} & 90 \\ % Schoelcher & Victor & 89\tabularnote{The label of the note is overlapping.}\\ -% Touchet & Marie & 89 \\ +% Touchet & Marie\tabularnote{This note is shared by two references.} & 89 \\ % Wallis & John & 87 \\ % \bottomrule % \end{NiceTabular} @@ -3549,12 +3558,10 @@ version 2005/12/01 or later. % It's also possible to add |\raggedright| or |\RaggedRight| in that key (|\RaggedRight| % is a command of \pkg{ragged2e}). % -% \item \colorbox{yellow!50}{\textbf{New 6.8}}\enskip Since the version 6.8, the -% duplicates in the notes of a tabular are detected by default: if several -% commands |\tabularnote| are used in a tabular with the same argument, only one -% note is inserted at the end of the tabular (but all the labels are composed, -% of course). It's possible to de-activate that feature with the key -% |notes/detect-duplicates| (whose initial value is |true|). +% \item The key |notes/detect-duplicates| activates the detection of the commands +% |\tabularnotes| with the same argument. +% +% Initial value : |true| % \end{itemize} % % @@ -11061,12 +11068,16 @@ version 2005/12/01 or later. % by LaTeX for incorrect nested environments). % \begin{macrocode} { - \peek_meaning_ignore_spaces:NTF \end \@@_analyze_end:Nn + \peek_remove_spaces:n + { + \peek_meaning:NTF \end + \@@_analyze_end:Nn % \end{macrocode} % Here is the call to |\array| (we have a dedicated macro |\@@_array:| because % of compatibility with the classes \cls{revtex4-1} and \cls{revtex4-2}). % \begin{macrocode} - { \exp_args:NV \@@_array: \g_@@_preamble_tl } + { \exp_args:NV \@@_array: \g_@@_preamble_tl } + } } { \@@_create_col_nodes: @@ -13926,6 +13937,7 @@ version 2005/12/01 or later. % \begin{macrocode} \NewDocumentCommand \@@_RowStyle:n { O { } m } { + \tl_clear:N \l_tmpa_tl \keys_set:nn { NiceMatrix / RowStyle } { #1 } % \end{macrocode} % If the key |rowcolor| has been used. @@ -15321,9 +15333,12 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_set:Npn \@@_Hline_i:n #1 { - \peek_meaning_ignore_spaces:NTF \Hline - { \@@_Hline_ii:nn { #1 + 1 } } - { \@@_Hline_iii:n { #1 } } + \peek_remove_spaces:n + { + \peek_meaning:NTF \Hline + { \@@_Hline_ii:nn { #1 + 1 } } + { \@@_Hline_iii:n { #1 } } + } } % \end{macrocode} % diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf index 3629b4506a..b09ef2e986 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix.pdf and b/macros/latex/contrib/nicematrix/nicematrix.pdf differ -- cgit v1.2.3