diff options
author | Karl Berry <karl@freefriends.org> | 2023-07-14 21:05:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-07-14 21:05:26 +0000 |
commit | 388fd5ba705617c4ea1ab64b1edd2da78f8285df (patch) | |
tree | 3ea7cd92571794250db1d9b19725b1e91469903b /Master/texmf-dist/doc/latex/nicematrix | |
parent | 4f4a6fbdcff9c424b96574e43efe30c376e6ea33 (diff) |
nicematrix (14jul23)
git-svn-id: svn://tug.org/texlive/trunk@67630 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/nicematrix')
-rw-r--r-- | Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf | bin | 581086 -> 580350 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex | 83 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf | bin | 596800 -> 598482 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex | 83 |
4 files changed, 107 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf b/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf Binary files differindex de3bb303324..af7f6d735e2 100644 --- a/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf +++ b/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf diff --git a/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex b/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex index 6fd43c26a63..072769dfa68 100644 --- a/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex +++ b/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex @@ -715,7 +715,7 @@ la consigne générale donnée dans le préambule pour cette colonne (cf.~\ref{h |\Block| ou colorier le fond avec des bords arrondis avec les clés |fill| et |rounded-corners|.\footnote{Pour colorier simplement le fond d'une case, il n'y a pas besoin d'utiliser un bloc mono-case : on peut utiliser la commande |\cellcolor| si la - clé |colortbl-like| est utilisée : voir p.~\pageref{colortbl-like}.} + clé |color-inside| est utilisée : voir p.~\pageref{color-inside}.} \item On peut tracer une ou plusieurs bordures de la case avec la clé |borders|. \end{itemize} @@ -1806,8 +1806,6 @@ par une virgule) : l'extension \pkg{xcolor} ; \item \index{opacity (clé des commandes comme\newline \texttt{\textbackslash rowcolor}, etc.)} -\colorbox{yellow!50}{\textbf{Nouveau 6.18}} - une spécification d'opacité selon la forme \texttt{opacity = \textsl{valeur}}.\footnote{Attention : cette fonctionnalité génère des instructions de transparence dans le \textsc{pdf} résultant et certains lecteurs de @@ -2119,7 +2117,7 @@ Stéphanie \\ On peut aussi utiliser dans la commande |\rowlistcolors| une série de couleurs définie par la commande |\definecolorseries| de \pkg{xcolor} (et initialisée avec |\resetcolorseries|\footnote{Pour l'initialisation, on a - utilisé dans l'exemple qui suit le compteur |iRow| qui, quand il est utilisé + utilisé dans l'exemple qui suit le compteur LaTeX |iRow| qui, quand il est utilisé dans le |\CodeBefore| (ou le |\CodeAfter|) désigne le nombre de rangées du tableau : cf~p.~\pageref{iRow}. Cela permet un ajustement de la gradation des couleurs à la taille du tableau.}). @@ -2258,10 +2256,10 @@ spécial & 12 & 12 & 0.5 & 70 \\ On a utilisé le type de colonne |S| de \pkg{siunitx}. -\subsection{Outils de coloriage avec la syntaxe de colortbl} +\subsection{Outils de coloriage en tableau} -\label{colortbl-like} -\index{colortbl-like} +\label{color-inside} +\index{color-inside} \index{cellcolor@\texttt{\textbackslash cellcolor}!commande en tableau} \index{rowcolor@\texttt{\textbackslash rowcolor}!commande en tableau} \index{columncolor@\texttt{\textbackslash columncolor}!commande dans le @@ -2269,11 +2267,13 @@ On a utilisé le type de colonne |S| de \pkg{siunitx}. On peut accéder aux outils de coloriage précédents avec une syntaxe proche de celle proposée par \pkg{colortbl} (même si \pkg{colortbl} n'est pas chargé). On -doit pour cela utiliser la clé |colortbl-like| dans l'environnement +doit pour cela utiliser la clé |color-inside|\footnote{Il existe un alias pour + cette clé : \texttt{colortbl-like}.} dans l'environnement concerné.\footnote{Pour le moment, cette clé n'est \emph{pas} disponible dans |\NiceMatrixOptions|.} -On a alors accès aux trois commandes suivantes : +On a alors accès aux commandes suivantes (les trois premières sont inspirées par +\pkg{colortbl} mais sont indépendantes de \pkg{colortbl}) : \begin{itemize} \item |\cellcolor| qui colorie la case courante\footnote{Néanmoins, cette commande |\cellcolor| supprimera les espaces qui la suivent, ce que ne fait @@ -2284,13 +2284,17 @@ On a alors accès aux trois commandes suivantes : que la commande éponyme de \pkg{colortbl} (néanmoins, contrairement à la commande |\columncolor| de \pkg{colortbl}, celle de \pkg{nicematrix} peut apparaître à l'intérieur d'une autre commande, elle-même utilisée dans le -préambule). +préambule) ; +\item \colorbox{yellow!50}{\textbf{Nouveau 6.21}}\enskip |\rowcolors| qui prend pour arguments deux couleurs et colorie la suite du +tableau avec ces deux couleurs ; +\item \colorbox{yellow!50}{\textbf{Nouveau 6.21}}\enskip |\rowlistcolors| qui prend pour argument une liste de couleurs et colorie +la suite du tableau avec ces couleurs. \end{itemize} \medskip \begin{Verbatim} \NewDocumentCommand { \Blue } { } {~emphase#\columncolor{blue!15}@} -\begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc} +\begin{NiceTabular}[color-inside]{>{\Blue}c>{\Blue}cc} \toprule ~emphase#\rowcolor{red!15}@ Nom & Prénom & Année de naissance \\ @@ -2306,7 +2310,7 @@ Dupont & Chantal & 15 janvier 1998 \\ \begin{center} \NewDocumentCommand { \Blue } { } {\columncolor{blue!15}} -\begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc} +\begin{NiceTabular}[color-inside]{>{\Blue}c>{\Blue}cc} \toprule \rowcolor{red!15} Nom & Prénom & Année de naissance \\ @@ -2350,7 +2354,7 @@ La clé |rowcolor| fixe la couleur de fond et la clé |color| fixe la couleur du texte.\footnote{La clé |color| utilise la commande |\color| mais insère aussi une instruction |\leavevmode| devant. Cela évite un espace vertical parasite dans les cases qui correspondent à des colonnes de type - |p|, |b|, |m|, |X| et |V| (qui débutent en mode vertical).} + |p|, |b|, |m|, |X| et |V| (qui débutent en mode vertical de LateX).} \item \index{bold (clé de \texttt{\textbackslash RowStyle})} La clé |bold| impose des caractères gras aux éléments de la rangée, qu'ils @@ -4429,35 +4433,39 @@ la clé |caption| à la partie \ref{s:caption}, p.~\pageref{s:caption}). \section{Autres fonctionnalités} -\subsection{La clé rounded-corners de \{NiceTabular\}} +\subsection{La clé rounded-corners} \label{tabular-rounded-corners} \index{rounded-corners!clé de \texttt{\{NiceTabular\}}} \index{Coins arrondis!pour un tableau} -\colorbox{yellow!50}{\textbf{Nouveau 6.18}}\par\nobreak - -\smallskip La clé |rounded-corners| que l'on décrit maintenant n'a pas de lien direct avec la clé |corners| (qui sert à spécifier les «coins vides») décrite à la partie~\ref{corners}, p.~\pageref{corners}. \smallskip -L'environnement |{NiceTabular}| propose une clé |rounded-corners| qui spécifie -que le tableau devra avoir des coins arrondis avec le rayon égal à la valeur -de cette clé (la valeur par défaut est 4~pt\footnote{Cette valeur est la valeur - par défaut des «\texttt{rounded corners}» de PGF/Tikz.}). Plus précisément, -cette clé a deux effets que l'on décrit maintenant. +La clé |rounded-corners| spécifie que le tableau ou la matrice devra avoir des +coins arrondis avec un rayon égal à la valeur de cette clé (la valeur par défaut est +4~pt\footnote{Cette valeur est la valeur par défaut des «\texttt{rounded + corners}» de PGF/Tikz.}). Plus précisément, cette clé a deux effets que l'on +décrit maintenant. \begin{itemize} \item Toutes les commandes de coloriage de cases, colonnes et rangées (que ce soit dans le |\CodeBefore| ou bien directement dans le tableau (quand la clé -|colortbl-like| est utilisée) respectent ces coins arrondis pour le tableau. +|color-inside| est utilisée) respectent ces coins arrondis pour le tableau. \item Quand la clé |hvlines| est utilisée, les filets extérieurs sont tracés -avec des coins arrondis. +avec des coins arrondis.\footnote{Bien sûr, lorsqu'il s'agit d'un environnement + avec des délimiteurs (|{pNiceArray}|, |{pNiceMatrix}|, etc.) la clé + |hvlines| ne trace pas les filets extérieurs.} \end{itemize} \bigskip +\colorbox{yellow!50}{\textbf{Nouveau 6.21}} Cette clé est disponible dans tous +les environnements et commandes de \pkg{nicematrix} (comme +|\pAutoNiceMatrix|) et également dans |\NiceMatrixOptions|. + +\bigskip \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] \begin{NiceTabular}{ccc}[hvlines,~emphase#rounded-corners@] \CodeBefore @@ -4644,6 +4652,19 @@ $A = \begin{pNiceMatrix}[last-row,last-col=4] \end{pNiceMatrix}$ \end{varwidth} +\bigskip +\colorbox{yellow!50}{\textbf{Nouveau 6.21}}\enskip La commande |\rotate| accepte +une option |c| entre crochets : |\rotate[c]|. Quand cette clé est utilisée, le +contenu, après rotation, est composé dans une |\vcenter|, ce qui fait que, le +plus souvent, on obtiendra un centrage vertical. + + +\medskip +Attention : la commande |\rotate| est prévue pour être utilisée dans un |\Block| +ou bien dans des colonnes de type |l|, |c|, |r|, |w| ou |W|; si elle est +utilisée dans un autre type de colonne (commme |p{...}|), les résultats ne +seront peut-être pas ceux attendus. + \subsection{L'option small} @@ -4883,9 +4904,9 @@ $\begin{NiceArrayWithDelims} \indexcommand{OnlyMainNiceMatrix} La commande |\OnlyMainNiceMatrix| n'exécute son argument que si on se trouve -dans le tableau principal, c'est-à-dire que l'on n'est pas dans les rangées -extérieures. Si elle est utilisée hors d'un environnement de \pkg{nicematrix}, -elle est sans effet. +dans le tableau principal, c'est-à-dire que l'on est ni dans les rangées +extérieures, ni dans les colonnes extérieures. Si elle est utilisée hors d'un +environnement de \pkg{nicematrix}, elle est sans effet. Pour un exemple d'utilisation, voir \url{tex.stackexchange.com/questions/488566} @@ -6657,14 +6678,14 @@ composantes de la matrice.\footnote{Pour la commande |\cline|, voir la remarque \vspace{1cm} Il est possible de colorier une rangée avec |\rowcolor| dans le |\CodeBefore| (ou avec |\rowcolor| dans une case de la rangée si on utilise la clé -|colortbl-like| − même si \pkg{colortbl} n'est pas chargé). +|color-inside| − même si \pkg{colortbl} n'est pas chargé). -\index{colortbl-like|textit} +\index{color-inside|textit} \index{rowcolor@\texttt{\textbackslash rowcolor}!commande en tableau|textit} \begin{Verbatim} -\begin{pNiceArray}{>{\strut}cccc}[margin, extra-margin=2pt,colortbl-like] +\begin{pNiceArray}{>{\strut}cccc}[margin, extra-margin=2pt,color-inside] ~emphase#\rowcolor{red!15}@A_{11} & A_{12} & A_{13} & A_{14} \\ A_{21} & ~emphase#\rowcolor{red!15}@A_{22} & A_{23} & A_{24} \\ A_{31} & A_{32} & ~emphase#\rowcolor{red!15}@A_{33} & A_{34} \\ @@ -6674,7 +6695,7 @@ Il est possible de colorier une rangée avec |\rowcolor| dans le |\CodeBefore| -\[\begin{pNiceArray}{>{\strut}cccc}[margin, extra-margin=2pt,colortbl-like] +\[\begin{pNiceArray}{>{\strut}cccc}[margin, extra-margin=2pt,color-inside] \rowcolor{red!15}A_{11} & A_{12} & A_{13} & A_{14} \\ A_{21} & \rowcolor{red!15}A_{22} & A_{23} & A_{24} \\ A_{31} & A_{32} & \rowcolor{red!15}A_{33} & A_{34} \\ diff --git a/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf b/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf Binary files differindex ec377193568..7a7606184d0 100644 --- a/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf +++ b/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf diff --git a/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex b/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex index 9987ba819b3..91758773dd6 100644 --- a/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex +++ b/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex @@ -687,7 +687,7 @@ derogation of the type of column given in the preamble of the array. command |\Block| and to fill the background with rounded corners with the keys |fill| and |rounded-corners|.\footnote{If one simply wishes to color the background of a unique cell, there is no point using the command |\Block|: -it's possible to use the command |\cellcolor| (when the key |colortbl-like| is +it's possible to use the command |\cellcolor| (when the key |color-inside| is used).} \item It's possible to draw one or several borders of the cell with the key |borders|. @@ -1753,7 +1753,6 @@ by a comma) \item the colorimetric space (|RGB|, |rgb|, |HTML|, etc) as specified by the the extension \pkg{xcolor}; \item \index{opacity (key of commands such as\newline \texttt{\textbackslash rowcolor}, etc.)} -\colorbox{yellow!50}{\textbf{New 6.18}}\par\nobreak a specification of opacity of the form \texttt{opacity = \textsl{value}}.\footnote{Caution : that feature creates instructions of transparency in the \textsc{pdf} and some \textsc{pdr} don't support such instructions.} @@ -2198,9 +2197,9 @@ special & 12 & 12 & 0.5 & 70 \\ We have used the type of column |S| of \pkg{siunitx}. -\subsection{Color tools with the syntax of colortbl} +\subsection{Color tools to be used inside the tabular} -\index{colortbl-like} +\index{color-inside} \index{cellcolor@\texttt{\textbackslash cellcolor}!command in tabular} \index{rowcolor@\texttt{\textbackslash rowcolor}!command in tabular} \index{columncolor@\texttt{\textbackslash columncolor}!command in the preamble @@ -2208,11 +2207,12 @@ We have used the type of column |S| of \pkg{siunitx}. It's possible to access the preceding tools with a syntax close to the syntax -of \pkg{colortbl}. For that, one must use the key |colortbl-like| in the +of \pkg{colortbl}. For that, one must use the key |color-inside|\footnote{There + is an alias for that key : \texttt{colortbl-like}.} in the current environment.\footnote{Up to now, this key is \emph{not} available in |\NiceMatrixOptions|.} -There are three commands available (they are inspired by \pkg{colortbl} but -are \emph{independent} of \pkg{colortbl}): +There are several commands available (the first three ones are inspired by +\pkg{colortbl} but are \emph{independent} of \pkg{colortbl}): \begin{itemize} \item |\cellcolor| which colorizes a cell;\footnote{However, this command |\cellcolor| will delete the following spaces, which does not the command @@ -2223,13 +2223,17 @@ the row; with the same syntax as the corresponding command of \pkg{colortbl} (however, unlike the command |\columncolor| of \pkg{colortbl}, this command |\columncolor| can appear within another command, itself used in the -preamble of the array). +preamble of the array); +\item \colorbox{yellow!50}{\textbf{New 6.21}}\enskip |\rowcolors| which takes in as arguments two colors and color the rest of +the tabular with those colors; +\item \colorbox{yellow!50}{\textbf{New 6.21}}\enskip |\rowlistcolors| which takes in as argument a color and color the rest of +the tabular with the colors of that list of colors. \end{itemize} \smallskip \begin{Verbatim} \NewDocumentCommand { \Blue } { } { ~emphase#\columncolor{blue!15}@ } -\begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc} +\begin{NiceTabular}[color-inside]{>{\Blue}c>{\Blue}cc} \toprule ~emphase#\rowcolor{red!15}@ Last name & First name & Birth day \\ @@ -2245,7 +2249,7 @@ Dupont & Chantal & 15 janvier 1998 \\ \begin{center} \NewDocumentCommand { \Blue } { } { \columncolor{blue!15} } -\begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc} +\begin{NiceTabular}[color-inside]{>{\Blue}c>{\Blue}cc} \toprule \rowcolor{red!15} Last name & First name & Birth day \\ @@ -2288,7 +2292,7 @@ color of the text.\footnote{The key |color| uses the command |\color| but inserts also an instruction |\leavevmode| before. This instruction prevents a extra vertical space in the cells which belong to columns of type |p|, |b|, |m|, |X| and |V| (which start in -vertical mode).} +vertical mode of LaTeX).} \item \index{bold (key of \texttt{\textbackslash RowStyle})} The key |bold| enforces bold characters for the cells of the row, both in math and text mode. \end{itemize} @@ -4331,34 +4335,37 @@ provided by \pkg{nicematrix} (see the key |caption| in the section \section{Other features} -\subsection{The key rounded-corners of \{NiceTabular\}} +\subsection{The key rounded-corners} \label{tabular-rounded-corners} \index{rounded-corners!key of \texttt{\{NiceTabular\}}} \index{Corners (rounded ---)!for a tabular} -\colorbox{yellow!50}{\textbf{New 6.18}}\par\nobreak - -\smallskip The key |rounded-corners| that we will describe now has no direct link with the key |corners| (which is used to specify ``empty corners'') described in the part~\ref{corners}, p.~\pageref{corners}. \smallskip -The environment |{NiceTabular}| provides a key |rounded-corners| which specify -that the tabular should have rounded corners with a radius equal to the value of -that key (the default value is 4~pt\footnote{This value is the initial value of - the \emph{rounded corners} of Tikz.}). More precisely, that key has two -effects that we describe now. +The key |rounded-corners| specifies that the tabular should have rounded corners +with a radius equal to the value of that key (the default value is +4~pt\footnote{This value is the initial value of the \emph{rounded corners} of + Tikz.}). More precisely, that key has two effects that we describe now. \begin{itemize} \item All the commands for coloring the cells, columns and rows (in the -|\CodeBefore| but also directly in the array when the key |colortbl-like| is +|\CodeBefore| but also directly in the array when the key |color-inside| is used) will respect those rounded corners. \item When the key |hvlines| is used, the exterior rules will be drawn with -rounded corners. +rounded corners.\footnote{Of course, when used in an environment with delimiters +(|{pNiceMatrix}|, |{bNiceArray}|, etc.), the key |hvlines| does not draw the +exterior rules.} \end{itemize} + +\colorbox{yellow!50}{New 6.21}\enskip That key is available in all +the environments and commands (e.g. |\pAutoNiceMatrix|) of \pkg{nicematrix} and also +in the command |\NiceMatrixOptions|. + \bigskip \begin{BVerbatim}[baseline=c,boxwidth=9cm] \begin{NiceTabular} @@ -4549,6 +4556,17 @@ $A = \begin{pNiceMatrix}[last-row=4,last-col=4] \end{pNiceMatrix}$ \end{varwidth} +\bigskip +\colorbox{yellow!50}{\textbf{New 6.21}}\enskip The command |\tabular| has a key +|c|: |\tabular[c]|. When that key is used, the content is composed in a +|\vcenter| and, therefore, in most cases, we will have a vertical alignment. + + + +\bigskip +Caution: the command |\rotate| is designed to be used in a |\Block| or in +columns of type |l|, |r|, |c|, |w| ou |W|; if it is used in other column types +(such as |p{...}|), the result will maybe differ from what is expected. \subsection{The option small} @@ -4788,8 +4806,8 @@ $\begin{NiceArrayWithDelims} The command |\OnlyMainNiceMatrix| executes its argument only when it is in the main part of the array, that is to say when it is not in one of the exterior -rows. If it is used outside an environment of \pkg{nicematrix}, that command is -no-op. +rows or one of the exterior columns. If it is used outside an environment of +\pkg{nicematrix}, that command is no-op. For an example of utilisation, see \url{tex.stackexchange.com/questions/488566} @@ -6561,16 +6579,16 @@ see the remark p.~\pageref{remark-cline}.} \vspace{1cm} It's possible to color a row with |\rowcolor| in the |code-before| (or with -|\rowcolor| in the first cell of the row if the key |colortbl-like| is +|\rowcolor| in the first cell of the row if the key |color-inside| is used−even when \pkg{colortbl} is not loaded). -\index{colortbl-like|textit} +\index{color-inside|textit} \index{rowcolor@\texttt{\textbackslash rowcolor}!command in tabular|textit} \medskip \begin{Verbatim} -\begin{pNiceArray}{>{\strut}cccc}[margin, extra-margin=2pt,colortbl-like] +\begin{pNiceArray}{>{\strut}cccc}[margin, extra-margin=2pt,color-inside] ~emphase#\rowcolor{red!15}@A_{11} & A_{12} & A_{13} & A_{14} \\ A_{21} & ~emphase#\rowcolor{red!15}@A_{22} & A_{23} & A_{24} \\ A_{31} & A_{32} & ~emphase#\rowcolor{red!15}@A_{33} & A_{34} \\ @@ -6580,7 +6598,7 @@ used−even when \pkg{colortbl} is not loaded). -\[\begin{pNiceArray}{>{\strut}cccc}[margin, extra-margin=2pt,colortbl-like] +\[\begin{pNiceArray}{>{\strut}cccc}[margin, extra-margin=2pt,color-inside] \rowcolor{red!15}A_{11} & A_{12} & A_{13} & A_{14} \\ A_{21} & \rowcolor{red!15}A_{22} & A_{23} & A_{24} \\ A_{31} & A_{32} & \rowcolor{red!15}A_{33} & A_{34} \\ @@ -6885,6 +6903,15 @@ The successive versions of the file |nicematrix.sty| provided by TeXLive are ava \nolinkurl{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty} } +\subsection*{Changes between version 6.20a and 6.21} + +Key |c| for the command |\tabularnote|. + +New commands |\rowcolors| and |\rowlistcolors| available in the array itself +(previously, there were only two commands |\rowcolors| and |\rowlistcolors| +avaailable in the |\CodeBefore|. + + \subsection*{Changes between version 6.20 and 6.20a} The value of the key |name| of an environment of \pkg{nicematrix} is expanded |