diff options
author | Norbert Preining <norbert@preining.info> | 2023-11-17 03:02:29 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-11-17 03:02:29 +0000 |
commit | d91bb5cad66508ec34d77ea60c0a02c79308edef (patch) | |
tree | 69c363099e912a77d55b67d891020bcc1f407d80 /macros/latex/contrib/nicematrix/nicematrix.tex | |
parent | e0db3f0709a737e7258fd40a7cbfe9a461ea0756 (diff) |
CTAN sync 202311170302
Diffstat (limited to 'macros/latex/contrib/nicematrix/nicematrix.tex')
-rw-r--r-- | macros/latex/contrib/nicematrix/nicematrix.tex | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/macros/latex/contrib/nicematrix/nicematrix.tex b/macros/latex/contrib/nicematrix/nicematrix.tex index 7eb8e1783e..64aaf68522 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.tex +++ b/macros/latex/contrib/nicematrix/nicematrix.tex @@ -2227,6 +2227,55 @@ which are in the ``corners''. In the following example, we use the key \end{NiceTabular} \end{scope} +\medskip +The previous example uses the keys |first-row| and |first-col| which are +described in the chapter concerning the «exterior» rows and columns +(cf.~p.~\pageref{exterior}). + +As one can see, \emph{by default}, the coloring commands that we have described +don't apply in those exterior rows and columns. + +However, it may still be possible to color in those rows and columns by +providing explicity the numbers of those rows and columns. + +In the following example, we require a color in the column~$0$ (which is the +«first column» and which exists because the key |first-col| has been used). + +\medskip +\begin{scope} +\hfuzz=11cm +\begin{BVerbatim}[boxwidth=9cm,baseline=c] +\begin{NiceTabular}{cccccc}[~emphase#corners=NE@,margin,hvlines,first-row,first-col] +\CodeBefore + \rowlistcolors{1}{blue!15, } + ~emphase#\columncolor{red!15}{0}@ +\Body + & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\ +0 & 1 \\ +1 & 1 & 1 \\ +2 & 1 & 2 & 1 \\ +3 & 1 & 3 & 3 & 1 \\ +4 & 1 & 4 & 6 & 4 & 1 \\ +5 & 1 & 5 & 10 & 10 & 5 & 1 \\ +6 & 1 & 6 & 15 & 20 & 15 & 6 & 1 \\ +\end{NiceTabular} +\end{BVerbatim} +\begin{NiceTabular}{ccccccc}[corners=NE,margin,hvlines,first-row,first-col] +\CodeBefore + \rowlistcolors{1}{blue!15, } + \columncolor{red!15}{0} +\Body + & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\ +0 & 1 \\ +1 & 1 & 1 \\ +2 & 1 & 2 & 1 \\ +3 & 1 & 3 & 3 & 1 \\ +4 & 1 & 4 & 6 & 4 & 1 \\ +5 & 1 & 5 & 10 & 10 & 5 & 1 \\ +6 & 1 & 6 & 15 & 20 & 15 & 6 & 1 \\ +\end{NiceTabular} +\end{scope} + \bigskip One should remark that all the previous commands are compatible with the |