listings support (praktisch fuer bsp2/3/4)
[dide_16.git] / bsp3 / Protokolle / DigitalDesign_prot.sty
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 %                          DigitalDesign_app.sty
4 %
5 %                             Babak Rahbaran
6 %                     (rahbaran@ecs.tuwien.ac.at)
7
8 %                               14.07.03
9 %
10 %              Institut f"ur Technische Informatik (182/2) 
11 %                          ECS Group
12 %                     Technische Universit"at Wien 
13 %                      1040 Treitlstr. 3, 2. Stk.
14 %                      (www.ecs.tuwien.ac.at)
15
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19 %
20 % packages
21 %
22 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23
24 \usepackage{fancyheadings}
25 \usepackage{german}
26 \usepackage{graphicx}
27 \usepackage[latin1]{inputenc} %------- Umlaute im Text
28 \usepackage{listings}
29 \usepackage{color}
30
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32 %
33 % user-defined commands
34 %
35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36
37 % typeset pin numbers
38 \newcommand{\pin}[1]{\emph{\textbf{#1}}\ }
39 \renewcommand{\chaptername}{Aufgabe}
40
41
42 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43 %
44 % some size definitions and counter settings
45 %
46 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47
48 \oddsidemargin 1cm
49 \evensidemargin 1cm
50 \topmargin 0pt
51 \headsep 50pt
52 \textheight 21.5cm
53 \textwidth 14.1cm
54
55 \renewcommand{\floatpagefraction}{0.9}
56 \renewcommand{\textfraction}{0.05}
57 \renewcommand{\topfraction}{1.0}
58 \renewcommand{\bottomfraction}{1.0}
59
60 \setcounter{totalnumber}{3}
61 \setcounter{bottomnumber}{3}
62 \setcounter{topnumber}{3}
63
64 \setlength{\unitlength}{1mm}
65 \setlength{\parindent}{6mm}
66 \setlength{\parskip}{12pt plus2pt minus2pt}
67
68
69 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70 %
71 % define variables used on titlepage
72 %
73 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74
75 % heading
76 \def\headline#1{\gdef\@headline{#1}}
77 % group number
78 \def\groupnr#1{\gdef\@groupnr{#1}}
79 % authors
80 \def\vornamea#1{\gdef\@vornamea{#1}}
81 \def\nachnamea#1{\gdef\@nachnamea{#1}}
82 \def\matrikela#1{\gdef\@matrikela{#1}}
83 \def\emaila#1{\gdef\@emaila{#1}}
84
85 \def\vornameb#1{\gdef\@vornameb{#1}}
86 \def\nachnameb#1{\gdef\@nachnameb{#1}}
87 \def\matrikelb#1{\gdef\@matrikelb{#1}}
88 \def\emailb#1{\gdef\@emailb{#1}}
89
90 \def\vornamec#1{\gdef\@vornamec{#1}}
91 \def\nachnamec#1{\gdef\@nachnamec{#1}}
92 \def\matrikelc#1{\gdef\@matrikelc{#1}}
93 \def\emailc#1{\gdef\@emailc{#1}}
94
95 %\def\vornamed#1{\gdef\@vornamed{#1}}
96 %\def\nachnamed#1{\gdef\@nachnamed{#1}}
97 %\def\matrikeld#1{\gdef\@matrikeld{#1}}
98 %\def\emaild#1{\gdef\@emaild{#1}}
99
100 % address of department
101 \def\address#1{\gdef\@address{#1}}
102 % LVA-Nr.
103 \def\lvanr#1{\gdef\@aufgabe{#1}}
104
105 \setcounter{footnote}{0} 
106
107 % initialize variables
108 \gdef\@headline{Digital Design LU}            
109 \gdef\@title{P r o t o k o l l}
110
111 \gdef\@groupnr{16}
112
113 \gdef\@vornamea{Markus}
114 \gdef\@nachnamea{Sinnl}
115 \gdef\@matrikela{0726419}
116 \gdef\@emaila{markus\_s88@yahoo.de}
117
118 \gdef\@vornameb{Bernhard}
119 \gdef\@nachnameb{Urban}
120 \gdef\@matrikelb{0725771}
121 \gdef\@emailb{lewurm@gmx.net}
122
123 \gdef\@aufgabe{zu Aufgabe 1}
124
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126 %
127 % titlepage
128 %
129 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
130
131 \def\maketitle{
132 \begin{titlepage}
133
134 % enlarge page
135 \setlength{\topmargin}{0pt}
136 \setlength{\headheight}{0pt}
137 \setlength{\headsep}{0pt}
138 \setlength{\footskip}{0pt}
139
140 \let\footnotesize\small \let\footnoterule\relax \setcounter{page}{1}
141 \null
142 \vfill
143 \large
144 \vskip -4 cm 
145
146 \begin{center}
147 % heading
148 {\LARGE\bf \@headline \par} \vskip 2cm
149
150 \vskip 1cm
151
152 % title
153 {\Huge\bf\underline \@title \par} 
154 \vskip 1cm
155 %{\Large \bf \@aufgabe \par}
156 \vskip 4cm
157
158 \begin{flushright}
159 Gruppe \@groupnr \par
160 % authors
161 \@vornamea \  \@nachnamea, Matr. Nr. \@matrikela \par
162 {\small \@emaila \par}
163 \@vornameb \  \@nachnameb, Matr. Nr. \@matrikelb \par
164 {\small \@emailb \par}
165
166 %\@authora \par
167 %\@authorb \par
168 %\@authorc \par
169 %\@authord \par
170 \vskip 1cm
171 Wien, am~\today{}
172 \end{flushright}
173 \end{center} \par
174 \vskip 1.5cm 
175
176 \end{titlepage}
177
178 \setcounter{footnote}{0} 
179 \let\thanks\relax
180 } % \def\maketitle
181
182
183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
184
185 \newenvironment{Ventry}[1]%
186 {\begin{list}{}{\renewcommand{\makelabel}[1]{\textbf{##1:}\hfill}%
187 \settowidth{\labelwidth}{\textbf{#1:}}%
188 \setlength{\leftmargin}{\labelwidth}%
189 \addtolength{\leftmargin}{\labelsep}}}%
190 {\end{list}}
191
192 \newcommand{\tablesize}{\fontsize{8}{10}\selectfont}
193
194 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195 %
196 % layout of non-title pages
197 %
198 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199
200 \pagenumbering{roman}
201 \setlength{\parskip}{5pt plus2pt minus2pt}
202
203 \setlength{\parskip}{1mm}
204 \clearpage
205 \setlength{\parskip}{5pt plus2pt minus2pt}
206
207 \pagestyle{fancy}
208 \renewcommand{\chaptermark}[1]{\markboth{\thechapter\ #1}{}}
209 \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}{}}
210 \addtolength{\headheight}{2pt}
211
212 \pagenumbering{arabic}
213 \setcounter{page} {1}
214
215 \lstset{ %
216 language=VHDL,                % choose the language of the code
217 basicstyle=\footnotesize,       % the size of the fonts that are used for the code
218 numbers=left,                   % where to put the line-numbers
219 numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers
220 stepnumber=2,                   % the step between two line-numbers. If it's 1 each line will be numbered
221 numbersep=5pt,                  % how far the line-numbers are from the code
222 backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}
223 showspaces=false,               % show spaces adding particular underscores
224 showstringspaces=false,         % underline spaces within strings
225 showtabs=false,                 % show tabs within strings adding particular underscores
226 frame=single,                   % adds a frame around the code
227 tabsize=2,                      % sets default tabsize to 2 spaces
228 captionpos=b,                   % sets the caption-position to bottom
229 breaklines=true,                % sets automatic line breaking
230 breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
231 escapeinside={\%*}{*)}          % if you want to add a comment within your code
232 }