some latex experiments.
[hwmod.git] / spec / ProtocolHeader.sty
1 \usepackage{fancyhdr}
2 \usepackage{graphicx}
3 \usepackage{epsfig}
4 \usepackage{color}
5 \usepackage{listings}
6 \usepackage{german}
7 \usepackage[T1]{fontenc}
8 \usepackage[utf8]{inputenc}
9 %\usepackage[latin1]{inputenc}
10 \usepackage{times}
11 \usepackage[plainpages=false, pdfpagelabels]{hyperref} %Klickbare Links im PDF
12 \usepackage{amssymb}
13 \usepackage{amsmath}
14 \usepackage{longtable,colortbl}
15
16 \hypersetup{%
17   colorlinks=true,
18   citecolor=black,
19   linkcolor=black,
20   %bookmarks=true,
21   bookmarksnumbered=true,
22   pdfauthor={Bernhard Lewurm, Fabian Ehrentraud},
23   pdfcreator={},
24   pdfkeywords={Hardware Modelling, Calculator},
25   urlcolor=black,
26   plainpages=false,
27   breaklinks=true,
28   pdftitle={Specification of a Calculator to be implemented in VHDL}
29 }
30
31 \lstset{ %
32         language=vhdl,                  % choose the language of the code
33         extendedchars=true,
34         basicstyle=\footnotesize,       % the size of the fonts that are used for the code
35 %       basicstyle=\scriptsize,         % the size of the fonts that are used for the code
36         numbers=left,                   % where to put the line-numbers
37         numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers
38         stepnumber=1,                   % the step between two line-numbers. If it's 1 each line will be numbered
39         firstnumber=auto,
40         numberfirstline=true,
41         numbersep=5pt,                  % how far the line-numbers are from the code
42         backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}
43         showspaces=false,               % show spaces adding particular underscores
44         showstringspaces=false,         % underline spaces within strings
45         showtabs=false,                 % show tabs within strings adding particular underscores
46 % frame=single,                   % adds a frame around the code
47         frame={tb},
48         tabsize=2,                          % sets default tabsize to 2 spaces
49         caption=\lstname,
50         captionpos=b,                   % sets the caption-position to bottom
51 % captionpos=t,                   % sets the caption-position to top
52         breaklines=true,                % sets automatic line breaking
53         breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
54         escapeinside={\%*}{*)},         % if you want to add a comment within your code
55         prebreak={\space\hbox{\ensuremath\hookleftarrow}}
56 }
57
58 \sloppy
59 \newcommand{\MakeTitleAndTOC}{
60         \begin{titlepage}
61         \setcounter{page}{0}
62   %-------------------------------------------------------------------------
63   % print title page
64   %-------------------------------------------------------------------------
65   \thispagestyle{empty}
66   ~ \\
67   ~ \\
68   \begin{center}
69   \noindent
70   {\LARGE Hardware-Modellierung VL}
71   ~ \\
72   ~ \\
73   {\Huge \bf Spezifikation f\"ur das Design eines Taschenrechners\\in Hardware}
74   \end{center}
75   ~ \\
76   ~ \\
77   % Author
78   \begin{center}
79   \noindent
80   {\large Gruppe: Nr. 20}
81   ~ \\
82   ~ \\
83   {\large Fabian Ehrentraud, MatrNr. 0725639, KNZ: 033 535}\\
84   {\small werteplus@gmail.com} \\
85   ~ \\
86   {\large Bernhard Urban, MatrNr. 0725771, KNZ: 033 535} \\
87   {\small lewurm@gmail.com} \\
88   ~ \\
89   ~ \\
90   ~ \\
91   ~ \\
92   {\large \today}
93   \end{center}
94   
95   \end{titlepage}
96
97   \newpage
98
99   %-------------------------------------------------------------------------
100   % print table of contents
101   %-------------------------------------------------------------------------
102   \tableofcontents
103   \newpage
104
105 }
106
107
108
109 \newcommand{\mc}[1]{ {{\small \texttt{#1}}}}
110 %%footnote hack von http://bushednotes.wordpress.com/2007/03/25/footnotes-tabular-in-latex/
111 \newcounter{myfootertablecounter}
112
113 \newcommand\myfootnotemark{%
114         %\refstepcounter{footnote}%
115                 \addtocounter{footnote}{1}%
116                 \footnotemark[\thefootnote]%
117 }%
118
119 \newcommand\myfootnotetext[1]{%
120         \addtocounter{myfootertablecounter}{1}
121         \footnotetext[\value{myfootertablecounter}]{#1}
122 }
123
124 % from now on, myfootnote has to be used rather than footnote to
125 % adapt the myfootercounter
126 \newcommand\myfootnote[1]{%
127         \addtocounter{myfootertablecounter}{1}
128         \footnote{#1}
129 }%
130
131 \pagestyle{fancy}
132 \setlength{\headheight}{14.5pt}