texlive[64015] Master/texmf-dist: colortbl (31jul22)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 31 22:42:23 CEST 2022


Revision: 64015
          http://tug.org/svn/texlive?view=revision&revision=64015
Author:   karl
Date:     2022-07-31 22:42:23 +0200 (Sun, 31 Jul 2022)
Log Message:
-----------
colortbl (31jul22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.pdf
    trunk/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex
    trunk/Master/texmf-dist/doc/latex/colortbl/colortbl.pdf
    trunk/Master/texmf-dist/source/latex/colortbl/colortbl.dtx
    trunk/Master/texmf-dist/tex/latex/colortbl/colortbl.sty

Modified: trunk/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex	2022-07-31 20:32:30 UTC (rev 64014)
+++ trunk/Master/texmf-dist/doc/latex/colortbl/colortbl-DE.tex	2022-07-31 20:42:23 UTC (rev 64015)
@@ -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 @@
   \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, 

Modified: trunk/Master/texmf-dist/doc/latex/colortbl/colortbl.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/colortbl/colortbl.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/colortbl/colortbl.dtx	2022-07-31 20:32:30 UTC (rev 64014)
+++ trunk/Master/texmf-dist/source/latex/colortbl/colortbl.dtx	2022-07-31 20:42:23 UTC (rev 64015)
@@ -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 at extract}
+% \changes{v1.0f}{2022/06/20}{protect against active characters}
 % Now the code to extract the "\columncolor" commands.
 %    \begin{macrocode}
 \def\CT at 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 at extractb{#1}#3\@nil
     \else
 %    \end{macrocode}
@@ -850,13 +948,15 @@
 % \begin{macro}{\CT at extractf}
 % Add the overhang info to "\CT at do@color", for excuting later.
 %    \begin{macrocode}
-\def\CT at extractf#1[#2][#3]#4\columncolor#5\@nil{%
+{\catcode`\!\active
+\gdef\CT at extractf#1[#2][#3]#4\columncolor#5\@nil{%
   \@tempdimb#2\relax
   \@tempdimc#3\relax
+  \edef!{\string!}%
   \edef\CT at column@color{%
     \CT at 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 at 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 at lors}{\@rowcmdtrue\rowc at lors}}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+ \def\rowc at lors{\@testopt{\rowc at l@rs}{}}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+ \def\rowc at l@rs[#1]#2#3#4%
+  {\global\rownum=\z@
+   \global\@rowcolorstrue
+   \@ifxempty{#3}%
+     {\def\@oddrowcolor{\@norowcolor}}%
+     {\def\@oddrowcolor{\gdef\CT at row@color{\CT at color{#3}}}}%
+   \@ifxempty{#4}%
+     {\def\@evenrowcolor{\@norowcolor}}%
+     {\def\@evenrowcolor{\gdef\CT at row@color{\CT at color{#4}}}}%
+   \if at rowcmd
+     \def\@rowcolors
+      {#1\if at rowcolors
+         \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
+                  \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
+       \fi}%
+   \else
+     \def\@rowcolors
+      {\if at rowcolors
+         \ifnum\rownum<#2\noalign{\@norowcolor}\else
+         #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
+       \fi}%
+   \fi
+   \CT at everycr{\@rowc at lors\the\everycr}%
+   \ignorespaces}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+ \def\@rowc at 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 at row@color\relax}
+ \@norowcolor
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if at rowcolors}
+% \begin{macro}{\if at rowcmd}
+%    \begin{macrocode}
+ \newif\if at rowcolors
+ \newif\if at rowcmd
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\rownum}
+% \begin{macro}{\c at 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 at rownum}%
+       {\newcount\rownum\let\c at rownum\rownum}%
+       {\let\rownum\c at rownum}%
+     }%
+    {\let\c at 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 at cell@color\relax
 }}
 \global\let\CT at cell@color\relax
-%    \end{macrocode} 
+%    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\DC at endright}

Modified: trunk/Master/texmf-dist/tex/latex/colortbl/colortbl.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/colortbl/colortbl.sty	2022-07-31 20:32:30 UTC (rev 64014)
+++ trunk/Master/texmf-dist/tex/latex/colortbl/colortbl.sty	2022-07-31 20:42:23 UTC (rev 64015)
@@ -8,7 +8,7 @@
 %% 
 %%
 %% 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 @@
 %%
 \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 at extract#1\columncolor#2#3\@nil{%
-  \if!#2%
+  \if!\noexpand#2%
     \let\CT at column@color\@empty
   \else
-    \if[#2%
+    \if[\noexpand#2%
       \CT at extractb{#1}#3\@nil
     \else
       \def\CT at column@color{%
@@ -101,13 +101,15 @@
   \CT at extractd{#1}}%
 \def\CT at extractd#1{\@testopt{\CT at extracte{#1}}\col at sep}
 \def\CT at extracte#1[#2]{\@testopt{\CT at extractf{#1}[#2]}{#2}}
-\def\CT at extractf#1[#2][#3]#4\columncolor#5\@nil{%
+{\catcode`\!\active
+\gdef\CT at extractf#1[#2][#3]#4\columncolor#5\@nil{%
   \@tempdimb#2\relax
   \@tempdimc#3\relax
+  \edef!{\string!}%
   \edef\CT at column@color{%
     \CT at column@color
     \@tempdimb\the\@tempdimb\@tempdimc\the\@tempdimc\relax}%
-  \toks\@tempcnta{#1#4}}%
+  \toks\@tempcnta{#1#4}}}%
 \let\CT at everycr\everycr
 \newtoks\everycr
 \CT at everycr{\noalign{\global\let\CT at 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 at lors}{\@rowcmdtrue\rowc at lors}}
+ \def\rowc at lors{\@testopt{\rowc at l@rs}{}}
+ \def\rowc at l@rs[#1]#2#3#4%
+  {\global\rownum=\z@
+   \global\@rowcolorstrue
+   \@ifxempty{#3}%
+     {\def\@oddrowcolor{\@norowcolor}}%
+     {\def\@oddrowcolor{\gdef\CT at row@color{\CT at color{#3}}}}%
+   \@ifxempty{#4}%
+     {\def\@evenrowcolor{\@norowcolor}}%
+     {\def\@evenrowcolor{\gdef\CT at row@color{\CT at color{#4}}}}%
+   \if at rowcmd
+     \def\@rowcolors
+      {#1\if at rowcolors
+         \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
+                  \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
+       \fi}%
+   \else
+     \def\@rowcolors
+      {\if at rowcolors
+         \ifnum\rownum<#2\noalign{\@norowcolor}\else
+         #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
+       \fi}%
+   \fi
+   \CT at everycr{\@rowc at lors\the\everycr}%
+   \ignorespaces}
+ \def\@rowc at 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 at row@color\relax}
+ \@norowcolor
+ \newif\if at rowcolors
+ \newif\if at rowcmd
+ \@ifundefined{rownum}{%
+    \@ifundefined{c at rownum}%
+       {\newcount\rownum\let\c at rownum\rownum}%
+       {\let\rownum\c at rownum}%
+     }%
+    {\let\c at rownum\rownum}
+ \providecommand\therownum{\arabic{rownum}}
 \edef\cellcolor{\noexpand\protect
   \expandafter\noexpand\csname cellcolor \endcsname}
 \@namedef{cellcolor }{%



More information about the tex-live-commits mailing list.