1 |
1 |
\NeedsTeXFormat{LaTeX2e}
|
2 |
|
\ProvidesPackage{kiviletter}[2022/04/23 Letter Layouts for Kivitendo]
|
|
2 |
\ProvidesPackage{kiviletter}[2023/12/08 Letter Layouts for Kivitendo]
|
3 |
3 |
|
4 |
4 |
\RequirePackage{l3keys2e}
|
5 |
5 |
|
... | ... | |
181 |
181 |
|
182 |
182 |
|
183 |
183 |
\cs_new:Nn \__kivi_calc_desc_column: {
|
184 |
|
\bool_if:NTF \g__kivi_Tabular_rowcolor_bool
|
185 |
|
{\dim_set:Nn \l_kivi_tab_desc_leftskip_dim {2\g_kivi_tabcolsep_dim}}
|
186 |
|
{\dim_zero:N \l_kivi_tab_desc_leftskip_dim}
|
|
184 |
\bool_if:NTF \g__kivi_Tabular_rowcolor_bool {
|
|
185 |
\dim_set:Nn \l_kivi_tab_desc_leftskip_dim {2\g_kivi_tabcolsep_dim}
|
|
186 |
}{
|
|
187 |
\dim_zero:N \l_kivi_tab_desc_leftskip_dim
|
|
188 |
}
|
187 |
189 |
\dim_zero:N \l_kivi_tab_desc_dim
|
188 |
190 |
\bool_set_false:N \l_tmpa_bool
|
189 |
191 |
\tl_gclear:N \g_kivi_Pricing_colspec_tl
|
... | ... | |
313 |
315 |
\setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
|
314 |
316 |
\seq_map_inline:Nn \l_kivi_PricingTable_seq {
|
315 |
317 |
\if_mode_horizontal: \par \fi
|
316 |
|
\bool_if:NT \g__kivi_Tabular_rowcolor_bool {
|
|
318 |
\bool_if:NT \g__kivi_Tabular_content_rowcolor_bool {
|
317 |
319 |
\int_gincr:N \g__kivi_PricingTable_rowcolor_int
|
318 |
320 |
\int_if_odd:nTF {\g__kivi_PricingTable_rowcolor_int}
|
319 |
321 |
{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_odd_tl}}
|
... | ... | |
336 |
338 |
\seq_if_empty:NTF \g_kivi_extraDescription_seq
|
337 |
339 |
{\par}
|
338 |
340 |
{\par\nopagebreak
|
339 |
|
\bool_if:NT \g__kivi_Tabular_rowcolor_bool {
|
|
341 |
\bool_if:NT \g__kivi_Tabular_content_rowcolor_bool {
|
340 |
342 |
\int_if_odd:nTF {\g__kivi_PricingTable_rowcolor_int}
|
341 |
343 |
{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_odd_tl}}
|
342 |
344 |
{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_even_tl}}
|
... | ... | |
401 |
403 |
\endtabular
|
402 |
404 |
}
|
403 |
405 |
}
|
|
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}
|
|
408 |
}
|
404 |
409 |
\hbox_gset:Nn \g_kivi_LT@foot_box {
|
405 |
410 |
\begin{tabular*}{\textwidth}[t]{@{\extracolsep{\fill}}r@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}}
|
406 |
|
\bool_if:NTF \g__kivi_Tabular_rowcolor_bool
|
|
411 |
\bool_if:NTF \g__kivi_Tabular_content_rowcolor_bool
|
407 |
412 |
{\hline\noalign{\vskip1pt}}
|
408 |
413 |
\midrule
|
409 |
414 |
\strut\weiteraufnaechsterseite
|
... | ... | |
412 |
417 |
\hbox_gset:Nn \g_kivi_LT@lastfoot_box {
|
413 |
418 |
\raisebox{\dimexpr\depth+\baselineskip}[0pt][0pt]{
|
414 |
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}}}
|
415 |
|
\bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
|
|
420 |
\bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
|
416 |
421 |
\end{tabular*}
|
417 |
422 |
}
|
418 |
423 |
}
|
... | ... | |
423 |
428 |
\NewDocumentEnvironment{PricingTotal}{+b}{
|
424 |
429 |
\par\nointerlineskip
|
425 |
430 |
}{
|
426 |
|
\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_PricingTotal_tl}}
|
|
431 |
\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_PricingTotal_tl}}
|
427 |
432 |
{
|
428 |
433 |
\tabular[t]{
|
429 |
434 |
@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}
|
... | ... | |
479 |
484 |
}
|
480 |
485 |
}
|
481 |
486 |
\\
|
482 |
|
\noalign{\cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_body_currency:}
|
|
487 |
\noalign{\cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_body_currency:}
|
483 |
488 |
\bool_if:NF \g__kivi_Tabular_rowcolor_bool \midrule
|
484 |
489 |
}
|
485 |
490 |
|
... | ... | |
492 |
497 |
headline .initial:n = {\usekomafont{tablehead}\position & \usekomafont{tablehead}\menge & \usekomafont{tablehead}\bezeichnung},
|
493 |
498 |
}
|
494 |
499 |
|
|
500 |
\bool_new:N \g__kivi_Tabular_rowcolor_bool
|
|
501 |
\bool_new:N \g__kivi_Tabular_content_rowcolor_bool
|
|
502 |
|
495 |
503 |
\keys_define:nn {kivi/Tabular} {
|
496 |
|
color-rows .bool_gset:N = \g__kivi_Tabular_rowcolor_bool ,
|
|
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 |
},
|
497 |
508 |
color-rows .initial:n = false,
|
498 |
509 |
color-rows .default:n = true,
|
|
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 |
},
|
|
515 |
color-only-structure .initial:n = false,
|
|
516 |
color-only-structure .default:n = true,
|
499 |
517 |
rowcolor-odd .tl_gset:N = \g__kivi_Tabular_rowcolor_odd_tl,
|
500 |
518 |
rowcolor-odd .initial:n = black!10,
|
501 |
519 |
rowcolor-even .tl_gset:N = \g__kivi_Tabular_rowcolor_even_tl,
|
color-only-structure - option to keep PricingTabular breakable with colored header/footer