summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-11-16 21:01:12 +0000
committerKarl Berry <karl@freefriends.org>2023-11-16 21:01:12 +0000
commite26f4628a972a257898b418e675a73830d6f5b67 (patch)
tree66cba4ff00b5593f6baa6172fbc93257512f5d1d /Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
parentc322165b37e8f2dee17d03e37fbc7bb1d211b14f (diff)
nicematrix (16nov23)
git-svn-id: svn://tug.org/texlive/trunk@68870 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex')
-rw-r--r--Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex49
1 files changed, 49 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex b/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
index 7eb8e1783e0..64aaf685227 100644
--- a/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
+++ b/Master/texmf-dist/doc/latex/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