-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamerthemehsrm.sty
321 lines (286 loc) · 11 KB
/
beamerthemehsrm.sty
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
% Name : beamerthemehsrm.sty
% Author : Benjamin Weiss (benjamin.weiss@kreatiefton.de)
% Version : 0.4
% Created on : 05.05.2013
% Last Edited on : 24.03.2014
% Copyright : Copyright (c) 2013-2014 by Benjamin Weiss. All rights reserved.
% License : This file may be distributed and/or modified under the
% GNU Public License.
% Description : Beamer theme that complies with the corporate design of
% the RheinMain University of Applied Sciences.
% --> http://www.hs-rm.de
\ProvidesPackage{beamerthemehsrm}[2013/05/05]
\usepackage{eso-pic}
\newif\if@doSans
\@doSansfalse
\DeclareOption{noserifmath}{\@doSanstrue}
\newif\if@doNoFlama
\@doNoFlamafalse
\DeclareOption{noflama}{\@doNoFlamatrue}
\newif\if@doSectionPage
\@doSectionPagefalse
\DeclareOption{nosectionpages}{\@doSectionPagetrue}
\ProcessOptions
\mode<presentation>
%---------------------------------------------------------------------
% TOC
%---------------------------------------------------------------------
\useoutertheme[subsection=false,shadow]{miniframes}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
%---------------------------------------------------------------------
% custom commands
%---------------------------------------------------------------------
\newcommand{\rightTextArrow}{→}
\newcommand{\quoted}[1]{›#1‹}
\newcommand{\doublequoted}[1]{»#1«}
%---------------------------------------------------------------------
% Itemize
%---------------------------------------------------------------------
\setbeamertemplate{itemize item}{\rightTextArrow}
\setbeamertemplate{itemize subitem}{\rightTextArrow}
\setbeamertemplate{itemize subsubitem}{\rightTextArrow}
\setlength{\parskip}{0.5em}
%---------------------------------------------------------------------
% Colors
%---------------------------------------------------------------------
% Primary Colors
\definecolor{hsrmRed}{rgb}{0.882352941,0,0.098039216}
\definecolor{hsrmRedDark}{rgb}{0.588235294,0,0.058823529}
\definecolor{hsrmWarmGreyDark}{rgb}{0.274509804,0.254901961,0.235294118}
\definecolor{hsrmWarmGreyLight}{rgb}{0.666666667,0.647058824,0.62745098}
% Secondary Colors
\definecolor{hsrmSec1}{rgb}{0,0.588235294,0.509803922}
\definecolor{hsrmSec1Dark}{rgb}{0,0.392156863,0.31372549}
\definecolor{hsrmSec1Comp}{rgb}{0.294117647,0.745098039,0.882352941}
\definecolor{hsrmSec1CompDark}{rgb}{0.196078431,0.490196078,0.568627451}
\definecolor{hsrmSec2}{rgb}{0.607843137,0.764705882,0.156862745}
\definecolor{hsrmSec2Dark}{rgb}{0.411764706,0.490196078,0.098039216}
\definecolor{hsrmSec2Comp}{rgb}{0.254901961,0.156862745,0.509803922}
\definecolor{hsrmSec2CompDark}{rgb}{0.176470588,0.098039216,0.333333333}
\definecolor{hsrmSec3}{rgb}{0.509803922,0.078431373,0.31372549}
\definecolor{hsrmSec3Dark}{rgb}{0.338345865,0.058823529,0.196078431}
\definecolor{hsrmSec3Comp}{rgb}{1,0.509803922,0}
\definecolor{hsrmSec3CompDark}{rgb}{0.666666667,0.333333333,0}
% General
\setbeamercolor{normal text}{fg=hsrmWarmGreyDark}
\setbeamercolor{structure}{fg=hsrmWarmGreyDark}
\setbeamercolor{alerted text}{fg=hsrmRed}
\setbeamercolor{example text}{fg=white}
\setbeamercolor{copyright text}{fg=hsrmWarmGreyLight}
\setbeamercolor{palette primary}{fg=hsrmWarmGreyDark}
\setbeamercolor{palette secondary}{fg=hsrmWarmGreyDark,bg=hsrmWarmGreyLight}
\setbeamercolor{palette tertiary}{fg=black,bg=hsrmWarmGreyLight}
\setbeamercolor{palette quaternary}{fg=white, bg=hsrmWarmGreyDark}
% Titlepage
\setbeamercolor{title}{parent=normal text}
\setbeamercolor{subtitle}{parent=normal text}
\setbeamercolor{institute}{parent=normal text}
% Content
\setbeamercolor{frametitle}{parent=palette quaternary}
% Blocks
\setbeamercolor{block title}{parent=palette quaternary}
\setbeamercolor{block body}{parent=palette secondary}
\setbeamercolor{block title example}{fg=white, bg=hsrmSec1Dark}
\setbeamercolor{block body example}{fg=white, bg=hsrmSec1}
\setbeamercolor{block title alerted}{fg=white, bg=hsrmRedDark}
\setbeamercolor{block body alerted}{fg=white, bg=hsrmRed}
% Notes
\setbeamercolor{note page}{fg=hsrmWarmGreyDark,bg=hsrmWarmGreyLight}
\setbeamercolor{note title}{fg=white, bg=hsrmWarmGreyDark}
\setbeamercolor{note date}{parent=note title}
% Page Number
\setbeamercolor{page number in head/foot}{fg=hsrmWarmGreyDark}
%---------------------------------------------------------------------
% Fonts
%---------------------------------------------------------------------
% General
% Declare fontfamilys
\if@doNoFlama%
% Sans serif math option
\if@doSans%
% sans serif math %
\usepackage[no-math]{fontspec}%
\setmainfont{NotoSansCJKkr-Regular}%
\else%
% serif math %
\usepackage{fontspec}%
\usefonttheme[onlymath]{serif}%
\fi%
\newfontfamily\Light{NotoSansCJKkr-Light}%
\newfontfamily\Book{NotoSansCJKkr-Regular}%
\newfontfamily\Medium{NotoSansCJKkr-Medium}%
\setsansfont{Arial}%
\else%
% Sans serif math option
\if@doSans%
\usepackage[no-math]{fontspec}%
\setmainfont{NotoSansCJKkr-Regular}%
\else%
\usepackage{fontspec}%
\usefonttheme[onlymath]{serif}%
\fi%
\newfontfamily\Light{NotoSansCJKkr-Light}%
\newfontfamily\Book{NotoSansCJKkr-Regular}%
\newfontfamily\Medium{NotoSansCJKkr-Medium}%
\setsansfont{NotoSansCJKkr-Regular}%
\fi%
\renewcommand\UrlFont{\Medium}
% Titlepage
\setbeamerfont{title}{family=\Light,size=\fontsize{15}{15}}
\setbeamerfont{subtitle}{family=\Light,size=\fontsize{12}{14}}
\setbeamerfont{date}{size=\fontsize{8}{10}}
\setbeamerfont{author}{size=\fontsize{12}{15}}
\setbeamerfont{institute}{size=\fontsize{8}{10}}
% Section
\setbeamerfont{section title}{size=\LARGE}
% Content
\setbeamerfont{frametitle}{family=\Light,size=\large}
\setbeamerfont{copyright text}{family=\Light,size=\tiny}
\setbeamerfont{block title}{family=\Book,size=\large}
\setbeamerfont{block title alerted}{family=\Book,size=\large}
\setbeamerfont{alerted text}{family=\Medium}
% Captions
\setbeamerfont{caption name}{family=\Book}
%---------------------------------------------------------------------
% Titlepage
%---------------------------------------------------------------------
% Titlepage structure
\def\maketitle{\ifbeamer@inframe\titlepage\else\frame[plain]{\titlepage}\fi}
\def\titlepage{\usebeamertemplate{title page}}
\setbeamertemplate{title page}
{
% Add background to title page
\AddToShipoutPictureFG*{\includegraphics[width=\paperwidth]{background.pdf}}
\begin{minipage}[b][\paperheight]{\textwidth}
\vspace*{5mm}
\includegraphics[height=4mm]{./logo}\par
\vspace*{5mm}
\ifx\insertsubtitle\@empty%
\else%
{\usebeamerfont{title}\usebeamercolor[fg]{title}\MakeUppercase{\inserttitle}\par}%
\fi%
\ifx\insertsubtitle\@empty%
\else%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
\vspace*{5mm}
\fi%
\ifx\insertdate\@empty%
\else%
{\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate\par}%
\fi%
\vfill
\ifx\insertauthor\@empty%
\else%
{\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor\par}%
\fi%
\ifx\insertinstitut\@empty%
\else%
\vspace*{3mm}
{\usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute\par}%
\fi%
\vspace*{5mm}
\end{minipage}
}
%---------------------------------------------------------------------
% Sectionpages
%---------------------------------------------------------------------
% Make Sectionhead uppercase
\newcommand{\insertsectionHEAD}{%
\expandafter\insertsectionHEADaux\insertsectionhead}
\newcommand{\insertsectionHEADaux}[3]{\MakeUppercase{#3}
}
\if@doSectionPage\@empty
\else
% Insert frame with section title at every section start
\AtBeginSection[]
{
\begingroup
\setbeamercolor{background canvas}{bg=hsrmWarmGreyDark}
\begin{frame}[plain]
\centering
\vfill\usebeamerfont{section title}\textcolor{white}{\insertsectionHEAD}\vfill
\end{frame}
\endgroup
}
\fi
%---------------------------------------------------------------------
% Frametitle
%---------------------------------------------------------------------
\setbeamertemplate{frametitle}
{
\begin{beamercolorbox}[wd=\paperwidth,leftskip=0.3cm,rightskip=0.3cm,ht=3ex,dp=1.5ex]{frametitle}
\usebeamerfont{frametitle}\MakeUppercase{\insertframetitle}%
\end{beamercolorbox}
}
%---------------------------------------------------------------------
% Footline
%---------------------------------------------------------------------
\usenavigationsymbolstemplate{}
\setbeamertemplate{footline}
{%
\begin{beamercolorbox}[wd=\textwidth,ht=3ex,dp=1.5ex,leftskip=0.3cm,rightskip=0.3cm]{structure}%
\hfill\usebeamerfont{page number in head/foot}%
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}%
}
%---------------------------------------------------------------------
% Captions
%---------------------------------------------------------------------
\setbeamertemplate{caption label separator}{: }
%---------------------------------------------------------------------
% Blocks
%---------------------------------------------------------------------
\setbeamertemplate{block begin}
{
\setbeamercolor{item}{parent=block body}
\par\vskip\medskipamount%
\begin{beamercolorbox}[sep=.5ex,dp=0.6ex,leftskip=0.5ex,rightskip=0.5ex]{block title}
\usebeamerfont*{block title}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
{\nointerlineskip\vskip-0.5pt}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[sep=.5ex,dp=0.6ex,leftskip=0.5ex,rightskip=0.5ex,vmode]{block body}%
}
\setbeamertemplate{block end}
{\end{beamercolorbox}\vskip\smallskipamount}
\setbeamertemplate{block alerted begin}
{
\setbeamercolor{item}{parent=block body alerted}
\par\vskip\medskipamount%
\begin{beamercolorbox}[sep=.5ex,dp=0.6ex,leftskip=0.5ex,rightskip=0.5ex]{block title alerted}
\usebeamerfont*{block title alerted}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
{\nointerlineskip\vskip-0.5pt}%
\usebeamerfont{block body alerted}%
\begin{beamercolorbox}[sep=.5ex,dp=0.6ex,leftskip=0.5ex,rightskip=0.5ex,vmode]{block body alerted}%
}
\setbeamertemplate{block alerted end}
{\end{beamercolorbox}\vskip\smallskipamount}
\setbeamertemplate{block example begin}
{
\par\vskip\medskipamount%
\begin{beamercolorbox}[sep=.5ex,dp=0.6ex,leftskip=0.5ex,rightskip=0.5ex]{block title example}
\usebeamerfont*{block title example}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
{\nointerlineskip\vskip-0.5pt}%
\usebeamerfont{block body example}%
\begin{beamercolorbox}[sep=.5ex,dp=0.6ex,leftskip=0.5ex,rightskip=0.5ex,vmode]{block body example}%
}
\setbeamertemplate{block example end}
{\end{beamercolorbox}\vskip\smallskipamount}
%---------------------------------------------------------------------
% Images
%---------------------------------------------------------------------
\newbox\mytempbox
\newdimen\mytempdimen
\newcommand\includegraphicscopyright[3][]{%
\leavevmode\vbox{\vskip3pt\raggedright\setbox\mytempbox=\hbox{\includegraphics[#1]{#2}}%
\mytempdimen=\wd\mytempbox\box\mytempbox\par\vskip1pt%
\usebeamerfont{copyright text}{\usebeamercolor[fg]{copyright text}{\vbox{\hsize=\mytempdimen#3}}}\vskip3pt%
}}
\mode
<all>