-
Notifications
You must be signed in to change notification settings - Fork 0
/
bsc.cls
110 lines (92 loc) · 2.15 KB
/
bsc.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{bsc}[2015/07/22 Style for my bachelor thesis]
\newif\if@print
\DeclareOption{print}{\@printtrue}
\DeclareOption{digital}{\@printfalse}
\ProcessOptions\relax
% General
\LoadClassWithOptions{scrreprt}
% Language
\usepackage{polyglossia} % Vgl. http://tex.stackexchange.com/questions/135185
\setmainlanguage{english}
\setotherlanguage[spelling=old,babelshorthands=true]{german}
% \usepackage[ngerman,english]{babel} % all languages being used, with main language last in list
% Geometry
\usepackage[onehalfspacing]{setspace}
\usepackage[a4paper,width=150mm,top=30mm,bottom=30mm, bindingoffset=1cm]{geometry}
% Links
\usepackage{color,xcolor}
\usepackage{hyperref}
\if@print % switch link coloring off for printing
\hypersetup{colorlinks=false}
\else
\hypersetup{colorlinks=true}
\fi
\definecolor{uhd}{RGB}{196,19,47} % the red UHD brand color
\hypersetup{
allcolors=uhd
}
\AtBeginDocument{
\hypersetup{ % set pdf metadata
pdfauthor={\@author},
pdftitle={\@title}
}
}
% Fonts
\usepackage{fontspec,xunicode}
\setmainfont{Palatino}
\setsansfont{Optima}
\setmonofont[Scale=MatchLowercase]{Menlo}
% Units
\usepackage[separate-uncertainty]{siunitx}
% Tables
\usepackage{array} % for math mode in tables
\usepackage{booktabs} % for hline rules
% Quotations
\usepackage{epigraph}
\setlength{\epigraphwidth}{.8\textwidth}
\setlength{\epigraphrule}{0pt}
% Page Layout
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\if@print
\fancyhead[LE]{
\textit{\nouppercase{\leftmark}}
}
\fancyhead[RO]{
\textit{\nouppercase{\rightmark}}
}
\fancyfoot[RO,LE]{
\thepage
}
\else
\fancyhead[L]{
\textit{\nouppercase{\leftmark}}
}
\fancyfoot[C]{
\thepage
}
\fi
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}{%
\fancyhf{}
\if@print
\fancyfoot[RO,LE]{
\thepage
}
\else
\fancyfoot[C]{
\thepage
}
\fi
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
% Bibliography
\usepackage[style=numeric-comp,backend=bibtex,maxnames=10,maxcitenames=2,giveninits=true]{biblatex}
%\nocite{*} % print all references, even those not used
% Appendix
\usepackage[toc,page]{appendix}
\endinput