diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/tex4ht/colortbl.4ht')
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/colortbl.4ht | 67 |
1 files changed, 65 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/colortbl.4ht b/Master/texmf-dist/tex/generic/tex4ht/colortbl.4ht index e32ab67874f..5d4296372d9 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/colortbl.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/colortbl.4ht @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% colortbl.4ht 2008-02-28-20:51 % +% colortbl.4ht 2008-07-04-10:48 % % Copyright (C) 1997--2008 Eitan M. Gurari % % % % This work may be distributed and/or modified under the % @@ -24,12 +24,61 @@ % gurari@cse.ohio-state.edu % % http://www.cse.ohio-state.edu/~gurari % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\immediate\write-1{version 2008-02-28-20:51} +\immediate\write-1{version 2008-07-04-10:48} \CT@everycr{\o:noalign:{\global\let\CT@row@color\relax}\the\everycr} \def\columncolor#1{{\def\current@color{#1}% \csname a:cell-colortbl\endcsname}} +\Odef\columncolor[#1]#2{{\if :#1:\def\current@color{#2}% + \else + \Configure{tblcol:#1}{#2}% + \fi + \csname a:cell-colortbl\endcsname}% + \futurelet\:temp\left:colcol} +\def\left:colcol{% + \ifx [\:temp \expandafter\left::colcol \fi +} +\def\left::colcol[#1]{ + \futurelet\:temp\right:colcol +} +\def\right:colcol{% + \ifx [\:temp \expandafter\right::colcol \fi +} +\def\right::colcol[#1]{} +\HAssign\tblcol:N = 0 +\NewConfigure{tblcol:gray}[1]{% + \gHAdvance\tblcol:N by 1 + \def\:temp##1 ##2//{% + \int:of\:tempa{255}{##1}% + \Configure{HColor}{tblcol-\tblcol:N}{rgb(\:tempa,\:tempa,\:tempa)}% + }\:temp #1 //% + \def\current@color{tblcol-\tblcol:N}% +} +\NewConfigure{tblcol:rgb}[1]{% + \gHAdvance\tblcol:N by 1 + \def\:temp##1 ##2 ##3 ##4//{% + \int:of\:tempa{255}{##1}% + \int:of\:tempb{255}{##2}% + \int:of\:tempc{255}{##3}% + \Configure{HColor}{tblcol-\tblcol:N}{rgb(\:tempa,\:tempb,\:tempc)}% + }\:temp #1 //% + \def\current@color{tblcol-\tblcol:N}% +} +\NewConfigure{tblcol:cmyk}[1]{% + \gHAdvance\tblcol:N by 1 + \def\:temp##1 ##2 ##3 ##4 ##5//{% + \int:of\:Cyan{255}{##1}% + \int:of\:Magenta{255}{##2}% + \int:of\:Yellow{255}{##3}% + \int:of\:Black{255}{##4}% + \:cmyk\:tempa\:Cyan + \:cmyk\:tempb\:Magenta + \:cmyk\:tempc\:Yellow + \Configure{HColor}{tblcol-\tblcol:N}{rgb(\:tempa,\:tempb,\:tempc)}% + }\:temp #1 //% + \def\current@color{tblcol-\tblcol:N}% +} \NewConfigure{@classz}{4} \pend:def\@classz{\pic:gobble\a:@classz} \append:def\@classz{\pic:gobble\b:@classz} @@ -47,6 +96,20 @@ \def\rowcolor{% \o:noalign:{\ifnum0=`}\fi \global\let\CT@do@color\CT@@do@color + \relax +\ifx\LT@head\Un:Def\else + \ifnum \HRow=0\relax + \expandafter\ifx\csname lt:sv\endcsname\relax + \HAssign\HRow = 1\relax + \ifvoid\LT@head + \ifvoid\LT@firsthead \else \HAdvance\HRow by 1\relax\fi + \else \HAdvance\HRow by 1\relax\fi + \else + \HAssign\HRow = \lt:sv \relax + \HAdvance\HRow by 1\relax + \fi +\fi\fi +% \@ifnextchar[\CT@rowa\CT@rowb} \def\CT@rowa[#1]#2{% \pic:gobbleII\a:rowcolor{#1 #2}% |