| 1 |
% xcolor.4ht (2025-06-05-13:26), generated from tex4ht-4ht.tex |
| 2 |
% Copyright 2007-2009 Eitan M. Gurari |
| 3 |
% Copyright 2009-2025 TeX Users Group |
| 4 |
% |
| 5 |
% This work may be distributed and/or modified under the |
| 6 |
% conditions of the LaTeX Project Public License, either |
| 7 |
% version 1.3c of this license or (at your option) any |
| 8 |
% later version. The latest version of this license is in |
| 9 |
% https://www.latex-project.org/lppl.txt |
| 10 |
% and version 1.3c or later is part of all distributions |
| 11 |
% of LaTeX version 2005/12/01 or later. |
| 12 |
% |
| 13 |
% This work has the LPPL maintenance status "maintained". |
| 14 |
% |
| 15 |
% The Current Maintainer of this work |
| 16 |
% is the TeX4ht Project <https://tug.org/tex4ht>. |
| 17 |
% |
| 18 |
% If you modify this program, changing the |
| 19 |
% version identification would be appreciated. |
| 20 |
\immediate\write-1{version 2025-06-05-13:26} |
| 21 |
|
| 22 |
\input color.4ht |
| 23 |
\def\rowc@l@rs[#1]#2#3#4% |
| 24 |
{\global\rownum=\z@ |
| 25 |
\global\@rowcolorstrue |
| 26 |
\@ifxempty{#3}% |
| 27 |
{\def\@oddrowcolor{\@norowcolor}}% |
| 28 |
{\def\@oddrowcolor{\a:rowcolors{#3}% |
| 29 |
\gdef\CT@row@color{\CT@color{#3}}}}% |
| 30 |
\@ifxempty{#4}% |
| 31 |
{\def\@evenrowcolor{\@norowcolor}}% |
| 32 |
{\def\@evenrowcolor{\a:rowcolors{#4}% |
| 33 |
\gdef\CT@row@color{\CT@color{#4}}}}% |
| 34 |
\if@rowcmd |
| 35 |
\def\@rowcolors |
| 36 |
{#1\if@rowcolors |
| 37 |
\o:noalign:{\relax\ifnum\rownum<#2\@norowcolor\else |
| 38 |
\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}% |
| 39 |
\fi}% |
| 40 |
\else |
| 41 |
\def\@rowcolors |
| 42 |
{\if@rowcolors |
| 43 |
\ifnum\rownum<#2\o:noalign:{\@norowcolor}\else |
| 44 |
#1\o:noalign:{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi |
| 45 |
\fi}% |
| 46 |
\fi |
| 47 |
\CT@everycr{\@rowc@lors\the\everycr}% |
| 48 |
\ignorespaces} |
| 49 |
\NewConfigure{rowcolors}{1} |
| 50 |
\def\@rowc@lors{\o:noalign:{\global\advance\rownum\@ne}\@rowcolors} |
| 51 |
\def\showrowcolors{\o:noalign:{\global\@rowcolorstrue}\@rowcolors} |
| 52 |
\def\hiderowcolors{\o:noalign:{\global\@rowcolorsfalse\@norowcolor}} |
| 53 |
\def\:temp#1#2#3{{\set@color}} |
| 54 |
\HLet\color@block\:temp |
| 55 |
\def\:temp#1#2#3{} |
| 56 |
\HLet\boxframe\:temp |
| 57 |
\def\strip:fin:excl#1!{#1} |
| 58 |
\expandafter\def\csname get!HColor\endcsname#1!#2//{% |
| 59 |
\def\current:color:name{#1\if!#2!\else!\strip:fin:excl#2\fi}% |
| 60 |
\if\relax#2\relax |
| 61 |
%\expandafter\ifx \csname HColor!#1\endcsname\relax |
| 62 |
\let\HColor=\relax |
| 63 |
\expandafter\ifx \csname\string\color @#1\endcsname \relax\else |
| 64 |
\expandafter\ifx \csname colortyp:\endcsname\relax \else |
| 65 |
\extractcolorspec{#1\if!#2!\else!\strip:fin:excl#2\fi}\tmp:color% |
| 66 |
\expandafter\convertcolorspec\tmp:color{HTML}\tmp:color% |
| 67 |
\def\HColor{\#\tmp:color}% |
| 68 |
\Configure{HColor}{\current:color:name}{\HColor}% |
| 69 |
\csname colortyp:\expandafter\expandafter\expandafter\endcsname |
| 70 |
\csname\string\color @#1\expandafter\endcsname |
| 71 |
\space .!//% |
| 72 |
\fi \fi |
| 73 |
% |
| 74 |
\else% |
| 75 |
\ifcsname HColor!#1\endcsname% |
| 76 |
\csname HColor!#1\endcsname #2//% |
| 77 |
\else |
| 78 |
\get:xcolorcss{#1!#2}{\HColor}% |
| 79 |
\Configure{HColor}{\current:color:name}{\HColor}% |
| 80 |
\fi% |
| 81 |
\fi |
| 82 |
} |
| 83 |
\expandafter\def\csname c:HColor!gray:\endcsname{% |
| 84 |
\expandafter\def\csname HColor!gray\endcsname##1!##2//} |
| 85 |
\Configure{HColor!gray}{\Configure{HColor}{}{}} |
| 86 |
\expandafter\def\csname c:HColor!rgb:\endcsname{% |
| 87 |
\expandafter\def\csname HColor!rgb\endcsname##1,##2,##3!##4//} |
| 88 |
\Configure{HColor!rgb}{\Configure{HColor}{}{}} |
| 89 |
\expandafter\def\csname c:HColor!cmyk:\endcsname{% |
| 90 |
\expandafter\def\csname HColor!cmyk\endcsname##1,##2,##3,##4!##5//} |
| 91 |
\Configure{HColor!cmyk}{\Configure{HColor}{}{}} |
| 92 |
\def\get:xcolorcss#1#2{% |
| 93 |
\expandafter\extractcolorspec\expandafter{#1}{\tsf:color}% |
| 94 |
\expandafter\convertcolorspec\tsf:color{HTML}\tsf:color% |
| 95 |
\edef#2{\#\tsf:color}% |
| 96 |
} |
| 97 |
|
| 98 |
\renewcommand\:settextcolor[2][]{% |
| 99 |
\if\relax\detokenize{#1}\relax% |
| 100 |
\extractcolorspec{#2}{\:currentcolor}% |
| 101 |
\expandafter\convertcolorspec\:currentcolor{HTML}\:currentcolor% |
| 102 |
\else% |
| 103 |
\convertcolorspec{#1}{#2}{HTML}{\:currentcolor}% |
| 104 |
\fi% |
| 105 |
\edef\:currentcolor{\#\:currentcolor}% |
| 106 |
} |
| 107 |
\:CheckOption{color}\if:Option |
| 108 |
\pend:defI\@declaredcolor{% |
| 109 |
\ifdefined\end:def:color\end:def:color\else\aftergroup\b:textcolor\fi |
| 110 |
\a:textcolor\def\end:def:color{\b:textcolor}% |
| 111 |
} |
| 112 |
\fi |
| 113 |
|
| 114 |
\Hinput{xcolor} |
| 115 |
\endinput |
| 116 |
|