From: Marei (peiTeX) Date: Fri, 25 Sep 2020 12:50:13 +0000 (+0200) Subject: marei: headline/colspec keys for SimpleTabular X-Git-Tag: kivitendo-mebil_0.1-0~9^2~711 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=374086f0b6f7f532290360e646a3ed766b2f3ad9;p=kivitendo-erp.git marei: headline/colspec keys for SimpleTabular --- diff --git a/templates/print/marei/kiviletter.sty b/templates/print/marei/kiviletter.sty index 3cfec44de..76b21b711 100644 --- a/templates/print/marei/kiviletter.sty +++ b/templates/print/marei/kiviletter.sty @@ -386,14 +386,24 @@ contents={\usebox\shippingAddressBox} \RequirePackage{xltabular} +\keys_define:nn {kivi/SimpleTabular} { + colspec .tl_set:N =\l_kivi_SimpleTabular_colspec_tl, + colspec .initial:n = {rrX}, + headline .tl_set:N = \l_kivi_SimpleTabular_headline_tl, + headline .initial:n = {\bfseries\position & \bfseries\menge & \bfseries\bezeichnung}, +} -\newenvironment{SimpleTabular}[1][\bfseries\position & \bfseries\menge & \bfseries\bezeichnung] +\newenvironment{SimpleTabular}[1][] { + \tl_if_in:nnTF {#1} {=} {\keys_set:nn {kivi/SimpleTabular} {#1}} {\tl_if_empty:nF {#1} {\tl_set:Nn \l_kivi_SimpleTabular_headline_tl {#1}}} \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim} - \xltabular{\linewidth}{@{}rrX@{}} + \tl_put_right:Nn \l_kivi_SimpleTabular_colspec_tl {@{}} + \tl_put_left:Nn \l_kivi_SimpleTabular_colspec_tl {@{}} + \exp_args:NnV \xltabular{\linewidth}\l_kivi_SimpleTabular_colspec_tl \toprule - #1\\ - \midrule\\\endhead + \l_kivi_SimpleTabular_headline_tl\\ + \midrule + \endhead \midrule \rlap{\makebox[\textwidth][r]{\weiteraufnaechsterseite}}\\ \endfoot