diff options
author | Karl Berry <karl@freefriends.org> | 2023-08-31 22:22:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-08-31 22:22:14 +0000 |
commit | ae07d43c5d362ac12dc82d36edec4ddf4a9c6344 (patch) | |
tree | 63802b340707e70d75cb837eed662d7bfb65867b /Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex | |
parent | 4868aaa64ec256810c21024031a5b881f5bb94ad (diff) |
padding for tcolorbox boxes, tex4ht r1363
git-svn-id: svn://tug.org/texlive/trunk@68129 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex')
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex index 0854a7bd117..8e6c52b3b75 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 1360 2023-08-18 12:03:13Z michal_h21 $ +% $Id: tex4ht-html4.tex 1363 2023-08-31 15:26:11Z michal_h21 $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -16500,11 +16500,21 @@ Blue = 1-minimum(1,Yellow *(1-Black)+Black) \<configure html4 tcolorbox\><<< +% support macro for correct calculation of padding in Tcolorbox +\def\calc:tcbpadding#1{\strip@pt\dimexpr \kvtcb@boxsep+#1\relax px} + \Configure{tcolorbox} {\ifvmode\IgnorePar\fi\EndP\HCode{<div class="tcolorbox \@currenvir" id="\:tcbcolid">} % \tcbcolid and colors are defined in tcolorbox.4ht \Css{\#\:tcbcolid\space .tcolorbox-title{color: \:tcbcoltitle; background-color: \:tcbcolframe;}} \Css{\#\:tcbcolid\space .tcolorbox-content{color: \:tcbcolupper; background-color: \:tcbcolback; border: 1px solid \:tcbcolframe;}} + % calculate paddings + \Css{\#\:tcbcolid\space div{ + padding-top:\calc:tcbpadding{\kvtcb@top}; + padding-bottom:\calc:tcbpadding{\kvtcb@bottom}; + padding-left:\calc:tcbpadding{\kvtcb@leftupper}; + padding-right:\calc:tcbpadding{\kvtcb@rightupper}; + }} } {\HCode{\Hnewline<div class="tcolorbox-title">}\par} {\ifvmode\IgnorePar\fi\EndP\HCode{</div>\Hnewline<div class="tcolorbox-content">}} |