-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
How about allowing for an empty color parameter to specify no column color.
This would be very useful for defining column types that may be colored, for instance
\newcolumntype{L}[1]{>{\columncolor{#2}}l}
which then can be used also for columns without coloring.
For the use of \columncolor without optional parameters this could be done by changing the definition of \CT@extract as follows (inserted lines marked as inserted)
\def\CT@extract#1\columncolor#2#3\@nil{%
\if!\noexpand#2%
\let\CT@column@color\@empty%
\else%
\if[\noexpand#2%
\CT@extractb{#1}#3\@nil%
\else%
\if\relax\detokenize{#2}\relax% inserted
\let\CT@column@color\@empty% inserted
\else% inserted
\def\CT@column@color{%
\CT@color{#2}}%
\fi% inserted
\CT@extractd{#1}#3\@nil%
\fi%
\fi%
}%
For the use of \columncolor with optional parameters
\def\CT@extractb#1#2]#3{%
\if\relax\detokenize{#2}\relax% inserted
\let\CT@column@color\@empty% inserted
\else% inserted
\def\CT@column@color{%
\CT@color[#2]{#3}}%
\fi% inserted
\CT@extractd{#1}%
}%
should do the trick (although I haven't tested this).
Best regards
Rene
Metadata
Metadata
Assignees
Labels
No labels