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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Mon Sep 30 12:54:58 CEST 2024


Author: michal_h21
Date: 2024-09-30 10:54:58 +0000 (Mon, 30 Sep 2024)
New Revision: 1568

Modified:
   trunk/lit/ChangeLog
   trunk/lit/mktex4ht-cnf.tex
   trunk/lit/tex4ht-4ht.tex
Log:
added support for the \arrayrulecolor command in the document preamble

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2024-09-30 10:33:50 UTC (rev 1567)
+++ trunk/lit/ChangeLog	2024-09-30 10:54:58 UTC (rev 1568)
@@ -1,5 +1,9 @@
 2024-09-30  Michal Hoftich  <michal.h21 at gmail.com>
 
+	* tex4ht-4ht.tex (colortbl-hooks.4ht, colortbl.4ht): added support
+	for the \arrayrulecolor command used in the document preamble.
+	https://puszcza.gnu.org.ua/bugs/?636
+
 	* tex4ht-html4.tex (html4.4ht): don't add extra black rule at the
 	first \hline in table.
 	https://puszcza.gnu.org.ua/bugs/?636

Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex	2024-09-30 10:33:50 UTC (rev 1567)
+++ trunk/lit/mktex4ht-cnf.tex	2024-09-30 10:54:58 UTC (rev 1568)
@@ -227,6 +227,7 @@
 \AddFile{7}{dvipsnam}
 \AddFile{7}{svgnam}
 \AddFile{7}{colortbl}
+\AddFile{7}{colortbl-hooks}
 \AddFile{6}{dvips}
 \AddFile{9}{textures}
 \AddFile{9}{dvipdf}

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2024-09-30 10:33:50 UTC (rev 1567)
+++ trunk/lit/tex4ht-4ht.tex	2024-09-30 10:54:58 UTC (rev 1568)
@@ -29263,6 +29263,21 @@
 \endinput
 >>>        \AddFile{7}{colortbl}
 
+
+\<add to usepackage\><<<
+\Configure{PackageHooks}{colortbl.sty}{colortbl-hooks.4ht}
+>>>
+
+\<colortbl-hooks.4ht\><<<
+% colortbl-hooks.4ht (|version), generated from |jobname.tex
+% Copyright 2024 TeX Users Group
+|<TeX4ht license text|>
+\:AtEndOfPackage{%
+|<colortbl arrayrulecolor|>
+}
+>>> \AddFile{7}{colortbl-hooks}
+
+
 color.sty is obsoleted by xcolor, so we will load the latter package in 
 order to get access to the color space conversion commands.
 
@@ -29404,8 +29419,10 @@
 >>>
 
 Fixes for colored hlines. The \`|\hline:color| can be used in CSS, for instance.
+We need to use early hooks file, because this command can be used in the preamble, 
+and we want to catch the defined color.
 
-\<fix colortbl\><<<
+\<colortbl arrayrulecolor\><<<
 % default hline color is black
 \def\hline:color{000}
 % save rule color in format usable in CSS
@@ -29416,14 +29433,10 @@
 \noalign{\convertcolorspec{#1}{#2}{HTML}\:tmp\global\let\hline:color\:tmp}% we are
 \fi
 }
-\HLet\arrayrulecolor\tmp:arrayrulecolor
->>>
+% \HLet doesn't work in the preamble, so we need to work around it
+\let\o:arrayrulecolor:\arrayrulecolor
+\let\arrayrulecolor\tmp:arrayrulecolor
 
-\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%
@@ -29438,6 +29451,21 @@
   }%
 }
 
+>>>
+
+This version of arrayrulecolor will be used after preamble. 
+It supports pictures.
+
+\<fix colortbl\><<<
+\HRestore\arrayrulecolor
+\HLet\arrayrulecolor\tmp:arrayrulecolor
+>>>
+
+\SubSection{Utilities}
+
+This should enable use of \`|\color| command in array declaration
+
+\<fix colortbl\><<<
 \def\save:color#1 #2//{%
   \convert:colorspec#2 {} {} {} {}
   \convertcolorspec{#1}{\current:color}{HTML}\tmp:col



More information about the tex4ht-commits mailing list.