-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdqseminar.cls
164 lines (132 loc) · 4.07 KB
/
sdqseminar.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
%% LaTeX2e class for seminar theses
%% sdqseminar.cls
%%
%% Karlsruhe Institute of Technology
%% Institute for Program Structures and Data Organization
%% Chair for Software Design and Quality (SDQ)
%%
%% Dr.-Ing. Erik Burger
%%
%% Version 1.0.3, 2020-06-26
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{sdqseminar}[2020/06/26 v1.0.3 Seminar thesis class]
% Language options. German is also needed in English thesis for the abstract
\DeclareOption{ngerman}{\PassOptionsToPackage{\CurrentOption}{babel}}
\DeclareOption{english}{\PassOptionsToPackage{main=\CurrentOption,ngerman}{babel}}
% Optionen an scrartcl durchreichen
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax
% Used to detect language families
\RequirePackage{translations}
%% ---------------------------------------------------------------
%% | Based on KOMAscript by Markus Kohm http://www.komascript.de |
%% ---------------------------------------------------------------
\LoadClass{scrartcl}
%% --------------
%% | Typography |
%% --------------
% T1 font encoding
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
% serif type: Linux Libertine
\RequirePackage{libertine}
% Linux Libertine in math mode
\RequirePackage[libertine]{newtxmath}
% grotesque type: Adobe Source Sans Pro
\RequirePackage[scaled=.92]{sourcesanspro}
% monospace type: Bera Mono
\RequirePackage[scaled=.78]{beramono}
% semi-bold type (for subsections and paragraphs)
\newcommand*{\sbdefault}{sb}
\DeclareRobustCommand{\sbseries}{%
\not@math@alphabet\sbseries\relax
\fontseries\sbdefault\selectfont}
\DeclareTextFontCommand{\textsb}{\sbseries}
\addtokomafont{subsection}{\sbseries}
\addtokomafont{subsubsection}{\sbseries}
\addtokomafont{paragraph}{\sbseries}
% microtype for nicer typography
\RequirePackage[protrusion=true,expansion=true]{microtype}
% commands for code and model keywords in text
\newcommand{\code}[1]{\texttt{\hyphenchar\font45\relax #1}}
\newcommand{\model}[1]{\textsf{#1}}
% nicer spacing for enumerations
\RequirePackage{enumitem}
%% ---------------
%% | Page Layout |
%% ---------------
\KOMAoptions{
fontsize=12pt,
paper=a4,
titlepage=false,
headinclude=true,
footinclude=false,
}
% Margins
\if@twoside%
\typearea[20mm]{15} % twoside
\else%
\typearea[10mm]{15} % oneside
\fi%
\RequirePackage[automark,headsepline,draft=false]{scrlayer-scrpage}
\pagestyle{scrheadings}
\clubpenalty=10000 %prevent orphans
\widowpenalty=10000 %prevent widows
%% --------------
%% | Title page |
%% --------------
%% variables for title page
\newcommand{\theinstitute}{\ifcurrentbaselanguage{English}
{Institute for Program Structures and Data Organization (IPD)}
{Institut für Programmstrukturen und Datenorganisation (IPD)}}
\newcommand{\thethesistype}{}
\newcommand{\theadvisor}{}
%% formatting commands for titlepage
\newcommand{\thesistype}[1]{\subtitle{\vskip2em #1 \ifcurrentbaselanguage{English}{of}{von}}%
\renewcommand{\thethesistype}{#1}}
\newcommand{\myinstitute}[1]{\renewcommand{\theinstitute}{#1}}
\newcommand{\advisor}[1]{\renewcommand{\theadvisor}{#1}}
\newcommand{\settitle}{%
\publishers{%
\normalsize
\theinstitute\\
\ifcurrentbaselanguage{English}{Advisor}{Betreuender Mitarbeiter}: \theadvisor
}
}
%% do not show the date
\date{}
%% ------------
%% | Packages |
%% ------------
% draft mode
\RequirePackage{ifdraft}
\RequirePackage{ifthen}
% enumerate subsubsections
\setcounter{secnumdepth}{3}
% wallpaper for title page (KIT-Frame)
\RequirePackage{wallpaper}
% subimport of files
\RequirePackage{import}
% languages
\RequirePackage{babel,csquotes}
% hyphenation for compound words
\RequirePackage[shortcuts]{extdash}
% nice tables
\RequirePackage{booktabs}
\RequirePackage{longtable}
\RequirePackage{array}
% show graphics in draft mode
\RequirePackage{graphicx}
\setkeys{Gin}{draft=false}
% PDF specific packages
\RequirePackage[hyphens]{url}
\RequirePackage[breaklinks,colorlinks=false]{hyperref}
\newcommand\setpdf{\hypersetup{%
pdftitle={\thethesistype},%
pdfsubject={\@title},%
pdfauthor={\@author},%
pdfborder={0 0 0},%
}%
\let\theauthor\@author
}