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
21 %% -------------------------------
\r
23 %% -------------------------------
\r
25 % Set document encoding to UTF-8.
\r
26 \usepackage[utf8]{inputenc}
\r
27 % \usepackage[latin1]{inputenc} % Input in ISO 8859-1 (Latin1)
\r
28 % Use vector glyphs of Computer Modern font with T1 encoding.
\r
29 \usepackage{lmodern}
\r
30 \usepackage[T1]{fontenc}
\r
31 % Activate micro-typographic improvements.
\r
32 \usepackage[protrusion=true,expansion=true]{microtype}
\r
33 % \usepackage{ae} % Almost european, virtual T1-Font
\r
34 % Activate color definitions.
\r
35 \usepackage[pdftex]{xcolor}
\r
36 % Make including other pdfs available.
\r
37 \usepackage[pdftex]{graphicx}
\r
38 % Additional math symbols.
\r
39 \usepackage{amssymb,amsmath,amsthm}
\r
40 % Smart spacing for macros.
\r
42 % Rotated table head labels.
\r
43 \usepackage{rotating}
\r
44 % Nice table separator lines.
\r
45 \usepackage{booktabs}
\r
47 \usepackage{vmargin} % Adjust margins in a simple way
\r
48 \usepackage{fancyhdr} % Define simple headings
\r
49 \usepackage{subfigure}
\r
51 \usepackage[absolute,overlay]{textpos}
\r
53 \usepackage[english,ngerman]{babel}
\r
54 \usepackage[ruled, vlined, linesnumbered]{algorithm2e}
\r
55 \usepackage[raiselinks=true,
\r
57 bookmarksopenlevel=1,
\r
59 bookmarksnumbered=true,
\r
63 pdfborder={0 0 0.5},
\r
65 linkbordercolor={0 0.61 0.50},
\r
66 citebordercolor={0 0.61 0.50}]{hyperref} %{0.57 0.74 0.57}
\r
68 \usepackage[fixlanguage]{babelbib} % sets german style for literature entries
\r
69 \selectbiblanguage{ngerman} % for \bibliographystyle{babalpha}
\r
70 %% --- End of Packages ---
\r
74 %% -------------------------------
\r
76 %% -------------------------------
\r
77 \DeclareGraphicsExtensions{.svg}
\r
78 %% --- End of Declarations ---
\r
82 %% -------------------------------
\r
84 %% -------------------------------
\r
85 \newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
\r
86 \newcommand{\chapterheadfont}{}
\r
87 \newcommand{\blankpage}{
\r
88 \clearpage{\pagestyle{empty}\cleardoublepage}
\r
90 %% --- End of New Commands ---
\r
94 %% -------------------------------
\r
95 %% | Globale Settings |
\r
96 %% -------------------------------
\r
97 \setcounter{secnumdepth}{3} % Numbering also for \subsubsections
\r
98 \setcounter{tocdepth}{3} % Register \subsubsections in content directory
\r
101 \setmarginsrb{3cm}{1cm}{3cm}{1cm}{6mm}{7mm}{5mm}{15mm}
\r
103 \parindent 0cm % Do not indent beginning of paragraph
\r
104 \parskip1.5ex plus0.5ex minus0.5ex % Margin between paragraphs
\r
105 %% --- End of global Settings ---
\r
109 %% -------------------------------
\r
111 %% -------------------------------
\r
113 \renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
\r
115 \fancyhead[RO]{\headfont\nouppercase{\rightmark}} % Header for left page (odd)
\r
116 \fancyhead[LE]{\headfont\nouppercase{\leftmark}} % Header for right page (even)
\r
117 \fancyfoot[C]{\thepage}
\r
118 \renewcommand{\headrulewidth}{0.5pt}
\r
119 \renewcommand{\footrulewidth}{0pt}
\r
120 \fancypagestyle{plain}{%
\r
121 \fancyhf{} % No Header and Footer fields
\r
122 \renewcommand{\headrulewidth}{0pt}
\r
123 \renewcommand{\footrulewidth}{0pt}
\r
124 \fancyfoot[C]{\thepage}
\r
126 %% --- End of Headings ---
\r
130 %% -------------------------------
\r
131 %% | Style of captions |
\r
132 %% -------------------------------
\r
133 \renewcommand{\chaptername}{}
\r
135 \renewcommand{\section}{%
\r
136 \@startsection{section}%
\r
137 {1} % Structure level
\r
139 {2ex plus 1ex minus 1ex} % Pre-Margin
\r
140 {0.5ex plus 0.5ex minus 0.5ex} % Post-Margin
\r
141 {\chapterheadfont\Large\bfseries} % Style
\r
143 \renewcommand{\subsection}{%
\r
144 \@startsection{subsection}%
\r
145 {2} % Structure level
\r
147 {1.5ex plus 1ex minus 0.5ex} % Pre-Margin
\r
148 {0.3ex plus 0.3ex minus 0.3ex} % Post-Margin
\r
149 {\chapterheadfont\large\bfseries} % Style
\r
151 \renewcommand{\subsubsection}{%
\r
152 \@startsection{subsubsection}%
\r
153 {3} % Structure level
\r
155 {1.5ex plus 1ex minus 0.5ex} % Pre-Margin
\r
156 {0.2ex plus 0.2ex minus 0.2ex} % Post-Margin
\r
157 {\chapterheadfont\normalsize\bfseries} % Style
\r
159 \renewcommand{\paragraph}{%
\r
160 \@startsection{paragraph}%
\r
161 {4} % Structure level
\r
163 {1.3ex plus 1ex minus 0.3ex} % Pre-Margin
\r
164 {0.2ex plus 0.2ex minus 0.2ex} % Post-Margin
\r
165 {\chapterheadfont\normalsize\bfseries} % Style
\r
167 \renewcommand{\subparagraph}{\@startsection
\r
168 {subparagraph}% % the name
\r
170 {0 pt}% % the indent
\r
171 {5pt}% % the beforeskip
\r
172 {-7pt}% % the afterskip
\r
173 {\chapterheadfont\normalsize\bfseries}% % the style
\r
175 %% --- End of captions style ---
\r
179 %% ---------------------------------
\r
180 %% | Style of chapter captions |
\r
181 %% ---------------------------------
\r
182 \newlength{\chapnolen}
\r
183 \newlength{\chapparlen}
\r
184 \newsavebox{\chapno}
\r
185 \renewcommand{\@makechapterhead}[1]{
\r
186 \vspace*{0.2\textheight}
\r
188 {\parindent \z@ \raggedright \normalfont
\r
189 \ifnum \c@secnumdepth >\m@ne
\r
191 \savebox{\chapno}{\chapterheadfont\huge\bfseries \thechapter.}
\r
192 \settowidth{\chapnolen}{\usebox{\chapno}}
\r
193 \parbox[t]{\chapnolen}{\usebox{\chapno}}\nobreak\leavevmode
\r
196 \interlinepenalty\@MM
\r
197 \setlength{\chapparlen}{\textwidth}
\r
198 \addtolength{\chapparlen}{-1.0\chapnolen}
\r
199 \addtolength{\chapparlen}{-2ex}
\r
200 \leavevmode\nobreak
\r
201 \parbox[t]{\chapparlen}{\raggedright\chapterheadfont\huge \bfseries #1\par\nobreak}
\r
205 \renewcommand{\@makeschapterhead}[1]{
\r
207 {\parindent \z@ \raggedright
\r
209 \interlinepenalty\@M
\r
210 \chapterheadfont \huge \bfseries #1\par\nobreak
\r
214 %% --- End of chapter captions style ---
\r
218 %% ---------------------------------
\r
219 %% | Style of content directory |
\r
220 %% ---------------------------------
\r
221 \let\oldtableofcontents\tableofcontents
\r
222 \renewcommand{\tableofcontents}{{\pdfbookmark{\contentsname}{\contentsname}\chapterheadfont\oldtableofcontents}}
\r
223 \let\@olddottedtocline\@dottedtocline
\r
224 \renewcommand{\@dottedtocline}[5]{\@olddottedtocline{#1}{#2}{#3}{#4}{\chapterheadfont #5}}
\r
225 %% --- End of content directory style ---
\r
228 %% ----------------------------------
\r
229 %% | Style of appendix numbering |
\r
230 %% ----------------------------------
\r
231 \renewcommand\appendix{\par
\r
232 \setcounter{section}{0}%
\r
233 \setcounter{subsection}{0}%
\r
234 \setcounter{figure}{0}%
\r
235 \renewcommand\thesection{\Alph{section}}%
\r
236 \renewcommand\thefigure{\Alph{section}.\arabic{figure}}
\r
237 \renewcommand\thetable{\Alph{section}.\arabic{table}}}
\r
238 %% --- End of appenix numbering style ---
\r
241 %% ----------------------------------
\r
242 %% | Some additional options |
\r
243 %% ----------------------------------
\r
244 \setlength{\algomargin}{2em} % Leave space for line numbering
\r
245 \numberwithin{algocf}{chapter} % Algorithms numbered as Chapternumber.Algonumber
\r
246 \clubpenalty = 10000 % Avoid widows and club lines
\r
247 \widowpenalty = 10000
\r
248 \displaywidowpenalty = 10000
\r
249 \setkomafont{descriptionlabel}{\normalfont\bfseries} % Normal Font in description environment
\r
250 \addtokomafont{sectioning}{\normalfont\bfseries} % Normal Font for table of contents
\r
252 %% --- End of additional options ---
\r
255 %% **** END OF CLASS ****
\r