summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-07-31 20:42:23 +0000
committerKarl Berry <karl@freefriends.org>2022-07-31 20:42:23 +0000
commit7abc545a5c6600bb7478cf356c60acb2c4e74e2e (patch)
tree54156236e2c776831fd8e9b2eed733e06d5b1751 /Master
parent777011fda32e002ee464628cc0bb24380db95279 (diff)
colortbl (31jul22)
git-svn-id: svn://tug.org/texlive/trunk@64015 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/colortbl/colortbl-DE.pdfbin325132 -> 344915 bytes
-rw-r--r--Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex108
-rw-r--r--Master/texmf-dist/doc/latex/colortbl/colortbl.pdfbin269404 -> 296824 bytes
-rw-r--r--Master/texmf-dist/source/latex/colortbl/colortbl.dtx267
-rw-r--r--Master/texmf-dist/tex/latex/colortbl/colortbl.sty60
5 files changed, 397 insertions, 38 deletions
diff --git a/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.pdf b/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.pdf
index 5148eaecd37..7dccb6c616b 100644
--- a/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.pdf
+++ b/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex b/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex
index 113bbee8afc..330a9f3fc2d 100644
--- a/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex
+++ b/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex
@@ -6,6 +6,7 @@
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.2ex minus 0.1ex}
+
\usepackage{dcolumn,longtable,hhline,colortbl}
\usepackage[table]{xcolor}
\setlongtables%
@@ -14,7 +15,7 @@
\def\slash#1{\textbackslash#1}
\title{The \textsf{colortbl} package\footnote{1.\,"Ubersetzungsversion,
- letzte "Anderung 15.\,3. 2009}}
+ letzte "Anderung 30.\,7. 2022}}
\author{{\huge David Carlisle}\\ (\"Ubersetzung: Anne-Katrin Leich \& Christine
R"omer)}
@@ -349,6 +350,111 @@ sodass die voreingestellten Farben der betreffenden Zeile und Spalte aufgehoben
\end{tabular}}
\end{center}
+
+\section{Der \slash \textsf{rowcolors} Befehl}
+Der \slash \textsf{rowcolors}-Befehl und seine Dokumentation stammen aus dem \textsf{xcolor}-Paket
+von Dr. Uwe Kern.
+
+\textbf{\slash rowcolors}\\\relax
+ [commands]\{row\}\{odd-row color\}\{even-row color\}
+
+\textbf{\slash rowcolors*}\\\relax
+ [commands]\{row\}\{odd-row color\}\{even-row color\}
+
+Einer dieser Befehle muss ausgeführt werden, \emph{bevor} eine Tabelle gestartet wird.
+
+\emph{row} gibt die Nummer der ersten Zeile an, die nach dem Schema \emph{odd-row color} und \emph{even-row color} gefärbt werden soll.
+Jedes der Farbargumente kann auch leer gelassen werden (= keine Farbe).
+In der Version mit Stern werden Befehle \emph{commands} in Zeilen mit inaktivem \emph{rowcolors status} (siehe unten) ignoriert, während in der Version ohne Stern \emph{Befehle} auf jede Zeile der Tabelle angewendet werden.
+Solche optionalen Befehle können \verb"\hline" oder \verb"\noalign"\{\emph{stuff}\} sein.
+
+\textbf{\slash showrowcolors, \slash hiderowcolors}
+
+
+Der \emph{rowcolors status} ist standardmäßig aktiviert (d.h. das Farbschema wird verwendet),
+er wird durch den Befehl \verb"\hiderowcolors" deaktiviert (d.h. das Farbschema wird ignoriert) und kann
+mit \verb"\showrowcolors" wieder aktiviert werden.
+
+\textbf{\slash rownum}
+
+Der Zähler \verb"\rownum" (oder \LaTeX\ Zähler \verb"rownum"
+kann innerhalb einer solchen Tabelle verwendet werden, um auf die aktuelle Zeilennummer zuzugreifen.
+
+Derzeit wird der \verb"rownum"-Zähler nur in Tabellen mit \verb"\rowcolors" inkrementiert.
+
+\begin{center}
+\begin{minipage}{\textwidth}
+\begin{verbatim}
+\rowcolors[\hline]{3}{green}{yellow} \arrayrulecolor{red}
+\begin{tabular}{ll}
+test & row \therownum\\
+test & row \therownum\\
+test & row \therownum\\
+test & row \therownum\\
+\arrayrulecolor{black}
+test & row \therownum\\
+test & row \therownum\\
+\rowcolor{blue}
+test & row \therownum\\
+test & row \therownum\\
+\hiderowcolors
+test & row \therownum\\
+test & row \therownum\\
+\showrowcolors
+test & row \therownum\\
+test & row \therownum\\
+\multicolumn{1}%
+ {>{\columncolor{red}}l}{test} & row \therownum\\
+\end{tabular}
+\end{verbatim}
+\end{minipage}
+\hskip-.5\textwidth
+\rowcolors[\hline]{3}{green}{yellow} \arrayrulecolor{red}
+\begin{tabular}{ll}
+test & row \therownum\\
+test & row \therownum\\
+test & row \therownum\\
+test & row \therownum\\
+\arrayrulecolor{black}
+test & row \therownum\\
+test & row \therownum\\
+\rowcolor{cyan}
+test & row \therownum\\
+test & row \therownum\\
+\hiderowcolors
+test & row \therownum\\
+test & row \therownum\\
+\showrowcolors
+test & row \therownum\\
+test & row \therownum\\
+\multicolumn{1}%
+ {>{\columncolor{magenta}}l}{test} & row \therownum\\
+\end{tabular}
+\qquad
+\rowcolors*[\hline]{3}{green}{yellow}\arrayrulecolor{red}
+\begin{tabular}{ll}
+test & row \therownum\\
+test & row \therownum\\
+test & row \therownum\\
+test & row \therownum\\
+\arrayrulecolor{black}
+test & row \therownum\\
+test & row \therownum\\
+\rowcolor{blue}
+test & row \therownum\\
+test & row \therownum\\
+\hiderowcolors
+test & row \therownum\\
+test & row \therownum\\
+\showrowcolors
+test & row \therownum\\
+test & row \therownum\\
+\multicolumn{1}%
+ {>{\columncolor{red}}l}{test} & row \therownum\\
+\end{tabular}
+\arrayrulecolor{black}
+\end{center}
+
\section{Der \slash \textsf{cellcolor} Befehl}
Die Einstellung der Hintergrundfarbe kann auch auf eine einzelne Zelle beschr"ankt werden,
diff --git a/Master/texmf-dist/doc/latex/colortbl/colortbl.pdf b/Master/texmf-dist/doc/latex/colortbl/colortbl.pdf
index 5d1174b694e..88310439cd2 100644
--- a/Master/texmf-dist/doc/latex/colortbl/colortbl.pdf
+++ b/Master/texmf-dist/doc/latex/colortbl/colortbl.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/colortbl/colortbl.dtx b/Master/texmf-dist/source/latex/colortbl/colortbl.dtx
index 2816d576c29..3e368d1a550 100644
--- a/Master/texmf-dist/source/latex/colortbl/colortbl.dtx
+++ b/Master/texmf-dist/source/latex/colortbl/colortbl.dtx
@@ -1,7 +1,7 @@
% \iffalse
%%
%% Source File: `colortbl.dtx'.
-%% Copyright 1996 1998 1999 2012 2018 2020 David Carlisle
+%% Copyright 1996 1998 1999 2012 2018 2020 2022 David Carlisle
%%
%% This file may be distributed under the terms of the LPPL.
%% See readme for details.
@@ -15,7 +15,7 @@
%<driver>\ProvidesFile{colortbl.drv}
% \fi
% \ProvidesFile{colortbl.dtx}
- [2020/01/04 v1.0e Color table columns (DPC)]
+ [2022/06/20 v1.0f Color table columns (DPC)]
%
% \iffalse
%<*driver>
@@ -41,11 +41,11 @@
% \date{\filedate}
%
% \maketitle
-%
+%
%
% \begin{abstract}
-% This package implements a flexible mechanism for giving coloured
-% `panels' behind specified columns in a table.
+% This package implements a flexible mechanism for giving coloured
+% `panels' behind specified columns in a table.
% This package requires the \textsf{array} and \textsf{color} packages.
% \end{abstract}
%
@@ -73,11 +73,12 @@
% \changes{v1.0c}{2018/05/02}{Updates to match new array code}
% \changes{v1.0d}{2018/12/22}{Updates to match even newer array code}
% \changes{v1.0e}{2020/01/04}{Updates to match updated hhline}
+% \changes{v1.0f}{2022/06/20}{moved \cs{rowcolors} code from xcolor}
%
% \section{Introduction}
%
% This package is for colouring tables (i.e., giving coloured panels
-% behind column entries). In that it has many similarities with
+% behind column entries). In that it has many similarities with
% Timothy Van Zandt's \textsf{colortab} package. The internal
% implementation is quite different though, also \textsf{colortab}
% works with the table constructs of other formats besides \LaTeX.
@@ -103,7 +104,7 @@
%
% \section{ The \cs{columncolor} command}
%
-% The examples below demonstrate various possibilities of the
+% The examples below demonstrate various possibilities of the
% "\columncolor" command introduced by this package. The vertical rules
% specified by "|" are kept in all the examples, to make the column
% positioning clearer, although possibly you would not want coloured
@@ -187,10 +188,10 @@
% \end{tabular}}
% \end{center}
%
-%
+%
% This package should work with most other packages that are
% compatible with the \textsf{array} package syntax. In particular it
-% works with \textsf{longtable} and \textsf{dcolumn}
+% works with \textsf{longtable} and \textsf{dcolumn}
% as the following example shows.
%\errorcontextlines10
% \newcolumntype{A}{%^^A
@@ -216,10 +217,10 @@
%^^A needs a June 96 version of dcolumn, so use -1 here.
% \newcolumntype{C}{%
% >{\columncolor{yellow}[.5\tabcolsep]}%
-% D{.}{\cdot}{-1}}
+% D{.}{\cdot}{-1}}
% \newcolumntype{I}{%^^A
% >{\columncolor[gray]{0.8}[\tabcolsep][.5\tabcolsep]}%^^A
-% D{.}{\cdot}{-1}}
+% D{.}{\cdot}{-1}}
%
% \setlength\minrowclearance{2pt}
% Before starting give a little space: "\setlength\minrowclearance{2pt}"
@@ -253,7 +254,7 @@
% aaa&Depending on your driver you may get unsightly gaps or lines
% where the `screens' used to produce different shapes interact
% badly. You may want to cause adjacent panels of the same colour by
-% specifying a larger overhang
+% specifying a larger overhang
% or by adding some negative space (in a "\noalign" between rows.&12.4\\
% aaa&bbb&45.3\\
% \end{longtable}
@@ -273,7 +274,7 @@
% p{3cm}}
% \newcolumntype{C}{%
% >{\columncolor{yellow}[.5\tabcolsep]}%
-% D{.}{\cdot}{3.3}}
+% D{.}{\cdot}{3.3}}
% \newcolumntype{E}{%
% >{\large\bfseries
% \columncolor{cyan}[.5\tabcolsep]}c}
@@ -285,7 +286,7 @@
% \newcolumntype{H}{>{\columncolor[gray]{0.8}}l}
% \newcolumntype{I}{%
% >{\columncolor[gray]{0.8}[\tabcolsep][.5\tabcolsep]}%
-% D{.}{\cdot}{3.3}}
+% D{.}{\cdot}{3.3}}
%\end{verbatim}
%
% \section{Using the `overhang' arguments for \textsf{tabular*}}
@@ -388,18 +389,114 @@
% \end{tabular}}
% \end{center}
%
+% \section{The \cs{rowcolors} command}
+% The \cs{rowcolors} command and its documentation originate in the \textsf{xcolor} package
+% by Dr. Uwe Kern.
+%
+% \DescribeMacro\rowcolors
+% \oarg{commands}\marg{row}\marg{odd-row color}\marg{even-row color}\\
+% \DescribeMacro{\rowcolors*}
+% \oarg{commands}\marg{row}\marg{odd-row color}\marg{even-row color}\\
+% One of these commands has to be executed \emph{before} a table starts.
+% \meta{row} tells the number of the first row which should be colored according to the \meta{odd-row color} and \meta{even-row color} scheme.
+% Each of the color arguments may also be left empty (= no color).
+% In the starred version, \meta{commands} are ignored in rows with inactive \emph{rowcolors status} (see below), whereas in the non-starred version, \meta{commands} are applied to every row of the table.
+% Such optional commands may be "\hline" or "\noalign"\marg{stuff}.
+%
+% \DescribeMacro\showrowcolors
+% \DescribeMacro\hiderowcolors
+% The \emph{rowcolors status} is activated (i.e., use coloring scheme) by default and/or "\showrowcolors", it is inactivated (i.e., ignore coloring scheme) by the command "\hiderowcolors".
+% \DescribeMacro\rownum
+% The counter "\rownum" (or \LaTeX\ counter "rownum")
+% may be used within such a table to access the current row number.
+%
+% At the present time, the "rownum" counter is only incremented in tables using "\rowcolors".
+%
+% \begin{center}
+% \begin{minipage}{\textwidth}
+% \begin{verbatim}
+% \rowcolors[\hline]{3}{green}{yellow} \arrayrulecolor{red}
+% \begin{tabular}{ll}
+% test & row \therownum\\
+% test & row \therownum\\
+% test & row \therownum\\
+% test & row \therownum\\
+% \arrayrulecolor{black}
+% test & row \therownum\\
+% test & row \therownum\\
+% \rowcolor{blue}
+% test & row \therownum\\
+% test & row \therownum\\
+% \hiderowcolors
+% test & row \therownum\\
+% test & row \therownum\\
+% \showrowcolors
+% test & row \therownum\\
+% test & row \therownum\\
+% \multicolumn{1}%
+% {>{\columncolor{red}}l}{test} & row \therownum\\
+% \end{tabular}
+% \end{verbatim}
+% \end{minipage}
+% \hskip-.5\textwidth
+% \rowcolors[\hline]{3}{green}{yellow} \arrayrulecolor{red}
+% \begin{tabular}{ll}
+% test & row \therownum\\
+% test & row \therownum\\
+% test & row \therownum\\
+% test & row \therownum\\
+% \arrayrulecolor{black}
+% test & row \therownum\\
+% test & row \therownum\\
+% \rowcolor{cyan}
+% test & row \therownum\\
+% test & row \therownum\\
+% \hiderowcolors
+% test & row \therownum\\
+% test & row \therownum\\
+% \showrowcolors
+% test & row \therownum\\
+% test & row \therownum\\
+% \multicolumn{1}%
+% {>{\columncolor{magenta}}l}{test} & row \therownum\\
+% \end{tabular}
+% \qquad
+% \rowcolors*[\hline]{3}{green}{yellow}\arrayrulecolor{red}
+% \begin{tabular}{ll}
+% test & row \therownum\\
+% test & row \therownum\\
+% test & row \therownum\\
+% test & row \therownum\\
+% \arrayrulecolor{black}
+% test & row \therownum\\
+% test & row \therownum\\
+% \rowcolor{blue}
+% test & row \therownum\\
+% test & row \therownum\\
+% \hiderowcolors
+% test & row \therownum\\
+% test & row \therownum\\
+% \showrowcolors
+% test & row \therownum\\
+% test & row \therownum\\
+% \multicolumn{1}%
+% {>{\columncolor{red}}l}{test} & row \therownum\\
+% \end{tabular}
+% \arrayrulecolor{black}
+% \end{center}
+%
% \section{The \cs{cellcolor} command}
%
% A background colour can be applied to a single cell of a table by
-% beginning it with
-% "\multicolumn"\nolinebreak[3]"{1}"\nolinebreak[3]"{>{\rowcolor"\ldots,
-% (or "\columncolor" if no row-colour is in effect) but this has some
-% deficiencies:
+% beginning it with
+% "\multicolumn"\nolinebreak[3]"{1}"\nolinebreak[3]"{>{\rowcolor"\ldots,
+% (or "\columncolor" if no row-colour is in effect) but this has some
+% deficiencies:
% 1)~It prevents data within the cell from triggering the colouration; \
% 2)~The alignment specification must be copied from the top of the tabular,
% which is prone to errors, especially for "p{}" columns; \
% 3)~"\multicolumn{1}" is just silly. \
-% Therefore, there is the \cs{cellcolor} command, which works like
+% Therefore, there is the \cs{cellcolor} command, which works like
% \cs{columncolor} and \cs{rowcolor}, but over-rides both of them;
% \cs{cellcolor} can be placed anywhere in the tabular cell to which
% it applies.
@@ -409,13 +506,13 @@
% So you want coloured rules as well?
%
% One could do vertical rules without any special commands, just use
-% something like "!{\color{green}\vline}" where you'd
+% something like "!{\color{green}\vline}" where you'd
% normally use "|". The space between "||" will normally be left white.
% If you want to colour that as well, either increase the overhang of
-% the previous column (to
+% the previous column (to
% "\tabcolsep" + "\arrayrulewidth" + "\doublerulesep")
% Or remove the inter rule glue, and replace by a coloured rule of the
-% required thickness. So
+% required thickness. So
%\begin{verbatim}
%!{\color{green}\vline}
%@{\color{yellow}\vrule width \doublerulesep}
@@ -446,7 +543,7 @@
% discard space, but the coloured `space' which is used once
% "\doublerulesep" is in effect is really a third rule of a different
% colour to the two outer rules, and rules are rather harder to
-% discard.)
+% discard.)
%
% \begin{center}
% \setlength\arrayrulewidth{2pt}\arrayrulecolor{blue}
@@ -568,7 +665,7 @@
% "\hline" or the top of a colour panel defined by this style.
% It is best to increase "\extrarowsep" or "\arraystretch"
% sufficiently to ensure this doesn't happen, as that will keep the
-% line spacing in the table regular. Sometimes however, you just want
+% line spacing in the table regular. Sometimes however, you just want
% to \LaTeX\ to insert a bit of extra space above a large entry.
% You can set the length "\minrowclearance" to a small value.
% (The height of a capital letter plus this value should not be
@@ -580,7 +677,7 @@
% compatibility with \textsf{tabls}, but that is implemented quite
% differently and probably has different behaviour. So I'll keep a new
% name for now.
-%
+%
% \StopEventually{}
%
% \section{The Code}
@@ -794,10 +891,11 @@
% \end{macro}
%
% \begin{macro}{\CT@extract}
+% \changes{v1.0f}{2022/06/20}{protect against active characters}
% Now the code to extract the "\columncolor" commands.
% \begin{macrocode}
\def\CT@extract#1\columncolor#2#3\@nil{%
- \if!#2%
+ \if!\noexpand#2%
% \end{macrocode}
% "!" is a fake token inserted at the end.
% \begin{macrocode}
@@ -806,7 +904,7 @@
% \end{macrocode}
% If there was an optional argument
% \begin{macrocode}
- \if[#2%
+ \if[\noexpand#2%
\CT@extractb{#1}#3\@nil
\else
% \end{macrocode}
@@ -850,13 +948,15 @@
% \begin{macro}{\CT@extractf}
% Add the overhang info to "\CT@do@color", for excuting later.
% \begin{macrocode}
-\def\CT@extractf#1[#2][#3]#4\columncolor#5\@nil{%
+{\catcode`\!\active
+\gdef\CT@extractf#1[#2][#3]#4\columncolor#5\@nil{%
\@tempdimb#2\relax
\@tempdimc#3\relax
+ \edef!{\string!}%
\edef\CT@column@color{%
\CT@column@color
\@tempdimb\the\@tempdimb\@tempdimc\the\@tempdimc\relax}%
- \toks\@tempcnta{#1#4}}%
+ \toks\@tempcnta{#1#4}}}%
% \end{macrocode}
% \end{macro}
%
@@ -954,7 +1054,7 @@
\else
\@addtopreamble{{\CT@drsc@\vrule\@width\doublerulesep}}%
\fi\or
- \@acol \or
+ \@acol \or
\@classvii
\fi}
% \end{macrocode}
@@ -1145,6 +1245,111 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@ifxempty}
+% \marg{arg}\marg{empty}\marg{non-empty}\\
+% Tests without expanding, whether the argument \marg{arg} is empty and executes the following code accordingly; \marg{arg} must not start with the token "\XC@@".
+% Can also be used within "\edef".
+% \begin{macrocode}
+\def\@ifxempty#1{\@@ifxempty#1\@@ifxempty\XC@@}
+\def\@@ifxempty#1#2\XC@@
+ {\ifx#1\@@ifxempty
+ \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\rowcolors}
+% \begin{macro}{\rowcolors*}
+% \oarg{commands}\marg{row}\marg{odd-row color}\marg{even-row color}\\
+% Defines alternating colors for the next tabular environment.
+% Starting with row \meta{row}, odd and even rows get their respective colors.
+% The color arguments may also be left empty (= no color).
+% Optional commands may be "hline" or "noalign"\marg{stuff}.
+%
+% In the starred version, \meta{commands} are ignored in rows with
+% inactive rowcolors status (see below), whereas in the non-starred
+% version, \meta{commands} are applied to every row of the
+% table.
+% \begin{macrocode}
+ \def\rowcolors
+ {\@ifstar{\@rowcmdfalse\rowc@lors}{\@rowcmdtrue\rowc@lors}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\rowc@lors{\@testopt{\rowc@l@rs}{}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\rowc@l@rs[#1]#2#3#4%
+ {\global\rownum=\z@
+ \global\@rowcolorstrue
+ \@ifxempty{#3}%
+ {\def\@oddrowcolor{\@norowcolor}}%
+ {\def\@oddrowcolor{\gdef\CT@row@color{\CT@color{#3}}}}%
+ \@ifxempty{#4}%
+ {\def\@evenrowcolor{\@norowcolor}}%
+ {\def\@evenrowcolor{\gdef\CT@row@color{\CT@color{#4}}}}%
+ \if@rowcmd
+ \def\@rowcolors
+ {#1\if@rowcolors
+ \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
+ \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
+ \fi}%
+ \else
+ \def\@rowcolors
+ {\if@rowcolors
+ \ifnum\rownum<#2\noalign{\@norowcolor}\else
+ #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
+ \fi}%
+ \fi
+ \CT@everycr{\@rowc@lors\the\everycr}%
+ \ignorespaces}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\@rowc@lors{\noalign{\global\advance\rownum\@ne}\@rowcolors}
+ \let\@rowcolors\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\showrowcolors}
+% \begin{macro}{\hiderowcolors}
+% Switch coloring mode on/off.
+% \begin{macrocode}
+ \def\showrowcolors{\noalign{\global\@rowcolorstrue}\@rowcolors}
+ \def\hiderowcolors{\noalign{\global\@rowcolorsfalse\@norowcolor}}
+ \def\@norowcolor{\global\let\CT@row@color\relax}
+ \@norowcolor
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@rowcolors}
+% \begin{macro}{\if@rowcmd}
+% \begin{macrocode}
+ \newif\if@rowcolors
+ \newif\if@rowcmd
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\rownum}
+% \begin{macro}{\c@rownum}
+% Reserve a counter register. Also alias as a \LaTeX\ counter
+% (but not via "\newcounter" as should not be in the reset list.)
+% \begin{macrocode}
+ \@ifundefined{rownum}{%
+ \@ifundefined{c@rownum}%
+ {\newcount\rownum\let\c@rownum\rownum}%
+ {\let\rownum\c@rownum}%
+ }%
+ {\let\c@rownum\rownum}
+ \providecommand\therownum{\arabic{rownum}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
% \begin{macro}{\cellcolor}
% "\cellcolor" applies the specified colour to just its own tabular cell.
% It is defined robust, but without using "\DeclareRobustCommand" or
@@ -1162,7 +1367,7 @@
\global\let\CT@cell@color\relax
}}
\global\let\CT@cell@color\relax
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DC@endright}
diff --git a/Master/texmf-dist/tex/latex/colortbl/colortbl.sty b/Master/texmf-dist/tex/latex/colortbl/colortbl.sty
index 69b26a40b19..4f712c1323b 100644
--- a/Master/texmf-dist/tex/latex/colortbl/colortbl.sty
+++ b/Master/texmf-dist/tex/latex/colortbl/colortbl.sty
@@ -8,14 +8,14 @@
%%
%%
%% Source File: `colortbl.dtx'.
-%% Copyright 1996 1998 1999 2012 2018 2020 David Carlisle
+%% Copyright 1996 1998 1999 2012 2018 2020 2022 David Carlisle
%%
%% This file may be distributed under the terms of the LPPL.
%% See readme for details.
%%
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{colortbl}
- [2020/01/04 v1.0e Color table columns (DPC)]
+ [2022/06/20 v1.0f Color table columns (DPC)]
\edef\@tempa{%
\noexpand\AtEndOfPackage{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax}}
@@ -84,10 +84,10 @@
\kern-\@tempdimc
\hskip-\wd\z@ \@plus -1fill }
\def\CT@extract#1\columncolor#2#3\@nil{%
- \if!#2%
+ \if!\noexpand#2%
\let\CT@column@color\@empty
\else
- \if[#2%
+ \if[\noexpand#2%
\CT@extractb{#1}#3\@nil
\else
\def\CT@column@color{%
@@ -101,13 +101,15 @@
\CT@extractd{#1}}%
\def\CT@extractd#1{\@testopt{\CT@extracte{#1}}\col@sep}
\def\CT@extracte#1[#2]{\@testopt{\CT@extractf{#1}[#2]}{#2}}
-\def\CT@extractf#1[#2][#3]#4\columncolor#5\@nil{%
+{\catcode`\!\active
+\gdef\CT@extractf#1[#2][#3]#4\columncolor#5\@nil{%
\@tempdimb#2\relax
\@tempdimc#3\relax
+ \edef!{\string!}%
\edef\CT@column@color{%
\CT@column@color
\@tempdimb\the\@tempdimb\@tempdimc\the\@tempdimc\relax}%
- \toks\@tempcnta{#1#4}}%
+ \toks\@tempcnta{#1#4}}}%
\let\CT@everycr\everycr
\newtoks\everycr
\CT@everycr{\noalign{\global\let\CT@row@color\relax}\the\everycr}
@@ -226,6 +228,52 @@
\@tempdimc\the\@tempdimc
\relax}%
\ifnum0=`{\fi}}
+\def\@ifxempty#1{\@@ifxempty#1\@@ifxempty\XC@@}
+\def\@@ifxempty#1#2\XC@@
+ {\ifx#1\@@ifxempty
+ \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+ \def\rowcolors
+ {\@ifstar{\@rowcmdfalse\rowc@lors}{\@rowcmdtrue\rowc@lors}}
+ \def\rowc@lors{\@testopt{\rowc@l@rs}{}}
+ \def\rowc@l@rs[#1]#2#3#4%
+ {\global\rownum=\z@
+ \global\@rowcolorstrue
+ \@ifxempty{#3}%
+ {\def\@oddrowcolor{\@norowcolor}}%
+ {\def\@oddrowcolor{\gdef\CT@row@color{\CT@color{#3}}}}%
+ \@ifxempty{#4}%
+ {\def\@evenrowcolor{\@norowcolor}}%
+ {\def\@evenrowcolor{\gdef\CT@row@color{\CT@color{#4}}}}%
+ \if@rowcmd
+ \def\@rowcolors
+ {#1\if@rowcolors
+ \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
+ \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
+ \fi}%
+ \else
+ \def\@rowcolors
+ {\if@rowcolors
+ \ifnum\rownum<#2\noalign{\@norowcolor}\else
+ #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
+ \fi}%
+ \fi
+ \CT@everycr{\@rowc@lors\the\everycr}%
+ \ignorespaces}
+ \def\@rowc@lors{\noalign{\global\advance\rownum\@ne}\@rowcolors}
+ \let\@rowcolors\@empty
+ \def\showrowcolors{\noalign{\global\@rowcolorstrue}\@rowcolors}
+ \def\hiderowcolors{\noalign{\global\@rowcolorsfalse\@norowcolor}}
+ \def\@norowcolor{\global\let\CT@row@color\relax}
+ \@norowcolor
+ \newif\if@rowcolors
+ \newif\if@rowcmd
+ \@ifundefined{rownum}{%
+ \@ifundefined{c@rownum}%
+ {\newcount\rownum\let\c@rownum\rownum}%
+ {\let\rownum\c@rownum}%
+ }%
+ {\let\c@rownum\rownum}
+ \providecommand\therownum{\arabic{rownum}}
\edef\cellcolor{\noexpand\protect
\expandafter\noexpand\csname cellcolor \endcsname}
\@namedef{cellcolor }{%