1 %% LaTeX2e class for diploma theses
\r
2 %% Based on wissdoc.cls by Roland Bless, 1996-2001
\r
3 %% bless@telematik.informatik.uni-karlsruhe.de
\r
5 %% Adapted by: Timo Rohrberg, 2009
\r
6 %% timo.rohrberg@student.kit.edu
\r
8 %% Additions by: Thorsten Haberecht, IPD - Chair Prof. Böhm, 2010
\r
9 %% thorsten.haberecht@kit.edu
\r
11 %% Minor changes by: Moritz Baum, ITI, 2012
\r
12 %% moritz.baum@kit.edu
\r
15 \NeedsTeXFormat{LaTeX2e} % We do need LaTeX2e
\r
16 \ProvidesClass{thesisclass}
\r
17 \LoadClass[a4paper,11pt,titlepage]{scrbook} % Class based on scrbook
\r
19 \RequirePackage{ngerman} % New german orthography
\r
23 %% -------------------------------
\r
25 %% -------------------------------
\r
27 % Set document encoding to UTF-8.
\r
28 \usepackage[utf8]{inputenc}
\r
29 % \usepackage[latin1]{inputenc} % Input in ISO 8859-1 (Latin1)
\r
30 % Use vector glyphs of Computer Modern font with T1 encoding.
\r
31 \usepackage{lmodern}
\r
32 \usepackage[T1]{fontenc}
\r
33 % Activate micro-typographic improvements.
\r
34 \usepackage[protrusion=true,expansion=true]{microtype}
\r
35 % \usepackage{ae} % Almost european, virtual T1-Font
\r
36 % Activate color definitions.
\r
37 \usepackage[pdftex]{xcolor}
\r
38 % Make including other pdfs available.
\r
39 \usepackage[pdftex]{graphicx}
\r
40 % Additional math symbols.
\r
41 \usepackage{amssymb,amsmath,amsthm}
\r
42 % Smart spacing for macros.
\r
44 % Rotated table head labels.
\r
45 \usepackage{rotating}
\r
46 % Nice table separator lines.
\r
47 \usepackage{booktabs}
\r
49 \usepackage{vmargin} % Adjust margins in a simple way
\r
50 \usepackage{fancyhdr} % Define simple headings
\r
51 \usepackage{subfigure}
\r
53 \usepackage[absolute,overlay]{textpos}
\r
55 \usepackage[english,ngerman]{babel}
\r
56 \usepackage[ruled, vlined, linesnumbered]{algorithm2e}
\r
57 \usepackage[raiselinks=true,
\r
59 bookmarksopenlevel=1,
\r
61 bookmarksnumbered=true,
\r
65 pdfborder={0 0 0.5},
\r
67 linkbordercolor={0 0.61 0.50},
\r
68 citebordercolor={0 0.61 0.50}]{hyperref} %{0.57 0.74 0.57}
\r
70 \usepackage[fixlanguage]{babelbib} % sets german style for literature entries
\r
71 \selectbiblanguage{ngerman} % for \bibliographystyle{babalpha}
\r
72 %% --- End of Packages ---
\r
76 %% -------------------------------
\r
78 %% -------------------------------
\r
79 \DeclareGraphicsExtensions{.svg}
\r
80 %% --- End of Declarations ---
\r
84 %% -------------------------------
\r
86 %% -------------------------------
\r
87 \newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
\r
88 \newcommand{\chapterheadfont}{}
\r
89 \newcommand{\blankpage}{
\r
90 \clearpage{\pagestyle{empty}\cleardoublepage}
\r
92 %% --- End of New Commands ---
\r
96 %% -------------------------------
\r
97 %% | Globale Settings |
\r
98 %% -------------------------------
\r
99 \setcounter{secnumdepth}{3} % Numbering also for \subsubsections
\r
100 \setcounter{tocdepth}{3} % Register \subsubsections in content directory
\r
103 \setmarginsrb{3cm}{1cm}{3cm}{1cm}{6mm}{7mm}{5mm}{15mm}
\r
105 \parindent 0cm % Do not indent beginning of paragraph
\r
106 \parskip1.5ex plus0.5ex minus0.5ex % Margin between paragraphs
\r
107 %% --- End of global Settings ---
\r
111 %% -------------------------------
\r
113 %% -------------------------------
\r
115 \renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
\r
117 \fancyhead[RO]{\headfont\nouppercase{\rightmark}} % Header for left page (odd)
\r
118 \fancyhead[LE]{\headfont\nouppercase{\leftmark}} % Header for right page (even)
\r
119 \fancyfoot[C]{\thepage}
\r
120 \renewcommand{\headrulewidth}{0.5pt}
\r
121 \renewcommand{\footrulewidth}{0pt}
\r
122 \fancypagestyle{plain}{%
\r
123 \fancyhf{} % No Header and Footer fields
\r
124 \renewcommand{\headrulewidth}{0pt}
\r
125 \renewcommand{\footrulewidth}{0pt}
\r
126 \fancyfoot[C]{\thepage}
\r
128 %% --- End of Headings ---
\r
132 %% -------------------------------
\r
133 %% | Style of captions |
\r
134 %% -------------------------------
\r
135 \renewcommand{\chaptername}{}
\r
137 \renewcommand{\section}{%
\r
138 \@startsection{section}%
\r
139 {1} % Structure level
\r
141 {2ex plus 1ex minus 1ex} % Pre-Margin
\r
142 {0.5ex plus 0.5ex minus 0.5ex} % Post-Margin
\r
143 {\chapterheadfont\Large\bfseries} % Style
\r
145 \renewcommand{\subsection}{%
\r
146 \@startsection{subsection}%
\r
147 {2} % Structure level
\r
149 {1.5ex plus 1ex minus 0.5ex} % Pre-Margin
\r
150 {0.3ex plus 0.3ex minus 0.3ex} % Post-Margin
\r
151 {\chapterheadfont\large\bfseries} % Style
\r
153 \renewcommand{\subsubsection}{%
\r
154 \@startsection{subsubsection}%
\r
155 {3} % Structure level
\r
157 {1.5ex plus 1ex minus 0.5ex} % Pre-Margin
\r
158 {0.2ex plus 0.2ex minus 0.2ex} % Post-Margin
\r
159 {\chapterheadfont\normalsize\bfseries} % Style
\r
161 \renewcommand{\paragraph}{%
\r
162 \@startsection{paragraph}%
\r
163 {4} % Structure level
\r
165 {1.3ex plus 1ex minus 0.3ex} % Pre-Margin
\r
166 {0.2ex plus 0.2ex minus 0.2ex} % Post-Margin
\r
167 {\chapterheadfont\normalsize\bfseries} % Style
\r
169 \renewcommand{\subparagraph}{\@startsection
\r
170 {subparagraph}% % the name
\r
172 {0 pt}% % the indent
\r
173 {5pt}% % the beforeskip
\r
174 {-7pt}% % the afterskip
\r
175 {\chapterheadfont\normalsize\bfseries}% % the style
\r
177 %% --- End of captions style ---
\r
181 %% ---------------------------------
\r
182 %% | Style of chapter captions |
\r
183 %% ---------------------------------
\r
184 \newlength{\chapnolen}
\r
185 \newlength{\chapparlen}
\r
186 \newsavebox{\chapno}
\r
187 \renewcommand{\@makechapterhead}[1]{
\r
188 \vspace*{0.2\textheight}
\r
190 {\parindent \z@ \raggedright \normalfont
\r
191 \ifnum \c@secnumdepth >\m@ne
\r
193 \savebox{\chapno}{\chapterheadfont\huge\bfseries \thechapter.}
\r
194 \settowidth{\chapnolen}{\usebox{\chapno}}
\r
195 \parbox[t]{\chapnolen}{\usebox{\chapno}}\nobreak\leavevmode
\r
198 \interlinepenalty\@MM
\r
199 \setlength{\chapparlen}{\textwidth}
\r
200 \addtolength{\chapparlen}{-1.0\chapnolen}
\r
201 \addtolength{\chapparlen}{-2ex}
\r
202 \leavevmode\nobreak
\r
203 \parbox[t]{\chapparlen}{\raggedright\chapterheadfont\huge \bfseries #1\par\nobreak}
\r
207 \renewcommand{\@makeschapterhead}[1]{
\r
209 {\parindent \z@ \raggedright
\r
211 \interlinepenalty\@M
\r
212 \chapterheadfont \huge \bfseries #1\par\nobreak
\r
216 %% --- End of chapter captions style ---
\r
220 %% ---------------------------------
\r
221 %% | Style of content directory |
\r
222 %% ---------------------------------
\r
223 \let\oldtableofcontents\tableofcontents
\r
224 \renewcommand{\tableofcontents}{{\pdfbookmark{\contentsname}{\contentsname}\chapterheadfont\oldtableofcontents}}
\r
225 \let\@olddottedtocline\@dottedtocline
\r
226 \renewcommand{\@dottedtocline}[5]{\@olddottedtocline{#1}{#2}{#3}{#4}{\chapterheadfont #5}}
\r
227 %% --- End of content directory style ---
\r
230 %% ----------------------------------
\r
231 %% | Style of appendix numbering |
\r
232 %% ----------------------------------
\r
233 \renewcommand\appendix{\par
\r
234 \setcounter{section}{0}%
\r
235 \setcounter{subsection}{0}%
\r
236 \setcounter{figure}{0}%
\r
237 \renewcommand\thesection{\Alph{section}}%
\r
238 \renewcommand\thefigure{\Alph{section}.\arabic{figure}}
\r
239 \renewcommand\thetable{\Alph{section}.\arabic{table}}}
\r
240 %% --- End of appenix numbering style ---
\r
243 %% ----------------------------------
\r
244 %% | Some additional options |
\r
245 %% ----------------------------------
\r
246 \setlength{\algomargin}{2em} % Leave space for line numbering
\r
247 \numberwithin{algocf}{chapter} % Algorithms numbered as Chapternumber.Algonumber
\r
248 \clubpenalty = 10000 % Avoid widows and club lines
\r
249 \widowpenalty = 10000
\r
250 \displaywidowpenalty = 10000
\r
251 \setkomafont{descriptionlabel}{\normalfont\bfseries} % Normal Font in description environment
\r
252 \addtokomafont{sectioning}{\normalfont\bfseries} % Normal Font for table of contents
\r
254 %% --- End of additional options ---
\r
257 %% **** END OF CLASS ****
\r