-
Notifications
You must be signed in to change notification settings - Fork 0
/
ddis-thesis.cls
200 lines (178 loc) · 6.92 KB
/
ddis-thesis.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
%%
%% This is file `ddis_thesis.cls'
%%
%% Many thanks to Beat Fluri ([email protected]) and s.e.a.l.
%% (seal.ifi.uzh.ch) who kindly made this file available to ddis.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%% Change log
%%
%% 20/10/05 initial version Christoph Kiefer (ck)
%% 13/12/05 chapter headings changed ck
%% 06/06/06 switched to German version ck
%% 18/05/08 fixed lol spacing ck
%% 29/11/12 pictures didn't work anymore, changed to En, used class scrbook Mihaela Verman
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\def\filename{ddis-thesis.cls}
\ProvidesClass{ddis-thesis}
[2006/06/06 v1.0e
ddis LaTeX thesis class]
\LoadClass{scrbook}[1997/04/16]
\RequirePackage{listings}
%% LOAD BABEL
%\RequirePackage[\sprache]{babel}[1997/01/23]
%% TRY TO LOAD CSQUOTES
%%\IfFileExists{csquotes.sty}{%
%% \usepackage[babel, german=swiss]{csquotes}
%% \MakeAutoQuote{�}{�}
%% \MakeInnerQuote{�}
%%}{}
%% HYPERLINKS
\RequirePackage{url}
\newcommand{\urlprefix}{}
\@ifundefined{selectfont}{%
\def\UrlFont{\it}}
{\def\UrlFont{\rmfamily\itshape}
}
\renewcommand\chapter{\if@openright
\clearpage\thispagestyle{empty}\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{empty}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\addtocontents{lol}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
% \def\@makechapterhead#1{%
% \vspace*{50\p@}%
% {\parindent \z@ \raggedright
% \ifnum \c@secnumdepth >\m@ne
% \if@mainmatter
% {\fontfamily{pfr}\fontsize{22}{0}\selectfont\bfseries \@chapapp\space \thechapter}%
% \par\nobreak
% \vskip 20\p@
% \fi
% \fi
% \interlinepenalty\@M
% {\fontfamily{pfr}\fontsize{32}{0}\selectfont\bfseries #1}\par\nobreak
% \vskip 40\p@
% }}
\def\@makechapterhead#1{%
\reset@font
\vspace*{10\p@}%
{\parindent \z@
\begin{flushleft}
% \reset@font \scshape \bfseries \Huge \thechapter \par
\reset@font {\fontfamily{phv}\fontsize{50}{0}\selectfont\bfseries \thechapter} \par
\end{flushleft}
% \hrule
\vskip 20\p@
\begin{flushleft}
% \reset@font \LARGE \strut #1\strut \par
\reset@font {\fontfamily{phv}\fontsize{23}{0}\selectfont\bfseries #1} \strut \par
\end{flushleft}
% \vskip 100\p@
\vskip 30\p@
}}
\def\@schapter#1{\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]%
\else
\@makeschapterhead{#1}%
\@afterheading
\fi}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\interlinepenalty\@M
\vbox{\hrule height0.4pt width\textwidth}
\vskip 10\p@
{\fontfamily{phv}\fontsize{20}{0}\selectfont\bfseries #1}\par\nobreak
\vskip 30\p@
}}
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.8ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\fontfamily{phv}\selectfont\LARGE\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.3ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\fontfamily{phv}\selectfont\Large\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.3ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\fontfamily{phv}\selectfont\large\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\labelitemi{\tiny\raisebox{1.5pt}{$\m@th\bullet$}}
\def\fnum@figure{{\bfseries\fontfamily{phv}\selectfont \figurename\nobreakspace\thefigure}}
\def\fnum@table{{\bfseries\fontfamily{phv}\selectfont \tablename\nobreakspace\thetable}}
% Original name = Contents
\renewcommand{\contentsname}{Table of Contents}
% Original name = Bibliography
\renewcommand\bibname{References}
% new contenttable for lists and tables
%\renewcommand\listoffigures{%
% \newpage
% \section*{\listfigurename}
% \@starttoc{lof}%
%}
%\renewcommand\listoftables{%
% \section*{\listtablename}
% \@starttoc{lot}%
%}
\renewcommand\lstlistoflistings{%
\chapter*{List of \lstlistlistingname}
\@starttoc{lol}%
}
\newenvironment{abstract}{%
\chapter*{Abstract}}
{}
\newenvironment{zusammenfassung}{%
\chapter*{Zusammenfassung}}{}
\newenvironment{acknowledgements}{%
\chapter*{Acknowledgements}}{}
\newenvironment{abbreviations}{%
\chapter*{Abbreviations}}{}
\endinput