[tex4ht-commits] [SCM] tex4ht updated: r223 - trunk/lit
michal_h21 at gnu.org.ua
michal_h21 at gnu.org.ua
Wed Dec 14 16:22:52 CET 2016
Author: michal_h21
Date: 2016-12-14 17:22:52 +0200 (Wed, 14 Dec 2016)
New Revision: 223
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
Log:
Several fixes for color support
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2016-12-14 15:16:50 UTC (rev 222)
+++ trunk/lit/ChangeLog 2016-12-14 15:22:52 UTC (rev 223)
@@ -1,3 +1,10 @@
+2016-12-14 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (colortbl.4ht): Added support for \color
+ command in table column specifivation.
+ * tex4ht-4ht.tex (xcolor.4ht): Added support for colors
+ defined by the user.
+
2016-12-13 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (colortbl.4ht): Use xcolor.sty commands
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2016-12-14 15:16:50 UTC (rev 222)
+++ trunk/lit/tex4ht-4ht.tex 2016-12-14 15:22:52 UTC (rev 223)
@@ -24758,7 +24758,9 @@
>>>
\<config xcolor\><<<
+\def\strip:fin:excl#1!{#1}
\expandafter\def\csname get!HColor\endcsname#1!#2//{%
+ \def\current:color:name{#1\if!#2!\else!\strip:fin:excl#2\fi}%
\expandafter\ifx \csname HColor!#1\endcsname\relax
\let\HColor=\relax
|<xcolor from def|>%
@@ -24780,6 +24782,10 @@
\<xcolor from def\><<<
\expandafter\ifx \csname\string\color @#1\endcsname \relax\else
\expandafter\ifx \csname colortyp:\endcsname\relax \else
+ \extractcolorspec{#1\if!#2!\else!\strip:fin:excl#2\fi}\tmp:color%
+ \expandafter\convertcolorspec\tmp:color{HTML}\tmp:color%
+ \def\HColor{\#\tmp:color}%
+ \Configure{HColor}{\current:color:name}{\HColor}%
\csname colortyp:\expandafter\expandafter\expandafter\endcsname
\csname\string\color @#1\expandafter\endcsname
\space .!//%
@@ -25000,11 +25006,37 @@
\SubSection{Utilities}
+This should enable use of \`|\color| command in array declaration
+
\<fix colortbl\><<<
+\def\convert:colorspec#1 #2 #3 #4{%
+ \edef\current:color{%
+ \ifx\relax#1\relax\else%
+ #1\ifx\relax#2\relax\else%
+ , #2\ifx\relax#3\relax\else%
+ , #3\ifx\relax#4\relax\else%
+ , #4%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}
+
+\def\save:color#1 #2//{%
+ \convert:colorspec#2 {} {} {} {}
+ \convertcolorspec{#1}{\current:color}{HTML}\tmp:col
+ \def\current at color{#2}
+ \Configure{HColor}{\current at color}{\tmp:col}
+}
+
\def\begin:current at color{\let\sv:curcolor|=\current at color}
\def\end:current at color{%
\ifx \current at color\sv:curcolor
- \else \csname a:text-colortbl\endcsname \fi
+ \else%
+ \expandafter\save:color\current at color//%
+ \csname a:text-colortbl\endcsname
+ \fi
}
\NewConfigure{text-colortbl}{1}
\def\GET at column@color{}
More information about the tex4ht-commits
mailing list