LT@box restoring
authorMarei Peischl <marei@peitex.de>
Thu, 21 Nov 2019 15:43:19 +0000 (16:43 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 3 Feb 2020 11:21:38 +0000 (12:21 +0100)
kiviletter.sty

index 81c3c8b..8f833a5 100644 (file)
@@ -86,7 +86,7 @@ contents={\usebox\shippingAddressBox}
 \seq_new:N \l_kivi_PricingTable_seq
 \seq_new:N \g_kivi_extraDescription_seq
 \newcommand{\FakeTable}[1]{
-%      \tl_set:No \l_tmpa_tl {\BODY}
+       \kivi_save_LT@boxes:
        \endPricingTabular
        \seq_set_split:Nnn \l_kivi_PricingTable_seq {\tabularnewline} {#1}
        \begingroup
@@ -106,6 +106,24 @@ contents={\usebox\shippingAddressBox}
        }
        \endgroup
        \PricingTabular
+       \kivi_restore_LT@boxes:
+}
+
+\clist_map_inline:nn {head, firsthead, foot, lastfoot} {
+       \box_new:c {g_kivi_LT@#1_box}
+}
+
+\cs_new:Nn \kivi_save_LT@boxes: {
+       \clist_map_inline:nn {head, firsthead, foot, lastfoot} {
+       \box_gset_eq:cc {g_kivi_LT@#1_box} {LT@#1}
+       }
+}
+
+\cs_new:Nn \kivi_restore_LT@boxes: {
+       \clist_map_inline:nn {head, firsthead, foot, lastfoot} {
+       \box_gset_eq:cc  {LT@#1} {g_kivi_LT@#1_box}
+       \box_gclear:c {g_kivi_LT@#1_box}
+       }
 }
 
 \newcommand{\ExtraDescription}[1]{\seq_gput_right:Nn \g_kivi_extraDescription_seq {#1}}