From 6053124b74560b39d832852a190f83897d227075 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 28 Sep 2021 21:10:00 +0000 Subject: colors for booktabs rules, tex4ht r988 git-svn-id: svn://tug.org/texlive/trunk@60643 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/generic/tex4ht/ChangeLog | 5 ++++ .../source/generic/tex4ht/tex4ht-html4.tex | 22 ++++++++++++----- Master/texmf-dist/tex/generic/tex4ht/html4.4ht | 28 ++++++++++++---------- 3 files changed, 37 insertions(+), 18 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 45b3c47aef8..fb6049c9597 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,8 @@ +2021-09-28 Michal Hoftich + + * tex4ht-html4.tex (html4.4ht): support for change of booktabs rule colors. + https://tex.stackexchange.com/q/615729/2891 + 2021-09-26 Michal Hoftich * tex4ht-html4.tex (html4.4ht): draw table lines in \hline using CSS. diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex index 859ee361c59..e8e952e56b5 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex @@ -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,28 +22256,38 @@ font commands \<<< + +| + \Configure{toprule} {|% \Css{tr\#TBL-\TableNo-\ifnum \HRow=0 - 1- td{border-top:| solid} + 1- {border-top:| solid \#\hline:color;} \else - \HRow- td{border-bottom:| solid} + \HRow- {border-bottom:| solid \#\hline:color;} \fi }} \Configure{bottomrule} {|% \Css{tr\#TBL-\TableNo-\HRow- - td{border-bottom:| solid}}} + {border-bottom:| solid \#\hline:color}}} \Configure{midrule} {|% \Css{tr\#TBL-\TableNo-\HRow- - td{border-bottom:| solid}}} + {border-bottom:| solid \#\hline:color}}} \Configure{cmidrule} {|% - \Css{td\#TBL-\TableNo-\HRow-\HCol{border-bottom:| solid}}% + \Css{td\#TBL-\TableNo-\HRow-\HCol{border-bottom:| solid \#\hline:color}}% \HCode{}} >>> +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. + +\<<< +\def\hline:color{000} +>>> + The cmidrule introduces ruler segments at different rows, instead of all of diff --git a/Master/texmf-dist/tex/generic/tex4ht/html4.4ht b/Master/texmf-dist/tex/generic/tex4ht/html4.4ht index f3210be06e6..2e5c289a2cd 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/html4.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/html4.4ht @@ -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,34 +36598,38 @@ description">}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \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} {\@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{}} \NewConfigure{rule-mag}{1} \Configure{rule-mag}{0.14} -- cgit v1.2.3