1 \ProvidesFile{kivitendo.sty}
 
   8 %Compilerunabhängigkeit
 
  10   \usepackage[utf8]{inputenc}
 
  11   \usepackage[T1]{fontenc}
 
  14 \usepackage{longtable}
 
  18 \newboolean{defaultbg}\setboolean{defaultbg}{true}
 
  20 \newboolean{reqspeclogo}
 
  21 \newboolean{secondpagelogo}
 
  22 \DeclareOption{nologo}{\setboolean{defaultbg}{false}}
 
  23 \DeclareOption{draftlogo}{\setboolean{defaultbg}{false}\setboolean{draftbg}{true}}
 
  24 \DeclareOption{reqspeclogo}{\setboolean{reqspeclogo}{true}}
 
  25 \DeclareOption{secondpagelogo}{\setboolean{defaultbg}{false}\setboolean{secondpagelogo}{true}}
 
  29 \setlength{\voffset}{-1.5cm}
 
  30 \setlength{\hoffset}{-2.5cm}
 
  31 \setlength{\topmargin}{0cm}
 
  32 \setlength{\headheight}{0.5cm}
 
  33 \setlength{\headsep}{1cm}
 
  34 \setlength{\topskip}{0pt}
 
  35 \setlength{\oddsidemargin}{2cm}
 
  36 \setlength{\textwidth}{16.4cm}
 
  37 \setlength{\textheight}{25cm}
 
  38 \setlength{\footskip}{1cm}
 
  39 \setlength{\parindent}{0pt}
 
  40 \setlength{\tabcolsep}{0.2cm}
 
  42 \setlength{\unitlength}{1cm}
 
  44 \newcommand{\kivitendobgsettings}{%
 
  45   \setlength{\headsep}{2.5cm}
 
  46   \setlength{\textheight}{22.5cm}
 
  47   \setlength{\footskip}{0.9cm}
 
  50 %% Standardschrift Compilerunabhängig
 
  51 \newcommand*{\defaultfont}{\normalfont}
 
  52 \renewcommand*{\familydefault}{\sfdefault}
 
  59 \newsavebox{\checkedbox}
 
  60 \savebox{\checkedbox}(0.2,0.4){
 
  61   \put(-0.15,-0.425){$\times$}
 
  62   \put(-0.15,-0.45){$\Box$}
 
  64 \newsavebox{\uncheckedbox}
 
  65 \savebox{\uncheckedbox}(0.2,0.4){
 
  66   \put(-0.15,-0.45){$\Box$}
 
  70 \definecolor{kivitendoorange}{rgb}{1,0.4,0.2}
 
  71 \definecolor{kivitendodarkred}{rgb}{0.49,0,0}
 
  72 \definecolor{kivitendoyellow}{rgb}{1,1,0.4}
 
  73 \definecolor{kivitendobggray}{gray}{0.9}
 
  74 \definecolor{kivitendowhite}{gray}{1}
 
  76 %% Kopf- und Fußzeilen
 
  77 \newcommand{\kivitendofirsthead}{}
 
  78 \newcommand{\kivitendofirstfoot}{}
 
  79 \newcommand{\kivitendosecondhead}{}
 
  80 \newcommand{\kivitendosecondfoot}{\centerline{\defaultfont\small Seite \thepage}}
 
  82 \newcommand{\myhead}{%
 
  83   \ifthenelse{\boolean{defaultbg}}{%
 
  85       \put(-2.025,-28.1){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/hintergrund_seite1.png}}
 
  88   \ifthenelse{\boolean{secondpagelogo}}{%
 
  90       \put(-2.025,-28.1){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/hintergrund_seite2.png}}
 
  93   \ifthenelse{\boolean{draftbg}}{%
 
  95       \put(-2.025,-26.9){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/draft.png}}
 
  98   \ifthenelse{\boolean{reqspeclogo}}{%
 
 100       \put(3,-22){\includegraphics*[width=13cm,keepaspectratio=true]{images/schachfiguren.jpg}}
 
 101       \put(0.275,-4.1){\colorbox{kivitendoorange}{\begin{minipage}[t][4.5cm]{2.5cm}\hspace*{2.5cm}\end{minipage}}}
 
 102       \put(0.275,-8.8){\colorbox{kivitendodarkred}{\begin{minipage}[t][4.5cm]{2.5cm}\hspace*{2.5cm}\end{minipage}}}
 
 103       \put(0.275,-13.5){\colorbox{kivitendoyellow}{\begin{minipage}[t][4.5cm]{2.5cm}\hspace*{2.5cm}\end{minipage}}}
 
 109 \newcommand{\mysecondhead}{%
 
 110   \ifthenelse{\boolean{defaultbg} \or \boolean{secondpagelogo}}{%
 
 112       \put(-2.025,-28.1){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/hintergrund_seite2.png}}
 
 115   \ifthenelse{\boolean{draftbg}}{%
 
 117       \put(-2.025,-26.9){\includegraphics*[width=\paperwidth,keepaspectratio=true]{images/draft.png}}
 
 123 \newcommand{\myfoot}{\kivitendofirstfoot}
 
 124 \newcommand{\mysecondfoot}{\kivitendosecondfoot}
 
 126 \renewcommand{\ps@headings}{%
 
 127   \renewcommand{\@oddhead}{\myhead}
 
 128   \renewcommand{\@evenhead}{\@oddhead}%
 
 129   \renewcommand{\@oddfoot}{\myfoot}
 
 130   \renewcommand{\@evenfoot}{\@oddfoot}%
 
 133 \renewcommand{\ps@plain}{%
 
 134   \renewcommand{\@oddhead}{\mysecondhead}
 
 135   \renewcommand{\@evenhead}{\@oddhead}%
 
 136   \renewcommand{\@oddfoot}{\mysecondfoot}
 
 137   \renewcommand{\@evenfoot}{\@oddfoot}%
 
 141 \thispagestyle{headings}
 
 143 % Abschnitte mit Kasten hinterlegt
 
 145 \newcommand{\reqspecsectionstyle}{%
 
 146   \renewcommand{\thesection}{\alph{section}}
 
 148   \def\section{\@ifstar\unnumberedsection\numberedsection}
 
 153 \def\numberedsection{\@ifnextchar[%]
 
 154 \numberedsectionwithtwoarguments\numberedsectionwithoneargument}
 
 155 \def\unnumberedsection{\@ifnextchar[%]
 
 156 \unnumberedsectionwithtwoarguments\unnumberedsectionwithoneargument}
 
 157 \def\numberedsectionwithoneargument#1{\numberedsectionwithtwoarguments[#1]{#1}}
 
 158 \def\unnumberedsectionwithoneargument#1{\unnumberedsectionwithtwoarguments[#1]{#1}}
 
 159 \def\numberedsectionwithtwoarguments[#1]#2{%
 
 163   \refstepcounter{section}%
 
 166   \leavevmode\Large\bfseries\raggedright
 
 168     \put(0,0){\colorbox{kivitendoorange}{\parbox{0.7cm}{\hspace*{0.7cm}\\\vspace*{0.2cm}}}}
 
 170   \hspace*{0.3cm}\textcolor{white}{\thesection{}.}%
 
 176   \addcontentsline{toc}{section}{\protect\numberline{\thesection{}.}#1}%
 
 178 \def\unnumberedsectionwithtwoarguments[#1]#2{%
 
 184   \leavevmode\Large\bfseries\raggedright
 
 185   \leavevmode\Large\bfseries\raggedright