From f0c0698bc7789f9cc2d918d6212d349c9abb6a72 Mon Sep 17 00:00:00 2001 From: Marei Peischl Date: Thu, 21 Nov 2019 14:37:56 +0100 Subject: [PATCH] infobox option --- kiviletter.sty | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/kiviletter.sty b/kiviletter.sty index 645014024..6997095d3 100644 --- a/kiviletter.sty +++ b/kiviletter.sty @@ -1,6 +1,15 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{kiviletter}[2019/10/10 Letter Layouts for Kivitendo] +\newif\if@kivi@infobox +\DeclareOption{reffields}{\@kivi@infoboxfalse} +\DeclareOption{infobox}{\@kivi@infoboxtrue} +\@kivi@infoboxtrue + + +\ProcessOptions\relax + + \RequirePackage{expl3} \RequirePackage{iftex} % Schriftart, Eingabelayout der Tastatur @@ -89,27 +98,25 @@ contents={\usebox\shippingAddressBox} \ExplSyntaxOff - +\if@kivi@infobox \setkomavar{location}{ \begin{flushright} \bfseries \LARGE \usekomavar{title} -% \angebot -% \par -% \medskip -% \large\nr ~<%quonumber%> \end{flushright} \medskip \begin{tabularx}{\linewidth}{@{}l<{:}>{\raggedright\arraybackslash}X@{}} - \datum&\usekomavar{date}\\%%<%transdate%>\\ - \kundennummer&\usekomavar{customer}\\%<%customernumber%>\\ - \ansprechpartner&\usekomavar{fromname}\\%<%employee_name%>\\ - \textTelefon&\usekomavar{fromphone}\\%<%employee_tel%>\\ - \textEmail&\usekomavar{fromemail}\\%<%employee_email%> + \datum&\usekomavar{date}\\ + \kundennummer&\usekomavar{customer}\\ + \ansprechpartner&\usekomavar{fromname}\\ + \ifkomavarempty{fromphone}{\textTelefon&\usekomavar{fromphone}\\} + \ifkomavarempty{fromemail}{\textEmail&\usekomavar{fromemail}\\} \end{tabularx} } +\removereffields +\fi \renewcommand*{\raggedsignature}{\raggedright} -- 2.20.1