Revision c659bf51
Von Marei (peiTeX) vor etwa 4 Jahren hinzugefügt
templates/print/marei/kiviletter.sty | ||
---|---|---|
154 | 154 |
\dim_new:N \g_kivi_tabcolsep_dim |
155 | 155 |
\dim_gset:Nn \g_kivi_tabcolsep_dim {.5\tabcolsep} |
156 | 156 |
|
157 |
\prg_new_conditional:Nnn \kivi_if_Price_col:n {T} { |
|
158 |
\prop_get:cnN {l_kivi_col_#1_prop} {colspec} \l_tmpa_tl |
|
159 |
\tl_if_eq:NnTF \l_tmpa_tl {Price} |
|
160 |
{\prg_return_true:} |
|
161 |
{\prg_return_false:} |
|
162 |
} |
|
163 |
|
|
164 |
|
|
157 | 165 |
\cs_new:Nn \__kivi_calc_desc_column: { |
158 | 166 |
\dim_zero:N \l_kivi_tab_desc_leftskip_dim |
159 | 167 |
\dim_zero:N \l_kivi_tab_desc_dim |
160 | 168 |
\bool_set_false:N \l_tmpa_bool |
169 |
\tl_gclear:N \g_kivi_Pricing_colspec_tl |
|
161 | 170 |
\clist_map_inline:Nn \g_kivi_pricingtable_col_clist { |
162 | 171 |
\tl_if_eq:nnTF {##1} {desc} { |
163 | 172 |
\dim_set:Nn \l_kivi_tab_desc_dim { |
164 | 173 |
\textwidth-\l_kivi_tab_desc_leftskip_dim |
165 | 174 |
} |
166 | 175 |
\bool_set_true:N \l_tmpa_bool |
167 |
|
|
176 |
\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {p{\l_kivi_tab_desc_dim}} |
|
168 | 177 |
}{ |
169 |
\bool_if:NTF \l_tmpa_bool {
|
|
170 |
\bool_if:cT {l_kivi_col_##1_bool} {
|
|
178 |
\bool_if:cT {l_kivi_col_##1_bool} {
|
|
179 |
\bool_if:NTF \l_tmpa_bool {
|
|
171 | 180 |
\dim_sub:Nn \l_kivi_tab_desc_dim { |
172 | 181 |
\dim_use:c {l_kivi_tab_##1_dim}+2\g_kivi_tabcolsep_dim |
173 | 182 |
} |
174 |
} |
|
175 |
}{ |
|
176 |
\bool_if:cT {l_kivi_col_##1_bool} { |
|
183 |
}{ |
|
177 | 184 |
\dim_add:Nn \l_kivi_tab_desc_leftskip_dim { |
178 | 185 |
\dim_use:c {l_kivi_tab_##1_dim}+2\g_kivi_tabcolsep_dim |
179 | 186 |
} |
180 | 187 |
} |
188 |
\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {>{\raggedleft\arraybackslash}p{\dim_use:c {l_kivi_tab_##1_dim}}} |
|
189 |
\kivi_if_Price_col:nT {##1} {\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {<{\__kivi_tab_column_currency:}}} |
|
181 | 190 |
} |
182 | 191 |
} |
183 | 192 |
} |
193 |
\tl_gput_left:Nn \g_kivi_Pricing_colspec_tl {@{}} |
|
194 |
\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {@{}} |
|
184 | 195 |
} |
185 | 196 |
|
186 | 197 |
\newcolumntype{P}[1]{>{\raggedleft\arraybackslash}p{#1}<{\__kivi_tab_column_currency:}} |
Auch abrufbar als: Unified diff
marei: expand colspec after calc_desc_col