move title to infobox if enabled
authorMarei Peischl <marei@peitex.de>
Thu, 21 Nov 2019 13:49:36 +0000 (14:49 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 3 Feb 2020 11:21:38 +0000 (12:21 +0100)
kiviletter.sty

index 6997095..512beff 100644 (file)
@@ -99,11 +99,12 @@ contents={\usebox\shippingAddressBox}
 \ExplSyntaxOff
 
 \if@kivi@infobox
+\newkomavar{locationtitle}
 \setkomavar{location}{
        \begin{flushright}
                \bfseries
                \LARGE
-               \usekomavar{title}
+               \usekomavar{locationtitle}
        \end{flushright}
 
        \medskip
@@ -116,9 +117,19 @@ contents={\usebox\shippingAddressBox}
        \end{tabularx}
 }
 \removereffields
+
+\ExplSyntaxOn
+\AtBeginLetter{
+       \ifkomavarempty{title}{}{
+               \exp_args:Nno\setkomavar{locationtitle}{\scr@title@var}
+               \setkomavar{title}{}
+       }
+}
+\ExplSyntaxOff
 \fi
 
 
+
 \renewcommand*{\raggedsignature}{\raggedright}
 
 \endinput