From: Marei (peiTeX) Date: Tue, 25 May 2021 17:46:41 +0000 (+0200) Subject: marei: add colorbox variant without horizontal space X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~402^2~10 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1057b87c6a9dd54e1c51b17c55c5e9a66efbed81;p=kivitendo-erp.git marei: add colorbox variant without horizontal space --- diff --git a/templates/print/marei/kiviletter.sty b/templates/print/marei/kiviletter.sty index 8bafa3ea1..8bda8aeb1 100644 --- a/templates/print/marei/kiviletter.sty +++ b/templates/print/marei/kiviletter.sty @@ -249,6 +249,40 @@ contents={\usebox\shippingAddressBox} \seq_new:N \l_kivi_PricingTable_seq \seq_new:N \l_kivi_columns_seq \seq_new:N \g_kivi_extraDescription_seq +\dim_new:N \l__kivi_fboxsep_dim +\dim_set:Nn \l__kivi_fboxsep_dim {\g_kivi_tabcolsep_dim} + +%colorbox variant to only add vertical spacing +%based on colorbox definition from xcolor.sty +%% ---------------------------------------------------------------- +%% Copyright (C) 2003-2016 by Dr. Uwe Kern +%% ---------------------------------------------------------------- +%% This variant of colorbox adds a space of \l__kivi_fboxsep_dim along the vertical axes but no horizontal space +\def\kivi@tabcolorbox#1#{\protect\kivi@tabcolor@box{#1}} + +\def\kivi@tabcolor@box#1#2{ + \tl_if_empty:oTF {#2} + \kivi@nocolor@b@x + \kivi@color@b@x + \relax{\color#1{#2}} +} +\long\def\kivi@color@b@x#1#2#3% +{\leavevmode + \setbox\z@\hbox{{\set@color#3}}% + \dimen@\ht\z@\advance\dimen@\l__kivi_fboxsep_dim\ht\z@\dimen@ + \dimen@\dp\z@\advance\dimen@\l__kivi_fboxsep_dim\dp\z@\dimen@ + {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}} + +\long\def\kivi@nocolor@b@x#1#2#3% +{\leavevmode + \setbox\z@\hbox{#3}% + \dimen@\ht\z@\advance\dimen@\l__kivi_fboxsep_dim\ht\z@\dimen@ + \dimen@\dp\z@\advance\dimen@\l__kivi_fboxsep_dim\dp\z@\dimen@ + {\box\z@}} + +%%% + + \newcommand{\FakeTable}[1]{ \par \seq_set_split:Nnn \l_kivi_PricingTable_seq {\tabularnewline} {#1}