%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%                          DigitalDesign_app.sty
%
%                             Babak Rahbaran
%                     (rahbaran@ecs.tuwien.ac.at)
% 
%                               14.07.03
%
%              Institut f"ur Technische Informatik (182/2) 
%                          ECS Group
%                     Technische Universit"at Wien 
%                      1040 Treitlstr. 3, 2. Stk.
%                      (www.ecs.tuwien.ac.at)
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% packages
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{fancyheadings}
\usepackage{german}
\usepackage{graphicx}
\usepackage[latin1]{inputenc} %------- Umlaute im Text
\usepackage{listings}
\usepackage{color}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% user-defined commands
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% typeset pin numbers
\newcommand{\pin}[1]{\emph{\textbf{#1}}\ }
\renewcommand{\chaptername}{Aufgabe}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% some size definitions and counter settings
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\oddsidemargin 1cm
\evensidemargin 1cm
\topmargin 0pt
\headsep 50pt
\textheight 21.5cm
\textwidth 14.1cm

\renewcommand{\floatpagefraction}{0.9}
\renewcommand{\textfraction}{0.05}
\renewcommand{\topfraction}{1.0}
\renewcommand{\bottomfraction}{1.0}

\setcounter{totalnumber}{3}
\setcounter{bottomnumber}{3}
\setcounter{topnumber}{3}

\setlength{\unitlength}{1mm}
\setlength{\parindent}{6mm}
\setlength{\parskip}{12pt plus2pt minus2pt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% define variables used on titlepage
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% heading
\def\headline#1{\gdef\@headline{#1}}
% group number
\def\groupnr#1{\gdef\@groupnr{#1}}
% authors
\def\vornamea#1{\gdef\@vornamea{#1}}
\def\nachnamea#1{\gdef\@nachnamea{#1}}
\def\matrikela#1{\gdef\@matrikela{#1}}
\def\emaila#1{\gdef\@emaila{#1}}

\def\vornameb#1{\gdef\@vornameb{#1}}
\def\nachnameb#1{\gdef\@nachnameb{#1}}
\def\matrikelb#1{\gdef\@matrikelb{#1}}
\def\emailb#1{\gdef\@emailb{#1}}

\def\vornamec#1{\gdef\@vornamec{#1}}
\def\nachnamec#1{\gdef\@nachnamec{#1}}
\def\matrikelc#1{\gdef\@matrikelc{#1}}
\def\emailc#1{\gdef\@emailc{#1}}

%\def\vornamed#1{\gdef\@vornamed{#1}}
%\def\nachnamed#1{\gdef\@nachnamed{#1}}
%\def\matrikeld#1{\gdef\@matrikeld{#1}}
%\def\emaild#1{\gdef\@emaild{#1}}

% address of department
\def\address#1{\gdef\@address{#1}}
% LVA-Nr.
\def\lvanr#1{\gdef\@aufgabe{#1}}

\setcounter{footnote}{0} 

% initialize variables
\gdef\@headline{Digital Design LU}            
\gdef\@title{P r o t o k o l l}

\gdef\@groupnr{16}

\gdef\@vornamea{Markus}
\gdef\@nachnamea{Sinnl}
\gdef\@matrikela{0726419}
\gdef\@emaila{markus\_s88@yahoo.de}

\gdef\@vornameb{Bernhard}
\gdef\@nachnameb{Urban}
\gdef\@matrikelb{0725771}
\gdef\@emailb{lewurm@gmx.net}

\gdef\@aufgabe{zu Aufgabe 1}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% titlepage
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\maketitle{
\begin{titlepage}

% enlarge page
\setlength{\topmargin}{0pt}
\setlength{\headheight}{0pt}
\setlength{\headsep}{0pt}
\setlength{\footskip}{0pt}

\let\footnotesize\small \let\footnoterule\relax \setcounter{page}{1}
\null
\vfill
\large
\vskip -4 cm 

\begin{center}
% heading
{\LARGE\bf \@headline \par} \vskip 2cm

\vskip 1cm

% title
{\Huge\bf\underline \@title \par} 
\vskip 1cm
%{\Large \bf \@aufgabe \par}
\vskip 4cm

\begin{flushright}
Gruppe \@groupnr \par
% authors
\@vornamea \  \@nachnamea, Matr. Nr. \@matrikela \par
{\small \@emaila \par}
\@vornameb \  \@nachnameb, Matr. Nr. \@matrikelb \par
{\small \@emailb \par}

%\@authora \par
%\@authorb \par
%\@authorc \par
%\@authord \par
\vskip 1cm
Wien, am~\today{}
\end{flushright}
\end{center} \par
\vskip 1.5cm 

\end{titlepage}

\setcounter{footnote}{0} 
\let\thanks\relax
} % \def\maketitle


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newenvironment{Ventry}[1]%
{\begin{list}{}{\renewcommand{\makelabel}[1]{\textbf{##1:}\hfill}%
\settowidth{\labelwidth}{\textbf{#1:}}%
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}}}%
{\end{list}}

\newcommand{\tablesize}{\fontsize{8}{10}\selectfont}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% layout of non-title pages
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pagenumbering{roman}
\setlength{\parskip}{5pt plus2pt minus2pt}

\setlength{\parskip}{1mm}
\clearpage
\setlength{\parskip}{5pt plus2pt minus2pt}

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}{}}
\addtolength{\headheight}{2pt}

\pagenumbering{arabic}
\setcounter{page} {1}

\lstset{ %
language=VHDL,                % choose the language of the code
basicstyle=\footnotesize,       % the size of the fonts that are used for the code
numbers=left,                   % where to put the line-numbers
numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers
stepnumber=2,                   % the step between two line-numbers. If it's 1 each line will be numbered
numbersep=5pt,                  % how far the line-numbers are from the code
backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}
showspaces=false,               % show spaces adding particular underscores
showstringspaces=false,         % underline spaces within strings
showtabs=false,                 % show tabs within strings adding particular underscores
frame=single,	                % adds a frame around the code
tabsize=2,	                % sets default tabsize to 2 spaces
captionpos=b,                   % sets the caption-position to bottom
breaklines=true,                % sets automatic line breaking
breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
escapeinside={\%*}{*)}          % if you want to add a comment within your code
}
