Debian Codegraph @

texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty

raw
1 %%
2 %% This is file `lwarp-colortbl.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% lwarp.dtx (with options: `colortbl')
8 %% This is a generated file.
9 %% Copyright 2016-2026 Brian Dunn
10 %%
11 %% This work may be distributed and/or modified under the
12 %% conditions of the LaTeX Project Public License, either version 1.3
13 %% of this license or (at your option) any later version.
14 %% The latest version of this license is in
15 %% http://www.latex-project.org/lppl.txt
16 %% and version 1.3 or later is part of all distributions of LaTeX
17 %% version 2005/12/01 or later.
18 \let\rowcolor\relax
19
20 \LWR@ProvidesPackagePass{colortbl}[2022/06/20]
21 \ProvideDocumentCommand{\columncolor}{O{named} m o o}{}%
22
23 \NewDocumentCommand{\LWR@HTML@columncolor}{O{named} m o o}{%
24 \convertcolorspec{#1}{#2}{HTML}\LWR@columnHTMLcolor%
25 \LWR@addtabularcellcolor%
26 }
27
28 \AtBeginDocument{\LWR@formatted{columncolor}}
29 \NewDocumentCommand{\LWR@HTML@rowcolor}{O{named} m o o}{%
30 \convertcolorspec{#1}{#2}{HTML}\LWR@rowHTMLcolor%
31 \LWR@getmynexttoken%
32 }
33
34 \AtBeginDocument{\LWR@expandableformatted{rowcolor}}
35 \NewDocumentCommand{\LWR@HTML@cellcolor}{O{named} m o o}{%
36 \convertcolorspec{#1}{#2}{HTML}\LWR@cellHTMLcolor%
37 \LWR@addtabularcellcolor%
38 }
39
40 \AtBeginDocument{\LWR@formatted{cellcolor}}
41
42 \newcommand{\LWR@HTML@arrayrulecolor}[2][named]{%
43 \convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
44 }
45
46 \AtBeginDocument{\LWR@expandableformatted{arrayrulecolor}}
47
48 \newcommand{\LWR@HTML@arrayrulecolornexttoken}[2][named]{%
49 \convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
50 \LWR@getmynexttoken%
51 }
52
53 \AtBeginDocument{\LWR@expandableformatted{arrayrulecolornexttoken}}
54
55 \newcommand{\LWR@HTML@doublerulesepcolor}[2][named]{}
56
57 \AtBeginDocument{\LWR@expandableformatted{doublerulesepcolor}}
58
59 \newcommand{\LWR@HTML@doublerulesepcolornexttoken}[2][named]{\LWR@getmynexttoken}
60
61 \AtBeginDocument{\LWR@expandableformatted{doublerulesepcolornexttoken}}
62
63 \newcommand*{\LWR@xcolortempcolor}{}
64
65 \VerifyCommand[lwarp][colortbl]{\rowc@l@rs}{A66C3974E0C5BD5C3DDE033367D197A4}
66
67 \def\rowc@l@rs[#1]#2#3#4%
68 {%
69 \global\rownum=1% lwarp
70 \global\@rowcolorstrue%
71 \@ifxempty{#3}%
72 {\def\@oddrowcolor{\@norowcolor}}%
73 {%
74 \convertcolorspec{named}{#3}{HTML}\LWR@xcolortempcolor% lwarp
75 \edef\@oddrowcolor{%
76 \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}% lwarp
77 }%
78 }%
79 \@ifxempty{#4}%
80 {\def\@evenrowcolor{\@norowcolor}}%
81 {%
82 \convertcolorspec{named}{#4}{HTML}\LWR@xcolortempcolor% lwarp
83 \edef\@evenrowcolor{%
84 \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}% lwarp
85 }%
86 }%
87 \if@rowcmd
88 \def\@rowcolors
89 {%
90 \if@rowcolors
91 \relax\ifnum\rownum<#2\@norowcolor\else
92 \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi%
93 \fi%
94 }%
95 \else
96 \def\@rowcolors
97 {%
98 \if@rowcolors
99 \ifnum\rownum<#2%
100 \@norowcolor
101 \else
102 \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi%
103 \fi
104 \fi%
105 }%
106 \fi
107 \ignorespaces%
108 }
109 \def\@norowcolor{%
110 \renewcommand{\LWR@xcolorrowHTMLcolor}{}%
111 }
112
113 \def\@rowc@lors{%
114 \advance\rownum\@ne%
115 \@rowcolors%
116 }
117
118 \begin{warpMathJax}
119
120 \CustomizeMathJax{\require{colortbl}}
121 \CustomizeMathJax{\let\LWRorigcolumncolor\columncolor}
122 \CustomizeMathJax{\renewcommand{\columncolor}[2][named]{%
123 \LWRorigcolumncolor[#1]{#2}%
124 \LWRabsorbtwooptions%
125 }}
126
127 \CustomizeMathJax{\let\LWRorigrowcolor\rowcolor}
128 \CustomizeMathJax{\renewcommand{\rowcolor}[2][named]{%
129 \LWRorigrowcolor[#1]{#2}%
130 \LWRabsorbtwooptions%
131 }}
132
133 \CustomizeMathJax{\let\LWRorigcellcolor\cellcolor}
134 \CustomizeMathJax{\renewcommand{\cellcolor}[2][named]{%
135 \LWRorigcellcolor[#1]{#2}%
136 \LWRabsorbtwooptions%
137 }}
138
139 \end{warpMathJax}
140
141
142 \endinput
143 %%
144 %% End of file `lwarp-colortbl.sty'.