From: Marei Peischl Date: Wed, 27 Nov 2019 12:10:52 +0000 (+0100) Subject: improve FakeTable and tcolorbox options X-Git-Tag: release-3.5.6.1~321 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=de55fb2c9bfd7576c9735ee350b05522a24b5ae0;p=kivitendo-erp.git improve FakeTable and tcolorbox options --- diff --git a/kiviletter.sty b/kiviletter.sty index b17e63b95..7621a32fa 100644 --- a/kiviletter.sty +++ b/kiviletter.sty @@ -126,34 +126,38 @@ align=tl, \seq_new:N \l_kivi_PricingTable_seq \seq_new:N \g_kivi_extraDescription_seq \newcommand{\FakeTable}[1]{ - \kivi_save_LT@boxes: - \box_gset_eq:NN \LT@lastfoot \c_empty_box - \box_gset_eq:NN \LT@foot \c_empty_box - \endPricingTabular + \par + \CalcTabCols \seq_set_split:Nnn \l_kivi_PricingTable_seq {\tabularnewline} {#1} \begingroup \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim} \seq_map_inline:Nn \l_kivi_PricingTable_seq { \seq_gclear:N \g_kivi_extraDescription_seq - \tabular{@{}p{\g_kivi_tab_pos_dim}p{\g_kivi_tab_id_dim}p{\g_kivi_tab_desc_dim}>{\raggedleft\arraybackslash}p{\g_kivi_tab_num_dim}*2{P<{\,\currency}}@{}} + \exp_args:NnV \use:n {\tabular[t]}\g_kivi_Pricing_colspec_tl ##1 \endtabular \seq_if_empty:NTF \g_kivi_extraDescription_seq {\par\nointerlineskip} {\par\nointerlineskip - \begin{tcolorbox}[left~skip=\dim_eval:n {\g_kivi_tab_pos_dim+ \g_kivi_tab_id_dim +4\tabcolsep},right~skip=\dim_eval:n {\g_kivi_tab_num_dim+ 2\g_kivi_tab_price_dim +6\tabcolsep}, breakable, blank] - \seq_use:Nn \g_kivi_extraDescription_seq {\newline} - \end{tcolorbox} + \begin{tcolorbox}[ + empty, + left=\dim_eval:n {\g_kivi_tab_pos_dim+ \g_kivi_tab_id_dim +4\g_kivi_tabcolsep_dim}, + right=\dim_eval:n {\g_kivi_tab_num_dim+ 2\g_kivi_tab_price_dim +6\g_kivi_tabcolsep_dim},top=0pt,bottom=0pt, + boxsep=0pt, + breakable, + lines~before~break=1, + ] + \seq_use:Nn \g_kivi_extraDescription_seq {\\} + \end{tcolorbox} + \nointerlineskip } } \endgroup - \PricingTabular - \kivi_restore_LT@boxes: } \tl_new:N \g_kivi_Pricing_colspec_tl -\tl_gset:Nn \g_kivi_Pricing_colspec_tl {@{}p{\g_kivi_tab_pos_dim}p{\g_kivi_tab_id_dim}p{\g_kivi_tab_desc_dim}>{\raggedleft\arraybackslash}p{\g_kivi_tab_num_dim}*2{P<{\,\currency}}@{}} +\tl_gset:Nn \g_kivi_Pricing_colspec_tl {@{}p{\g_kivi_tab_pos_dim}p{\g_kivi_tab_id_dim}p{\g_kivi_tab_desc_dim}>{\raggedleft\arraybackslash}p{\g_kivi_tab_num_dim}*2{P}@{}} \clist_map_inline:nn {head, foot, firsthead, lastfoot} {%TODO reduce