1 \ProvidesFile{kivitendo.sty}
9 \usepackage[utf8]{inputenc}
10 \usepackage[T1]{fontenc}
13 \usepackage{longtable}
17 \newboolean{defaultbg}\setboolean{defaultbg}{true}
19 \newboolean{reqspeclogo}
20 \newboolean{secondpagelogo}
21 \DeclareOption{nologo}{\setboolean{defaultbg}{false}}
22 \DeclareOption{draftlogo}{\setboolean{defaultbg}{false}\setboolean{draftbg}{true}}
23 \DeclareOption{reqspeclogo}{\setboolean{reqspeclogo}{true}}
24 \DeclareOption{secondpagelogo}{\setboolean{defaultbg}{false}\setboolean{secondpagelogo}{true}}
28 \setlength{\voffset}{-1.5cm}
29 \setlength{\hoffset}{-2.5cm}
30 \setlength{\topmargin}{0cm}
31 \setlength{\headheight}{0.5cm}
32 \setlength{\headsep}{1cm}
33 \setlength{\topskip}{0pt}
34 \setlength{\oddsidemargin}{2cm}
35 \setlength{\textwidth}{16.4cm}
36 \setlength{\textheight}{25cm}
37 \setlength{\footskip}{1cm}
38 \setlength{\parindent}{0pt}
39 \setlength{\tabcolsep}{0.2cm}
41 \setlength{\unitlength}{1cm}
43 \newcommand{\kivitendobgsettings}{%
44 \setlength{\headsep}{2.5cm}
45 \setlength{\textheight}{22.5cm}
46 \setlength{\footskip}{0.9cm}
50 \newcommand{\defaultfont}{\normalfont}
51 \renewcommand{\familydefault}{\sfdefault}
58 \newsavebox{\checkedbox}
59 \savebox{\checkedbox}(0.2,0.4){
60 \put(-0.15,-0.425){$\times$}
61 \put(-0.15,-0.45){$\Box$}
63 \newsavebox{\uncheckedbox}
64 \savebox{\uncheckedbox}(0.2,0.4){
65 \put(-0.15,-0.45){$\Box$}
69 \definecolor{kivitendoorange}{rgb}{1,0.4,0.2}
70 \definecolor{kivitendodarkred}{rgb}{0.49,0,0}
71 \definecolor{kivitendoyellow}{rgb}{1,1,0.4}
72 \definecolor{kivitendobggray}{gray}{0.9}
73 \definecolor{kivitendowhite}{gray}{1}
75 %% Kopf- und Fußzeilen
76 \newcommand{\kivitendofirsthead}{}
77 \newcommand{\kivitendofirstfoot}{}
78 \newcommand{\kivitendosecondhead}{}
79 \newcommand{\kivitendosecondfoot}{\centerline{\defaultfont\small Seite \thepage}}
81 \newcommand{\myhead}{%
82 \ifthenelse{\boolean{defaultbg}}{%
84 \put(-2.025,-28.1){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/hintergrund_seite1.png}}
87 \ifthenelse{\boolean{secondpagelogo}}{%
89 \put(-2.025,-28.1){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/hintergrund_seite2.png}}
92 \ifthenelse{\boolean{draftbg}}{%
94 \put(-2.025,-26.9){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/draft.png}}
97 \ifthenelse{\boolean{reqspeclogo}}{%
99 \put(3,-22){\includegraphics*[width=13cm,keepaspectratio=true]{images/schachfiguren.jpg}}
100 \put(0.275,-4.1){\colorbox{kivitendoorange}{\begin{minipage}[t][4.5cm]{2.5cm}\hspace*{2.5cm}\end{minipage}}}
101 \put(0.275,-8.8){\colorbox{kivitendodarkred}{\begin{minipage}[t][4.5cm]{2.5cm}\hspace*{2.5cm}\end{minipage}}}
102 \put(0.275,-13.5){\colorbox{kivitendoyellow}{\begin{minipage}[t][4.5cm]{2.5cm}\hspace*{2.5cm}\end{minipage}}}
108 \newcommand{\mysecondhead}{%
109 \ifthenelse{\boolean{defaultbg} \or \boolean{secondpagelogo}}{%
111 \put(-2.025,-28.1){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/hintergrund_seite2.png}}
114 \ifthenelse{\boolean{draftbg}}{%
116 \put(-2.025,-26.9){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/draft.png}}
122 \newcommand{\myfoot}{\kivitendofirstfoot}
123 \newcommand{\mysecondfoot}{\kivitendosecondfoot}
125 \renewcommand{\ps@headings}{%
126 \renewcommand{\@oddhead}{\myhead}
127 \renewcommand{\@evenhead}{\@oddhead}%
128 \renewcommand{\@oddfoot}{\myfoot}
129 \renewcommand{\@evenfoot}{\@oddfoot}%
132 \renewcommand{\ps@plain}{%
133 \renewcommand{\@oddhead}{\mysecondhead}
134 \renewcommand{\@evenhead}{\@oddhead}%
135 \renewcommand{\@oddfoot}{\mysecondfoot}
136 \renewcommand{\@evenfoot}{\@oddfoot}%
140 \thispagestyle{headings}
142 % Abschnitte mit Kasten hinterlegt
144 \newcommand{\reqspecsectionstyle}{%
145 \renewcommand{\thesection}{\alph{section}}
147 \def\section{\@ifstar\unnumberedsection\numberedsection}
152 \def\numberedsection{\@ifnextchar[%]
153 \numberedsectionwithtwoarguments\numberedsectionwithoneargument}
154 \def\unnumberedsection{\@ifnextchar[%]
155 \unnumberedsectionwithtwoarguments\unnumberedsectionwithoneargument}
156 \def\numberedsectionwithoneargument#1{\numberedsectionwithtwoarguments[#1]{#1}}
157 \def\unnumberedsectionwithoneargument#1{\unnumberedsectionwithtwoarguments[#1]{#1}}
158 \def\numberedsectionwithtwoarguments[#1]#2{%
162 \refstepcounter{section}%
165 \leavevmode\Large\bfseries\raggedright
167 \put(0,0){\colorbox{kivitendoorange}{\parbox{0.7cm}{\hspace*{0.7cm}\\\vspace*{0.2cm}}}}
169 \hspace*{0.3cm}\textcolor{white}{\thesection{}.}%
175 \addcontentsline{toc}{section}{\protect\numberline{\thesection{}.}#1}%
177 \def\unnumberedsectionwithtwoarguments[#1]#2{%
183 \leavevmode\Large\bfseries\raggedright
184 \leavevmode\Large\bfseries\raggedright