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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Tue Sep 28 23:06:03 CEST 2021


Author: michal_h21
Date: 2021-09-28 21:06:02 +0000 (Tue, 28 Sep 2021)
New Revision: 988

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-html4.tex
Log:
added support for change of colors in booktabs rules

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2021-09-26 20:24:16 UTC (rev 987)
+++ trunk/lit/ChangeLog	2021-09-28 21:06:02 UTC (rev 988)
@@ -1,3 +1,8 @@
+2021-09-28  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-html4.tex (html4.4ht): support for change of booktabs rule colors.
+	https://tex.stackexchange.com/q/615729/2891
+
 2021-09-26  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html4.tex (html4.4ht): draw table lines in \hline using CSS.

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2021-09-26 20:24:16 UTC (rev 987)
+++ trunk/lit/tex4ht-html4.tex	2021-09-28 21:06:02 UTC (rev 988)
@@ -22256,30 +22256,40 @@
 
 
 \<configure html4 booktabs\><<<
+
+|<booktabs default hline color|>
+
 \Configure{toprule}
    {|<booktabs rule mag|>%
     \Css{tr\#TBL-\TableNo-\ifnum \HRow=0 
-          1- td{border-top:|<booktabs rule height|> solid}
+          1- {border-top:|<booktabs rule height|> solid \#\hline:color;}
      \else
-          \HRow- td{border-bottom:|<booktabs rule height|> solid}
+          \HRow- {border-bottom:|<booktabs rule height|> solid \#\hline:color;}
      \fi
    }}
 \Configure{bottomrule}
    {|<booktabs rule mag|>%
     \Css{tr\#TBL-\TableNo-\HRow-
-            td{border-bottom:|<booktabs rule height|> solid}}}
+            {border-bottom:|<booktabs rule height|> solid  \#\hline:color}}}
 \Configure{midrule}
    {|<booktabs rule mag|>%
     \Css{tr\#TBL-\TableNo-\HRow- 
-            td{border-bottom:|<booktabs rule height|> solid}}}
+            {border-bottom:|<booktabs rule height|> solid \#\hline:color}}}
 \Configure{cmidrule}
    {|<booktabs rule mag|>%
-    \Css{td\#TBL-\TableNo-\HRow-\HCol{border-bottom:|<booktabs rule height|> solid}}%
+    \Css{td\#TBL-\TableNo-\HRow-\HCol{border-bottom:|<booktabs rule height|> solid \#\hline:color}}%
     \HCode{<span class="cmidrule"><!-- enable post-processing of cmidrule--></span>}}
 >>>
 
+The \verb|\hline:color| macro is defined by TeX4ht configuration for colortbl.sty. 
+We reuse it to support change of rule colors. It is initialized as black.
 
+\<booktabs default hline color\><<<
+\def\hline:color{000}
+>>>
 
+
+
 The cmidrule introduces ruler segments at different rows, instead of all of
 them in the same row.
 



More information about the tex4ht-commits mailing list.