-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresentation.cls
198 lines (157 loc) · 5.41 KB
/
presentation.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{presentation}[2015/07/21 v1.0 Presentation]
\LoadClass[
compress,
xcolor=svgnames,
]{beamer}
% Packages =====================================================================
\newcommand*\RequireOptionsPackage[2][]{
\PassOptionsToPackage{#1}{#2}
\RequirePackage{#2}
}
% Input enconding
\RequirePackage{inputenc}
% Output encoding
\RequirePackage{fontenc}
% Latest LaTeX fixes
\RequirePackage{fixltx2e}
% Fix warnings with missing font shapes
\RequirePackage{textcomp}
% Internationalization
\RequirePackage{babel}
% Command helper library
\RequirePackage{xparse}
% Math
\RequirePackage{thesismath}
% Allow arbitrary font sizes
% http://tex.stackexchange.com/questions/58087/how-to-remove-the-warnings-font-shape-ot1-cmss-m-n-in-size-4-not-available
\RequirePackage{lmodern}
% Typographical enhancements
\RequirePackage{microtype}
% Palatino Font
\RequireOptionsPackage[
osf, % old style efigures
sc, % small caps
]{mathpazo}
% Eular Font for math
\RequireOptionsPackage[
euler-digits
]{eulervm}
% Quotations
\RequirePackage[
strict % Turn warnings into errors
]{csquotes}
% Style figure captions
\RequirePackage[bf]{caption}
\captionsetup{
format = plain, % no hanging indent for captions
}
% Enable sub figures
\RequirePackage{subcaption}
% Pseudocode
\RequireOptionsPackage[
noend % Omits end statements in algorithms
]{algpseudocode}
\RequirePackage{algorithm}
% Source Code Listings Listings
\RequirePackage{listings}
% References
\RequireOptionsPackage[
backend = biber, % use biber as backend
style = authoryear-comp,
%style = alphabetic,
maxbibnames = 10, % max number of names in bibliography
maxcitenames = 2, % max number of names in text cite
uniquelist = minyear, % only add more authors if year is not unique
backref = true, % bibliography contains links to cite occurence
backrefstyle = three+,
doi = false, % do not show doi
isbn = false, % do not show isbn
url = false, % do not show url
urldate = long, % format of urldate field
]{biblatex}
% PDF ==========================================================================
\pdfcompresslevel=9
\pdfadjustspacing=1
% Style ========================================================================
% Fonts
\usefonttheme{professionalfonts,serif,structuresmallcapsserif}
\linespread{1.05}
\definecolor{Bright maroon}{RGB}{205, 0, 5}
\usecolortheme[named=Maroon]{structure} % General theme color
\setbeamercolor{alerted text}{fg=Bright maroon} % Color of alerted text
\setbeamercolor{subtitle}{fg=black} % Make subtitle in titlepage-frame black
%\setbeamercolor{section in toc}{fg=black} % Make toc entries black
\hypersetup{ % color for links
colorlinks,
urlcolor = Maroon,
linkcolor = Maroon,
citecolor = Maroon,
}
\definecolor{Pro color}{RGB}{5, 160, 5}
\definecolor{Contra color}{RGB}{160, 5, 5}
% Number sections in toc
\setbeamertemplate{section in toc}[sections numbered]
% Use circles as itemize list items
\setbeamertemplate{itemize items}[circle]
% Disable navigation symbols in the bottom left
\beamertemplatenavigationsymbolsempty
% Add navigation bar on top, and author/title footline on the bottom
\useoutertheme[footline=authortitle, subsection=false]{miniframes}
\setbeamercolor{mini frame}{fg=Maroon!75} % Color of bullets in navigation bar
\addtobeamertemplate{headline}{}{ % Rule under navigation bar
\hspace{0.02\paperwidth}\textcolor{black!75}{\rule{0.96\paperwidth}{0.2pt}}
}
\addtobeamertemplate{footline}{ % Rule above footline
\hspace{0.02\paperwidth}\textcolor{black!75}{\rule{0.96\paperwidth}{0.2pt}}
}{}
% Show section title frame at the start of each section
\AtBeginSection{
\begin{frame}[plain]
\sectionpage
\end{frame}}
% Pseudocode ===================================================================
\renewcommand{\algorithmicrequire}{\textbf{Input:}} % change "Require" to "Input"
\renewcommand{\algorithmicensure}{\textbf{Output:}} % change "Ensure" to "Output'
% Make comments gray
\definecolor{comment}{rgb}{0.4, 0.4, 0.4}
\algrenewcomment[1]{
\hfill\textcolor{comment}{\(\triangleright\) #1}
}
% Add single line comment
% http://tex.stackexchange.com/questions/74880/algorithmicx-package-comments-on-a-single-line
\algnewcommand{\LineComment}[1]{
\State \textcolor{comment}{\(\triangleright\) #1}
}
% Source Code Listings =========================================================
% Make listings look like algorithms
% http://tex.stackexchange.com/questions/73392/how-to-make-lstlisting-look-exactly-like-the-algorithm-environment
\lstset{
numbers = left,
numbersep = 5pt,
xleftmargin = 20pt,
frame = tb,
framexleftmargin = 20pt,
basicstyle = \small\ttfamily,
%keywordstyle = \color{RoyalBlue},
mathescape,
}
\renewcommand*{\thelstnumber}{\arabic{lstnumber}:}
\DeclareCaptionFormat{listing}{\hrule#1#2#3}
\captionsetup[lstlisting]{
format = listing,
labelfont = bf,
singlelinecheck = off,
labelsep = space,
}
% References ===================================================================
% last names before first names
% http://tex.stackexchange.com/questions/113573/biblatex-order-last-first-for-the-names-of-multiple-editors
\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}
\setlength\bibitemsep{0.8em} % vertical space between bibliography entries
\setlength\bibhang{1em} % indent after first line on bibliography entries
% Change bibliography heading to references
\DefineBibliographyStrings{american}{
bibliography = {References},
}