% AIB title page. Created by Florian Goebe, Informatik 11 - Embedded Software, RWTH Aachen University
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{aibtitle}[2017/07/27 v1.0 for creating the title page of Aachener Informatik-Berichte (Florian Goebe)]

\LoadClass[a4paper]{report}

\RequirePackage{color}
\RequirePackage{wallpaper}
\RequirePackage[absolute]{textpos} % textblocks with fixed positions. "absolute" sets anchorage to page itself.
\RequirePackage[utf8]{inputenc}

 % disable indentation
\parindent0pt

% use millimeters as units for textpos/textblock
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}

% aib commands
\newcommand{\aibYear}[1]{\newcommand{\printAibYear}{#1}}
\newcommand{\aibNumber}[1]{\newcommand{\printAibNumber}{#1}}
\newcommand{\aibMonthFullName}[1]{\newcommand{\printAibMonthName}{#1}}

% title page format
\renewcommand{\maketitle}{
	\begin{titlepage}
		% use Helvetica (type1 font, included in latex)
		\fontfamily{phv}
		
		% define background image (blue box, "Dpartment of CS", "Technical Report" and Trillu-like figure)
		\ThisLLCornerWallPaper{1}{background.pdf}
		%	
		% Title
		\begin{textblock}{180}(10,140)
			\begin{minipage}[t][4cm][b]{\columnwidth}
				\flushleft%
				\fontsize{29}{36}\selectfont
				\makeatletter\@title\makeatother
			\end{minipage}
		\end{textblock}
		%
		% Authors
		\begin{textblock}{150}(10,190)
			\begin{minipage}[t][5cm][t]{\columnwidth}
				\flushleft%
				\fontsize{15}{20}\selectfont
				\makeatletter\@author\makeatother
			\end{minipage}
		\end{textblock}
		%
		% Department of CS / Technical Report
		\begin{textblock}{130}(75,255)
			\begin{minipage}[t][][t]{\columnwidth}
				\flushright%
				\fontsize{22pt}{0}\selectfont\color{white}
				Department of Computer Science\\
				\fontsize{15pt}{9mm}\selectfont % 9mm separation to line above
				Technical Report
			\end{minipage}
		\end{textblock}
		%
		% AIB information (bottom)
		\begin{textblock}{180}(5,285)
			\begin{minipage}[b][][t]{\columnwidth}
				\flushleft%
				\fontsize{9pt}{12pt}\selectfont\color{white}
				Aachener Informatik-Berichte (AIB) $|$ ISSN 0935-3232 $|$ AIB-\printAibYear-\printAibNumber\\
				RWTH Aachen University $|$ Department of Computer Science $|$ \printAibMonthName~\printAibYear
			\end{minipage}
		\end{textblock}
	\end{titlepage}
}
