siemens_core.sty 5.37 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
% Copyright (C) nemadesign GbR
% $Rev: 56 $:     
% $Date: 2014-09-20 13:52:19 +0200 (Sa, 20. Sep 2014) $:    

% This file contains settings and macros which are used in
% all variants for the siemens stylesheets

\usepackage[scaled]{uarial}                               % Font is Arial
\fontfamily{phv}\fontseries{m}\fontshape{n}\selectfont    % Arial for Headings
\setkomafont{sectioning}{\sffamily\bfseries}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[T1]{fontenc}

%\usepackage[ngerman]{babel}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage[pdftex]{rotating,graphicx}
\usepackage{multirow} 
\usepackage{layout}
\usepackage{lipsum}
\usepackage{subfigure} 
\usepackage{multicol,listings}
\usepackage{courier}
\usepackage[automark]{scrpage2}

\usepackage{titlesec}
\usepackage{scrpage2}
\usepackage{chngcntr}
\usepackage[table,usenames,dvipsnames]{xcolor}
\usepackage{booktabs}
\usepackage{color}
\usepackage{longtable}
\usepackage{colortbl}
\usepackage{fp}
\usepackage{eso-pic,picture}
\usepackage[absolute]{textpos}
\usepackage{multicol}
\usepackage{cite}
\usepackage{titletoc}
\usepackage{moresize}
\usepackage{printlen}
\usepackage{setspace}

% Siemens specific packages
\usepackage[plain]{algorithm}
\usepackage{algorithmic}
\usepackage{array} % for tabular
\usepackage{pifont} % for \myCheck, \myCross
\usepackage[hyphens]{url}
\usepackage[hidelinks]{hyperref} % hyperref without colored links
\usepackage{balance} % for balancing the bibliography
\usepackage{ifthen}


% set title and date in headline
\newcommand{\shorttitle}{Default short title}
\newcommand{\shortdate}{\today}
\newcommand{\copyrightdate}{\today}

% nobody likes Hurenkinder und Schusterjungen
\hyphenpenalty        = 500
\tolerance            = 800
\widowpenalty         = 300
\clubpenalty          = 300
\displaywidowpenalty  = 10000

% change table background colors
\definecolor{lightgray}{gray}{0.9}
\let\oldtabular\tabular
\let\endoldtabular\endtabular
\renewenvironment{tabular}{\rowcolors{2}{white}{lightgray}\oldtabular}{\endoldtabular}

% thick hline in tables
\newcommand{\thickhline}{%
    \noalign {\ifnum 0=`}\fi \hrule height 1pt
    \futurelet \reserved@a \@xhline
}

% global counters for tables and figures
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\counterwithout{footnote}{chapter}
% left align captions
\usepackage[
singlelinecheck=false % <-- important
]{caption}

% No title for TOC
\renewcommand*{\tocbasic@listhead}[1]{%
  \typeout{Ueberschrift ``#1'' nicht ausgeben}%
}


\pagestyle{scrheadings}

% set headline and footline
\lehead{} 
\lohead{}
\cehead{}
\cohead{} 
\rehead{\shorttitle \;| \shortdate}
\rohead{\shorttitle \;| \shortdate}

\lefoot{Restricted \copyright \; Siemens AG \the\year. All rights reserved.}
\lofoot{Restricted \copyright \; Siemens AG \the\year. All rights reserved.}
\cefoot{}
\cofoot{}
\refoot{\thepage}
\rofoot{\thepage}

%\pagestyle{scrheadings}
\deftripstyle{myemptypage}{}{}{}{\thepage}{}{}
\KOMAoptions{cleardoublepage=myemptypage}

% headings and footings for chapter
\renewcommand{\chapterpagestyle}{scrheadings}

% no gap at beginning of chapter
\renewcommand*{\chapterheadstartvskip}{\vspace*{-\topskip}}

% small gap at the end of chapter
\renewcommand*{\chapterheadendvskip}{\vspace{3.0\baselineskip}}


% color definition
\definecolor{orange}{rgb}{0.92,0.47,0.04} % HEX 235 120 10
\definecolor{grey1}{rgb}{0.53,0.61,0.67}	% HEX 135 155 170
\definecolor{grey2}{rgb}{0.31,0.39,0.45}	% HEX 80 100 115

% font style for listings
\lstset{basicstyle=\footnotesize\ttfamily,breaklines=true}
\lstset{framextopmargin=0pt,frame=single}

% stripped pagewidth for title page
\newcommand{\Pw}{\strip@pt\paperwidth}


% sytle for LOF
\addtocontents{lof}{\protect\vspace{0pt}}
\renewcommand*\l@figure{\mdseries\bprot@dottedtocline{1}{0em}{3.0em}}



% shift everything up
\newcommand{\squeezeup}{\vspace{-5mm}}
\titlespacing*{\chapter}{0pt}{0pt}{40pt}

\addtokomafont{sectioning}{\color{orange}}
\def\thespread{30}
\addtokomafont{chapter}{\fontsize{28pt}{1.0}\linespread{\thespread}\selectfont}
\setkomafont{pagehead}{
\normalfont\sffamily}
\setkomafont{pagefoot}{
\normalfont\sffamily}
\setkomafont{pagenumber}{
\normalfont\sffamily}
\addtokomafont{pagenumber}{\color{grey1}} 
\addtokomafont{pagefoot}{\color{grey1}} 
\addtokomafont{pagehead}{\color{grey1}} 

% Make nicer table and figure captions
\setkomafont{captionlabel}{\sffamily\bfseries}
\setkomafont{caption}{\sffamily}

% same identation for all lines in footnotes
\deffootnote{1em}{1em}{\thefootnotemark\ }

% Set first row for tables to bold text
\newcolumntype{$}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
  #1\ignorespaces
}

% Macros by nemadesign
\setlength{\fboxsep}{0pt}
\setlength\fboxrule{0.1pt}
\newcommand{\moveup}{\vspace{-7mm}}
\newcommand{\movedown}{\vspace{10mm}}
\newcommand{\picgap}{\vspace{8mm}}
\newcommand{\picgapsmall}{\vspace{0mm}}


% Macros by Siemens
\newcommand{\printAuthors}[2][\empty]
{
  \clearpage % this is important
  \begin{minipage}[b][\textheight]{\textwidth}
    \begin{oldtabular}{rp{0.8\columnwidth}}
      \multicolumn{2}{l}{Authors} \\ 
      & #2
    \end{oldtabular}
    \ifthenelse{\equal{#1}{\empty}}
    {\empty}
    {
      \begin{oldtabular}{rp{0.8\columnwidth}}
        \\
        \multicolumn{2}{l}{Contributors} \\ 
        & #1
      \end{oldtabular}
    } \\
  \end{minipage}
  \clearpage % this is important
}