diff options
author | Karl Berry <karl@freefriends.org> | 2022-07-31 20:42:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-07-31 20:42:23 +0000 |
commit | 7abc545a5c6600bb7478cf356c60acb2c4e74e2e (patch) | |
tree | 54156236e2c776831fd8e9b2eed733e06d5b1751 /Master/texmf-dist/tex/latex | |
parent | 777011fda32e002ee464628cc0bb24380db95279 (diff) |
colortbl (31jul22)
git-svn-id: svn://tug.org/texlive/trunk@64015 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/colortbl/colortbl.sty | 60 |
1 files changed, 54 insertions, 6 deletions
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 }{% |