[tex4ht-commits] [SCM] tex4ht updated: r218 - trunk/lit

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Tue Dec 13 16:40:27 CET 2016


Author: michal_h21
Date: 2016-12-13 17:40:27 +0200 (Tue, 13 Dec 2016)
New Revision: 218

Modified:
   trunk/lit/ChangeLog
   trunk/lit/Makefile
   trunk/lit/tex4ht-4ht.tex
Log:
Fixed support for colortbl \columncolor command

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2016-12-11 23:48:31 UTC (rev 217)
+++ trunk/lit/ChangeLog	2016-12-13 15:40:27 UTC (rev 218)
@@ -1,3 +1,8 @@
+2016-12-13  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (colortbl.4ht): Use xcolor.sty commands 
+	to convert color specifications to CSS
+
 2016-12-11  Karl Berry  <karl at freefriends.org>
 
 	* tex4ht-fonts-noncjk.tex ([g]version 2..18): eliminate

Modified: trunk/lit/Makefile
===================================================================
--- trunk/lit/Makefile	2016-12-11 23:48:31 UTC (rev 217)
+++ trunk/lit/Makefile	2016-12-13 15:40:27 UTC (rev 218)
@@ -31,12 +31,13 @@
 
 derived += $(tex4ht_4ht_derived)
 tex4ht_4ht_derived = \
-  algorithmic.4ht biblatex.4ht book.4ht frenchb.4ht \
+  algorithmic.4ht biblatex.4ht book.4ht color.4ht colortbl frenchb.4ht \
+	fontspec.4ht fontspec-xetex.4ht fontspec-4ht.lua fontspec-luatex.4ht \
   geometry.4ht graphicx.4ht hyperref.4ht latex.4ht lettrine.4ht listings.4ht \
   memoir.4ht multicol.4ht multirow.4ht quoting.4ht reading.4ht \
   scrartcl.4ht scrbook.4ht scrreprt.4ht spanish.4ht subscript.4ht \
-  titlesec.4ht tocloft.4ht wrapfig.4ht usepackage.4ht fontspec.4ht \
-	fontspec-xetex.4ht fontspec-4ht.lua fontspec-luatex.4ht
+  titlesec.4ht tocloft.4ht wrapfig.4ht usepackage.4ht xcolor.4ht  
+	
 # xx and many, many more.
 
 derived += $(tex4ht_bibtex2_derived)

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2016-12-11 23:48:31 UTC (rev 217)
+++ trunk/lit/tex4ht-4ht.tex	2016-12-13 15:40:27 UTC (rev 218)
@@ -24875,16 +24875,30 @@
 \endinput
 >>>        \AddFile{7}{colortbl}
 
+color.sty is obsoleted by xcolor, so we will load the latter package in 
+order to get access to the color space conversion commands.
+
 \<fix colortbl\><<<
+\RequirePackage{xcolor}
+>>>
+
+\<fix colortbl\><<<
 \CT at everycr{\o:noalign:{\global\let\CT at row@color\relax}\the\everycr}
 >>>
 
+We use xcolor's \`|\convertcolorspec| command to convert argument of
+\`|\columncolor| to HTML color specification.
+
+
 \<fix colortbl\><<<
 \def\columncolor#1{{\def\current at color{#1}%
                     \csname a:cell-colortbl\endcsname}}
 \Odef\columncolor[#1]#2{{\if :#1:\def\current at color{#2}%
                          \else 
-                            \Configure{tblcol:#1}{#2}%
+                           \gHAdvance\tblcol:N by 1
+                           \convertcolorspec{#1}{#2}{HTML}\tmp:tblcolor
+                           \Configure{HColor}{tblcol-\tblcol:N}{\#\tmp:tblcolor}%
+                           \def\current at color{tblcol-\tblcol:N}%
                          \fi
                     \csname a:cell-colortbl\endcsname}%
    \futurelet\:temp\left:colcol}
@@ -24899,38 +24913,6 @@
 }
 \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 at 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 at 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 at color{tblcol-\tblcol:N}%
-}
 >>>
 
 The followning is a redefinition of a macro from array.sty



More information about the tex4ht-commits mailing list