Revision ab064135
Von Marei Peischl vor 11 Monaten hinzugefügt
templates/print/marei/kiviletter.sty | ||
---|---|---|
209 | 209 |
} |
210 | 210 |
\prop_if_in:cnTF {l_kivi_col_##1_prop} {colspec} { |
211 | 211 |
\kivi_if_Price_col:nTF {##1} { |
212 |
\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {K}
|
|
212 |
\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {K} |
|
213 | 213 |
}{ |
214 |
\tl_gput_right:Nx \g_kivi_Pricing_colspec_tl {\prop_item:cn {l_kivi_col_##1_prop} {colspec}}
|
|
214 |
\tl_gput_right:Nx \g_kivi_Pricing_colspec_tl {\prop_item:cn {l_kivi_col_##1_prop} {colspec}} |
|
215 | 215 |
} |
216 | 216 |
\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {{\dim_use:c {l_kivi_tab_##1_dim}}} |
217 |
} {
|
|
217 |
} { |
|
218 | 218 |
\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {K{\dim_use:c {l_kivi_tab_##1_dim}}} |
219 |
}
|
|
219 |
} |
|
220 | 220 |
\kivi_if_Price_col:nT {##1} {\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {<{\__kivi_tab_column_currency:}}} |
221 | 221 |
} |
222 | 222 |
} |
... | ... | |
234 | 234 |
\tcbuselibrary{breakable, skins} |
235 | 235 |
|
236 | 236 |
\tcb@new@skin{kivi@LT}{base@unbroken,% |
237 |
frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
|
|
238 |
skin~first=kivi@LT@first,skin~middle=kivi@LT@middle,skin~last=kivi@LT@last,
|
|
239 |
underlay~first~and~middle={
|
|
240 |
\node[anchor=north] at (interior.north) {\csname box_use:c\endcsname {g_kivi_LT@head_box}};
|
|
241 |
\node[anchor=south] at (interior.south) {\csname box_use:c\endcsname {g_kivi_LT@foot_box}};
|
|
237 |
frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,% |
|
238 |
skin~first=kivi@LT@first,skin~middle=kivi@LT@middle,skin~last=kivi@LT@last, |
|
239 |
underlay~first~and~middle={ |
|
240 |
\node[anchor=north] at (interior.north) {\csname box_use:c\endcsname {g_kivi_LT@head_box}}; |
|
241 |
\node[anchor=south] at (interior.south) {\csname box_use:c\endcsname {g_kivi_LT@foot_box}}; |
|
242 | 242 |
}, |
243 |
underlay~unbroken~and~last={
|
|
244 |
\node[anchor=north] at (interior.north) {\csname box_use:c\endcsname {g_kivi_LT@head_box}};
|
|
245 |
\node[anchor=south] at (interior.south) {\csname box_use:c\endcsname {g_kivi_LT@lastfoot_box}};
|
|
246 |
},
|
|
247 |
boxsep=0pt,
|
|
248 |
boxrule=0pt,
|
|
249 |
left=0pt,
|
|
250 |
right=0pt,
|
|
251 |
bottom=\box_ht:N \g_kivi_LT@foot_box+\box_dp:N \g_kivi_LT@foot_box + \aboverulesep,
|
|
252 |
top=\box_ht:N \g_kivi_LT@head_box+\box_dp:N \g_kivi_LT@head_box +\belowrulesep,
|
|
253 |
parbox=false,
|
|
243 |
underlay~unbroken~and~last={ |
|
244 |
\node[anchor=north] at (interior.north) {\csname box_use:c\endcsname {g_kivi_LT@head_box}}; |
|
245 |
\node[anchor=south] at (interior.south) {\csname box_use:c\endcsname {g_kivi_LT@lastfoot_box}}; |
|
246 |
}, |
|
247 |
boxsep=0pt, |
|
248 |
boxrule=0pt, |
|
249 |
left=0pt, |
|
250 |
right=0pt, |
|
251 |
bottom=\box_ht:N \g_kivi_LT@foot_box+\box_dp:N \g_kivi_LT@foot_box + \aboverulesep, |
|
252 |
top=\box_ht:N \g_kivi_LT@head_box+\box_dp:N \g_kivi_LT@head_box +\belowrulesep, |
|
253 |
parbox=false, |
|
254 | 254 |
} |
255 | 255 |
|
256 | 256 |
\tcb@new@skin{kivi@LT@first}{base@first,% |
... | ... | |
322 | 322 |
{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_even_tl}} |
323 | 323 |
} |
324 | 324 |
{ |
325 |
\parbox{\linewidth}{ |
|
325 |
\parbox{\linewidth}{
|
|
326 | 326 |
\seq_set_split:Nnn \l_kivi_columns_seq {&} {##1} |
327 | 327 |
\seq_gclear:N \g_kivi_extraDescription_seq |
328 | 328 |
\exp_args:Nnx \use:n {\tabular[t]}\g_kivi_Pricing_colspec_tl |
... | ... | |
332 | 332 |
&\seq_item:Nn \l_kivi_columns_seq {####1} |
333 | 333 |
} |
334 | 334 |
\endtabular |
335 |
} |
|
336 | 335 |
} |
336 |
} |
|
337 | 337 |
|
338 |
\seq_if_empty:NTF \g_kivi_extraDescription_seq
|
|
339 |
{\par}
|
|
340 |
{\par\nopagebreak
|
|
341 |
\bool_if:NT \g__kivi_Tabular_content_rowcolor_bool {
|
|
342 |
\int_if_odd:nTF {\g__kivi_PricingTable_rowcolor_int}
|
|
343 |
{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_odd_tl}}
|
|
344 |
{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_even_tl}}
|
|
345 |
}
|
|
346 |
{
|
|
347 |
\setlength{\leftskip}{\dim_eval:n {\bool_if:NT \g__kivi_Tabular_rowcolor_bool {-\tabcolsep} +\l_kivi_tab_desc_leftskip_dim}}
|
|
348 |
\setlength{\hsize}{\dim_eval:n {\l_kivi_tab_desc_dim+\leftskip}}
|
|
349 |
\setlength{\linewidth}{\hsize}
|
|
350 |
\addtolength{\leftmargini}{\l_kivi_tab_desc_leftskip_dim}
|
|
351 |
\usekomafont{extraDescription}
|
|
352 |
\seq_use:Nn \g_kivi_extraDescription_seq {\ifhmode\\\fi}
|
|
353 |
\par
|
|
354 |
}
|
|
355 |
}
|
|
338 |
\seq_if_empty:NTF \g_kivi_extraDescription_seq |
|
339 |
{\par} |
|
340 |
{\par\nopagebreak |
|
341 |
\bool_if:NT \g__kivi_Tabular_content_rowcolor_bool { |
|
342 |
\int_if_odd:nTF {\g__kivi_PricingTable_rowcolor_int} |
|
343 |
{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_odd_tl}} |
|
344 |
{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_even_tl}} |
|
345 |
} |
|
346 |
{ |
|
347 |
\setlength{\leftskip}{\dim_eval:n {\bool_if:NT \g__kivi_Tabular_rowcolor_bool {-\tabcolsep} +\l_kivi_tab_desc_leftskip_dim}} |
|
348 |
\setlength{\hsize}{\dim_eval:n {\l_kivi_tab_desc_dim+\leftskip}} |
|
349 |
\setlength{\linewidth}{\hsize} |
|
350 |
\addtolength{\leftmargini}{\l_kivi_tab_desc_leftskip_dim} |
|
351 |
\usekomafont{extraDescription} |
|
352 |
\seq_use:Nn \g_kivi_extraDescription_seq {\ifhmode\\\fi} |
|
353 |
\par |
|
354 |
} |
|
355 |
} |
|
356 | 356 |
\par |
357 | 357 |
\tl_if_empty:NF \l__kivi_Tabular_rowsep_tl {\nointerlineskip\l__kivi_Tabular_rowsep_tl} |
358 | 358 |
} |
... | ... | |
371 | 371 |
|
372 | 372 |
\tl_new:N \g_kivi_Pricing_colspec_tl |
373 | 373 |
\tl_gset:Nn \g_kivi_Pricing_colspec_tl { |
374 |
\bool_if:NF \g__kivi_Tabular_rowcolor_bool {@{}}
|
|
375 |
\bool_if:NT \l_kivi_col_pos_bool {p{\l_kivi_tab_pos_dim}}
|
|
376 |
\bool_if:NT \l_kivi_col_id_bool {p{\l_kivi_tab_id_dim}}
|
|
377 |
p{\l_kivi_tab_desc_dim}
|
|
378 |
\bool_if:NT \l_kivi_col_amount_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_amount_dim}}}
|
|
379 |
\bool_if:NT \l_kivi_col_price_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_price_dim}<{\__kivi_tab_column_currency:}}}
|
|
380 |
\bool_if:NT \l_kivi_col_pricetotal_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_pricetotal_dim}<{\__kivi_tab_column_currency:}}}
|
|
381 |
\bool_if:NF \g__kivi_Tabular_rowcolor_bool {@{}}
|
|
374 |
\bool_if:NF \g__kivi_Tabular_rowcolor_bool {@{}} |
|
375 |
\bool_if:NT \l_kivi_col_pos_bool {p{\l_kivi_tab_pos_dim}} |
|
376 |
\bool_if:NT \l_kivi_col_id_bool {p{\l_kivi_tab_id_dim}} |
|
377 |
p{\l_kivi_tab_desc_dim} |
|
378 |
\bool_if:NT \l_kivi_col_amount_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_amount_dim}}} |
|
379 |
\bool_if:NT \l_kivi_col_price_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_price_dim}<{\__kivi_tab_column_currency:}}} |
|
380 |
\bool_if:NT \l_kivi_col_pricetotal_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_pricetotal_dim}<{\__kivi_tab_column_currency:}}} |
|
381 |
\bool_if:NF \g__kivi_Tabular_rowcolor_bool {@{}} |
|
382 | 382 |
} |
383 | 383 |
|
384 | 384 |
\cs_new_protected:Nn \__kivi_tab_column_currency: {\,\currency} |
... | ... | |
404 | 404 |
} |
405 | 405 |
} |
406 | 406 |
\bool_if:nT {\g__kivi_Tabular_rowcolor_bool && ! \g__kivi_Tabular_content_rowcolor_bool } { |
407 |
\box_gset_dp:Nn \g_kivi_LT@head_box {\box_dp:N \g_kivi_LT@head_box + \l__kivi_fboxsep_dim}
|
|
407 |
\box_gset_dp:Nn \g_kivi_LT@head_box {\box_dp:N \g_kivi_LT@head_box + \l__kivi_fboxsep_dim}
|
|
408 | 408 |
} |
409 | 409 |
\hbox_gset:Nn \g_kivi_LT@foot_box { |
410 | 410 |
\begin{tabular*}{\textwidth}[t]{@{\extracolsep{\fill}}r@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}} |
... | ... | |
417 | 417 |
\hbox_gset:Nn \g_kivi_LT@lastfoot_box { |
418 | 418 |
\raisebox{\dimexpr\depth+\baselineskip}[0pt][0pt]{ |
419 | 419 |
\begin{tabular*}{\textwidth}{@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}\extracolsep{\fill}}r@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}} |
420 |
\bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule |
|
420 |
\bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
|
|
421 | 421 |
\end{tabular*} |
422 | 422 |
} |
423 | 423 |
} |
... | ... | |
426 | 426 |
|
427 | 427 |
%Macht es sinn hier eine Variante zu machen, in der alle Spalten Belegbar sind? |
428 | 428 |
\NewDocumentEnvironment{PricingTotal}{+b}{ |
429 |
\par\nointerlineskip
|
|
429 |
\par\nointerlineskip |
|
430 | 430 |
}{ |
431 |
\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_PricingTotal_tl}}
|
|
432 |
{
|
|
433 |
\tabular[t]{
|
|
434 |
@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}
|
|
435 |
p{\dim_eval:n {\linewidth-\l_kivi_tab_pricetotal_dim-\bool_if:NTF \g__kivi_Tabular_rowcolor_bool {4}{2}\tabcolsep}}P{\l_kivi_tab_pricetotal_dim}@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}
|
|
436 |
}
|
|
437 |
\l__kivi_Tabular_PricingTotal_topsep_tl
|
|
438 |
#1
|
|
439 |
\endtabular
|
|
440 |
}
|
|
431 |
\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_PricingTotal_tl}} |
|
432 |
{ |
|
433 |
\tabular[t]{ |
|
434 |
@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}} |
|
435 |
p{\dim_eval:n {\linewidth-\l_kivi_tab_pricetotal_dim-\bool_if:NTF \g__kivi_Tabular_rowcolor_bool {4}{2}\tabcolsep}}P{\l_kivi_tab_pricetotal_dim}@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}} |
|
436 |
} |
|
437 |
\l__kivi_Tabular_PricingTotal_topsep_tl |
|
438 |
#1 |
|
439 |
\endtabular |
|
440 |
} |
|
441 | 441 |
} |
442 | 442 |
|
443 | 443 |
\tl_new:N \l__kivi_Tabular_PricingTotal_topsep_tl |
... | ... | |
502 | 502 |
|
503 | 503 |
\keys_define:nn {kivi/Tabular} { |
504 | 504 |
color-rows .code:n = { |
505 |
\bool_gset_eq:Nc \g__kivi_Tabular_rowcolor_bool {c_#1_bool}
|
|
506 |
\bool_gset_eq:Nc \g__kivi_Tabular_content_rowcolor_bool {c_#1_bool}
|
|
507 |
},
|
|
505 |
\bool_gset_eq:Nc \g__kivi_Tabular_rowcolor_bool {c_#1_bool}
|
|
506 |
\bool_gset_eq:Nc \g__kivi_Tabular_content_rowcolor_bool {c_#1_bool}
|
|
507 |
},
|
|
508 | 508 |
color-rows .initial:n = false, |
509 | 509 |
color-rows .default:n = true, |
510 | 510 |
color-only-structure .code:n = { |
511 |
\bool_gset_eq:Nc \g__kivi_Tabular_rowcolor_bool {c_#1_bool}
|
|
512 |
\bool_gset_eq:Nc \g__kivi_Tabular_content_rowcolor_bool {c_#1_bool}
|
|
513 |
\bool_gset_inverse:N \g__kivi_Tabular_content_rowcolor_bool
|
|
514 |
},
|
|
511 |
\bool_gset_eq:Nc \g__kivi_Tabular_rowcolor_bool {c_#1_bool}
|
|
512 |
\bool_gset_eq:Nc \g__kivi_Tabular_content_rowcolor_bool {c_#1_bool}
|
|
513 |
\bool_gset_inverse:N \g__kivi_Tabular_content_rowcolor_bool
|
|
514 |
},
|
|
515 | 515 |
color-only-structure .initial:n = false, |
516 | 516 |
color-only-structure .default:n = true, |
517 | 517 |
rowcolor-odd .tl_gset:N = \g__kivi_Tabular_rowcolor_odd_tl, |
... | ... | |
525 | 525 |
rowsep .tl_set:N =\l__kivi_Tabular_rowsep_tl, |
526 | 526 |
rowsep .initial:n = , |
527 | 527 |
hrule .meta:n = { |
528 |
rowsep={ |
|
529 |
\vskip\aboverulesep |
|
530 |
\leavevmode\hrule\@height\lightrulewidth |
|
531 |
\vskip\belowrulesep}}, |
|
528 |
rowsep={
|
|
529 |
\vskip\aboverulesep
|
|
530 |
\leavevmode\hrule\@height\lightrulewidth
|
|
531 |
\vskip\belowrulesep}},
|
|
532 | 532 |
} |
533 | 533 |
|
534 | 534 |
\newcommand*{\SetupSimpleTabular}[1]{\keys_set:nn {kivi/SimpleTabular} {#1}} |
Auch abrufbar als: Unified diff
unify identation