% ----------------------------------------------------------------------
% Document class
% ----------------------------------------------------------------------

\documentclass[a4paper, 11pt, twoside, openright, footinclude, headinclude]{scrbook}

% ----------------------------------------------------------------------
% Packages
% ----------------------------------------------------------------------

\usepackage{sty/siemens_single}
\usepackage{amsmath}
\usepackage{listing}
\usepackage{array} % for tabular
\usepackage{pifont} % for \myCheck, \myCross
\usepackage[hyphens]{url}
\usepackage[hidelinks]{hyperref} % hyperref without colored links
\usepackage{draftwatermark}
\usepackage{xspace}
\usepackage{pgf}
\usepackage{tikz}

% ----------------------------------------------------------------------
% TikZ
% ----------------------------------------------------------------------

\usetikzlibrary{arrows}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{matrix}
\usetikzlibrary{patterns}
\usetikzlibrary{positioning}

% ----------------------------------------------------------------------
% Document specific macros and settings
% ----------------------------------------------------------------------

\def\lstwidth{0.8\columnwidth}
\def\embb{EMB$^\mathsf{2}$\xspace}
\SetWatermarkColor[gray]{0.95}
\newcommand{\leadingzero}[1]{\ifnum #1<10 0\the#1\else\the#1\fi}
\newcommand{\monthword}[1]{\ifcase#1\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi}

% ----------------------------------------------------------------------
% Dataflow process networks
% ----------------------------------------------------------------------

\newlength{\dpnunit}
\setlength{\dpnunit}{5mm}

\tikzstyle{nodestyle}=[draw, semithick, minimum size=\dpnunit, anchor=center, minimum height=2\dpnunit]
\tikzstyle{edgestyle}=[draw, thick, ->, >=stealth']

\tikzstyle{function}=[rectangle, nodestyle, inner sep=2pt, minimum width=2\dpnunit, minimum height=1.5\dpnunit]
\tikzstyle{invisible}=[anchor=center]
\tikzstyle{selector}=[trapezium, nodestyle, trapezium angle=-70, trapezium stretches=true, minimum width=2\dpnunit, minimum height=\dpnunit]
\tikzstyle{switch}=[trapezium, nodestyle, trapezium angle=70, trapezium stretches=true, minimum width=2\dpnunit, minimum height=\dpnunit]
\tikzstyle{junction}=[circle, draw, fill, inner sep=0pt, minimum size=1mm, anchor=center]

\newcommand{\dpninv}[1]{\node [invisible, inner sep=2pt, minimum size=0pt] (#1) {};}
\newcommand{\dpnsrc}[2]{\node [function] (#1) {#2};}
\newcommand{\dpnsnk}[2]{\node [function] (#1) {#2};}
\newcommand{\dpnser}[2]{\node [function] (#1) {#2};}
\newcommand{\dpnpar}[2]{\node [function, double] (#1) {#2};}
\newcommand{\dpnsel}[1]{\node [selector] (#1) {}; \draw (#1.north west) [yshift=-4.5pt] node {\ttrue}; \draw (#1.north east) [yshift=-4.5pt] node {\tfalse};}
\newcommand{\dpnswi}[1]{\node [switch] (#1) {}; \draw (#1.south west) [yshift=4.5pt] node {\ttrue}; \draw (#1.south east) [yshift=4.5pt] node {\tfalse};}
\newcommand{\dpnjun}[1]{\node [junction] (#1) {};}

% ----------------------------------------------------------------------
\begin{document}
% ----------------------------------------------------------------------

\input{customize} % To get template specific stuff

% Set title and author
% short title is used on the front cover and on each page header
\renewcommand{\shorttitle}{\embb Introduction and Tutorial}
% short date is printed on each page header, right next to short title
\renewcommand{\shortdate}{\monthword{\month} \the\year}
% copyright date is printed on the back cover
\renewcommand{\copyrightdate}{\leadingzero{\month}.\the\year}
% 1st paramter: a square(!) picture
% 2nd parameter: short tile (one line)
% 3rd parameter: long title (up to two lines)
\gentitlepage{pics/chicago-square.jpg}{\LARGE Siemens Corporate Technology | \monthword{\month} 2015}{\scalebox{0.9}{Embedded Multicore Building Blocks}\\\scalebox{0.9}{Introduction and Tutorial}}

% List the authors and contributors on the second page, right after the cover page
% 1st parameter: contributors (optional)
% 2nd parameter: author(s)
\printAuthors{
 Bernhard Gatzhammer, bernhard.gatzhammer@siemens.com \newline
 Christian Kern, christian.kern@siemens.com \newline
 Tobias Sch\"ule, tobias.schuele@siemens.com \newline
 Marcus Winter, marcus.winter.ext@siemens.com \newline
 \newline
 Siemens AG \newline
 Corporate Technology \newline
 Research \& Technology Center \newline
 CT RTC ITP SES-DE \newline
 Otto-Hahn-Ring 6 \newline
 81739 M\"unchen \newline
 Germany
}

% This is from the template:
% \tableofcontentspic{Contents}{pics/chapter/Fotolia_43587256_X.jpg}{\chapterpicwidth}
% And this is our custom toc
\chapter*{Contents}
\tableofcontents

% ----------------------------------------------------------------------
% Content
% ----------------------------------------------------------------------

% \input{content/preface}
\input{content/introduction}
\input{content/mtapi}
\input{content/algorithms}
\input{content/dataflow}
\input{content/containers}

% ----------------------------------------------------------------------
% References
% ----------------------------------------------------------------------

% the following two macros fix the problem of the incorrect ToC pointer to the bibliography.
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{IEEEtran}
% balance the columns at the last page of the bibliography
\balance
\bibliography{references}

% ----------------------------------------------------------------------
% Back Cover
% ----------------------------------------------------------------------

\backcover

\end{document}
