texlive[60643] Master/texmf-dist: colors for booktabs rules, tex4ht

commits+karl at tug.org commits+karl at tug.org
Tue Sep 28 23:10:00 CEST 2021


Revision: 60643
          http://tug.org/svn/texlive?view=revision&revision=60643
Author:   karl
Date:     2021-09-28 23:10:00 +0200 (Tue, 28 Sep 2021)
Log Message:
-----------
colors for booktabs rules, tex4ht r988

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=988

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2021-09-28 21:03:49 UTC (rev 60642)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2021-09-28 21:10:00 UTC (rev 60643)
@@ -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/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2021-09-28 21:03:49 UTC (rev 60642)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2021-09-28 21:10:00 UTC (rev 60643)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 986 2021-09-26 18:06:30Z michal_h21 $
+% $Id: tex4ht-html4.tex 988 2021-09-28 21:06:02Z michal_h21 $
 % Compile 4 times: latex tex4ht-html4
 % Copy html4.4ht into the work directory before all but the last compilation.
 %
@@ -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.
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2021-09-28 21:03:49 UTC (rev 60642)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2021-09-28 21:10:00 UTC (rev 60643)
@@ -1,4 +1,4 @@
-% html4.4ht (2021-09-26-14:16), generated from tex4ht-html4.tex
+% html4.4ht (2021-09-28-14:09), generated from tex4ht-html4.tex
 % Copyright 2009-2021 TeX Users Group
 % Copyright 1997-2009 Eitan M. Gurari
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2021-09-26-14:16}
+\immediate\write-1{version 2021-09-28-14:09}
 
 \exit:ifnot{8859-6,% 
 CJK,% 
@@ -36598,15 +36598,19 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{booktabs}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    \Configure{toprule}
+    
+\def\hline:color{000}
+
+
+\Configure{toprule}
    {\@thisrulewidth=\csname a:rule-mag\endcsname\@thisrulewidth
 %
     \Css{tr\#TBL-\TableNo-\ifnum \HRow=0
-          1- td{border-top:\expandafter\x:Em \the\@thisrulewidth em
- solid}
+          1- {border-top:\expandafter\x:Em \the\@thisrulewidth em
+ solid \#\hline:color;}
      \else
-          \HRow- td{border-bottom:\expandafter\x:Em \the\@thisrulewidth em
- solid}
+          \HRow- {border-bottom:\expandafter\x:Em \the\@thisrulewidth em
+ solid \#\hline:color;}
      \fi
    }}
 \Configure{bottomrule}
@@ -36613,19 +36617,19 @@
    {\@thisrulewidth=\csname a:rule-mag\endcsname\@thisrulewidth
 %
     \Css{tr\#TBL-\TableNo-\HRow-
-            td{border-bottom:\expandafter\x:Em \the\@thisrulewidth em
- solid}}}
+            {border-bottom:\expandafter\x:Em \the\@thisrulewidth em
+ solid  \#\hline:color}}}
 \Configure{midrule}
    {\@thisrulewidth=\csname a:rule-mag\endcsname\@thisrulewidth
 %
     \Css{tr\#TBL-\TableNo-\HRow-
-            td{border-bottom:\expandafter\x:Em \the\@thisrulewidth em
- solid}}}
+            {border-bottom:\expandafter\x:Em \the\@thisrulewidth em
+ solid \#\hline:color}}}
 \Configure{cmidrule}
    {\@thisrulewidth=\csname a:rule-mag\endcsname\@thisrulewidth
 %
     \Css{td\#TBL-\TableNo-\HRow-\HCol{border-bottom:\expandafter\x:Em \the\@thisrulewidth em
- solid}}%
+ solid \#\hline:color}}%
     \HCode{<span class="cmidrule"><!-- enable post-processing of cmidrule--></span>}}
 \NewConfigure{rule-mag}{1}
 \Configure{rule-mag}{0.14}



More information about the tex-live-commits mailing list.