-
Notifications
You must be signed in to change notification settings - Fork 5
/
beamerthemeISG.sty
345 lines (301 loc) · 13.2 KB
/
beamerthemeISG.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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
% The ISG theme is built on top of the miniframes and rectangles themes with code adapted from other themes for the footers.
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
\ProvidesPackage{beamerthemeISG}[2015/05/26]
\RequirePackage{tikz}%Needed for the titlepage logo
\RequirePackage[utf8]{inputenc}
\RequirePackage{graphicx}
\RequirePackage{listings}
\RequirePackage{amssymb,amsmath}
\RequirePackage{ifthen}
\RequirePackage{natbib}
%%%%%%%%%%%%%%%%
% MACROS %
%%%%%%%%%%%%%%%%
%A quick command used on the title page, the second argument is only included if the first is not empty.
%Used in regulating vspace on the title page
\newcommand{\TitleOption}[2]{%
\ifthenelse{\equal{#1}{}}{}{#2}%
}
%A command also used on the titlepage to detect the aspect ratio and adjust the logo position accordingly.
\newcommand\ifratio[3]{%
\ifnum#1=169%
\ifdim\beamer@paperwidth=16.00cm\relax%
\ifdim\beamer@paperheight=9.00cm\relax%
#2%
\else%
#3%
\fi%
\else%
#3%
\fi%
\else%
\ifnum#1=43%
\ifdim\beamer@paperwidth=12.80cm\relax%
\ifdim\beamer@paperheight=9.60cm\relax%
#2%
\else%
#3%
\fi%
\else%
#3%
\fi%
\fi%
\fi%
}
%%%%%%%%%%%%%%%%%
% COLOURS %
%%%%%%%%%%%%%%%%%
\definecolor{isgdarkblue}{HTML}{01137A}
\definecolor{isglightblue}{HTML}{6699CC}
\definecolor{isgmediumblue}{HTML}{2e42ba}
\definecolor{isggreen}{HTML}{338F35}
\definecolor{rhulblue}{HTML}{4e9EE2}
\definecolor{rhulorange}{HTML}{EB641E}
\definecolor{rhulgreen}{HTML}{99CC00}
\definecolor{rhullightgrey}{RGB}{102, 102, 102}
\definecolor{rhulgrey}{HTML}{2E3235}
\definecolor{isglightgrey}{HTML}{EEEEEE}
\definecolor{isggrey}{HTML}{404040}
\definecolor{footerlightblue}{HTML}{DADAF6}
%%%%%%%%%%%%%%%%
% INNER THEMES %
%%%%%%%%%%%%%%%%
\useinnertheme{rectangles}
%%%%%%%%%%%%%%
% PARAMETERS %
%%%%%%%%%%%%%%
% Toggle footer
\newif\ifdisplaysplitfooter
\DeclareOption{displaysplitfooter}{\displaysplitfootertrue}
\newif\ifdisplaysinglefooter
\DeclareOption{displaysinglefooter}{\displaysinglefootertrue}
% Toggle TOC at every section
\newif\ifdisplaytocsection
\DeclareOption{displaytocsection}{\displaytocsectiontrue}
\DeclareOption{notocsection}{\displaytocsectionfalse}
% Toggle TOC at every subsection
\newif\ifdisplaytocsubsection
\DeclareOption{displaytocsubsection}{\displaytocsubsectiontrue}
\DeclareOption{notocsubsection}{\displaytocsubsectionfalse}
\beamer@compresstrue
\ProcessOptions\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Theme specific settings %
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{navigation symbols}{} %remove navigation buttons
%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefining Title Page %
%%%%%%%%%%%%%%%%%%%%%%%%%
\defbeamertemplate*{title page}{ISG}
{%
%\setbeamercolor*{footlinecolor}{fg=rhulorange,bg=rhulorange}
%\setbeamertemplate{footline}{%
%\begin{beamercolorbox}[sep=0.07cm,wd=\paperwidth,leftskip=0.5cm,rightskip=0.5cm]{footlinecolor}
% {\color{white}\insertshorttitle\ --\ \insertshortauthor \hfill \insertframenumber/\inserttotalframenumber}
%\end{beamercolorbox}}
\begin{center}
\vspace{ -1cm } %force the effective top margin to be right under the header
\vspace{ \stretch{2} }
{\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle}\par
\TitleOption{\insertsubtitle}{%
\vspace{ \stretch{0.5} }%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle}\par}
\vspace{ \stretch{1.5} }%
{\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor}\par
\vspace{ \stretch{0.5} }%
{\usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute}\par
\TitleOption{\insertdate}{%
\vspace{ \stretch{1} }%
{\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate}}
\vspace{ 1.1cm } %force the effective bottom margin to be above the logo banner
\end{center}
}
\addtobeamertemplate{title page}{%Ideally the shifts would depend on the size of the footer..\footerheight?
\ifratio{169}{
\begin{tikzpicture}[remember picture,overlay]
\node [xshift=0cm,yshift=1.275cm] at (current page.south)%place the logo bar just above the footer
{\includegraphics[width=\paperwidth]{graphics/beamer-style/titlepagelogo.jpg}};
\end{tikzpicture}}%
{
\begin{tikzpicture}[remember picture,overlay]
\node [xshift=0cm,yshift=1.075cm] at (current page.south)%place the logo bar just above the footer
{\includegraphics[width=\paperwidth]{graphics/beamer-style/titlepagelogo.jpg}};
\end{tikzpicture}}%
}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Applying the parameters defined above %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Outertheme
\useoutertheme{miniframes}%This has clean lines between portions of the header
% Footer
\newcommand{\rhultitlepage}[0]{{
\setbeamercolor*{footlinecolor}{fg=rhulorange,bg=rhulorange}
\setbeamertemplate{footline}{%
\begin{beamercolorbox}[sep=0.07cm,wd=\paperwidth,leftskip=0.5cm,rightskip=0.5cm]{footlinecolor}
{\color{white}\insertshorttitle\ --\ \insertshortauthor \hfill \insertframenumber/\inserttotalframenumber}
\end{beamercolorbox}}%
\frame{\titlepage}}
}
\setbeamertemplate{footline}{%
\hbox{\begin{beamercolorbox}[wd=0.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=0.5cm,rightskip=0.5cm]{author in head/foot}%
\hfill \insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=0.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=0.5cm,rightskip=0.5cm]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle \hfill \insertframenumber/\inserttotalframenumber
\end{beamercolorbox}}
}
%ensure that there are always dots by adding a phantom subsection into every section.
%A bit of a hack, but the dots only appear where there are subsections and this prevents authors from having to repeatedly add this command themselves
\AtBeginSection[]
{
\subsection*{}
}
% TOC Section
\ifdisplaytocsection
\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[currentsection, subsectionstyle=show/show/hide]
\end{frame}
\subsection*{} %added to perform as described on line 150/151. Apparently only one set of commands can be set to run AtBeginSection
}
\fi
% TOC SubSection
\ifdisplaytocsubsection
\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[currentsection, subsectionstyle=show/shaded/hide]
\end{frame}
\subsection*{} %added to perform as described on line 150/151. Apparently only one set of commands can be set to run AtBeginSection
}
\AtBeginSubsection[]
{
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide]
\end{frame}
}
\fi
%%%%%%%%%%%%%%%%%%
% COLOR SETTINGS %
%%%%%%%%%%%%%%%%%%
%%% TITLE %%%
%\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true]
\setbeamercolor*{titlelike}{fg=rhulorange}
\setbeamercolor*{title in head/foot}{fg=black,bg=rhulorange}
\setbeamerfont*{title}{series=\bfseries, size=\Large}
\setbeamercolor*{subtitle}{fg=black}
\setbeamerfont*{subtitle}{shape=\normalfont,size=\large}
%\setbeamertemplate{frametitle}[default][colsep=-4bp]%,rounded=false,shadow=false]
%%% COVER %%%
%\setbeamercolor*{author}{}
%\setbeamerfont*{author}{shape=\upshape,series=\bfseries}
\setbeamerfont*{author}{shape=\itshape,size=\normalfont}
\setbeamercolor*{author in head/foot}{fg=white, bg=rhulgrey}
%\setbeamercolor*{author in sidebar}{use=palette sidebar tertiary,fg=palette sidebar tertiary.fg}
%\setbeamercolor*{institute}{}
\setbeamerfont{institute}{size=\small,shape=\normalfont}
%\setbeamercolor*{institute in head/foot}{parent=palette tertiary}
%\setbeamercolor*{institute in sidebar}{use=palette sidebar tertiary,fg=palette sidebar tertiary.fg}
\setbeamercolor*{date}{fg=rhulorange}
\setbeamerfont*{date}{size=\footnotesize,shape=\normalfont}
\setbeamercolor*{date}{fg=rhulorange}
%\setbeamercolor*{date in head/foot}{parent=palette secondary}
%\setbeamercolor*{date in sidebar}{use=palette sidebar tertiary,fg=palette sidebar tertiary.fg}
%%% SECTION %%%
%\setbeamercolor{section in toc}{parent=structure}
%\setbeamercolor{section in toc shaded}{parent=section in toc}
%\setbeamercolor{section in toc shaded}{use=structure,fg=structure.fg}
\setbeamercolor*{section in head/foot}{fg=white,bg=rhulgrey}
%\setbeamercolor*{section in sidebar}{parent=palette sidebar secondary}
%\setbeamercolor*{section in sidebar shaded}{use=section in sidebar,fg=section in sidebar.fg!40!bg}
%\setbeamercolor*{section number projected}{parent=item projected}
%%% SUBSECTION %%%
%\setbeamercolor{subsection in toc}{fg = black}
%\setbeamercolor{subsection in toc shaded}{parent=subsection in toc}
\setbeamercolor*{subsection in head/foot}{bg=rhulorange}%,fg=rhulorange}
%\setbeamertemplate{subsection in head/foot}[colsep=-2bp,rounded=false,shadow=false]
%\setbeamercolor*{subsection in sidebar}{parent=palette sidebar primary}
%\setbeamercolor*{subsection in sidebar shaded}{use=subsection in sidebar,fg=subsection in sidebar.fg!40!bg}
%\setbeamercolor*{subsection number projected}{parent={subitem projected}}
%%% SUBSUBSECTION %%%
%\setbeamercolor*{subsubsection in toc}{parent=subsection in toc}
%\setbeamercolor*{subsubsection in toc shaded}{parent=subsubsection in toc}
%\setbeamercolor*{subsubsection in head/foot}{parent=subsection in head/foot}
%\setbeamercolor*{subsubsection in sidebar}{parent=subsection in sidebar}
%\setbeamercolor*{subsubsection in sidebar shaded}{parent=subsection in sidebar shaded}
%\setbeamercolor*{subsubsection number projected}{parent=subsubitem projected}
%%% SIDEBAR %%%
%\setbeamercolor*{sidebar}{}
%\setbeamercolor*{sidebar left}{parent=sidebar}
%\setbeamercolor*{sidebar right}{parent=sidebar}
%%% FRAMES %%%
\setbeamercolor*{frametitle}{bg=rhulgrey,fg=white}
%\setbeamertemplate{frametitle}[default][colsep=-4bp,rounded=false,shadow=false]
\setbeamercolor*{framesubtitle}{parent=frametitle}
\setbeamercolor*{frametitle right}{bg=rhulgrey}
%%% BLOCKS%%%
\setbeamertemplate{blocks}[shadow=false]%Can add rounded to get the old look
%\addtobeamertemplate{block begin}{\pgfsetfillopacity{0.8}}{\pgfsetfillopacity{1}}%Transparency
\setbeamercolor{block title example}{bg=rhullightgrey,fg=white!50}
\setbeamercolor{block body example}{bg=isglightgrey,fg=rhulgrey}
\setbeamercolor{block title}{bg=rhulorange,fg=white!50}
\setbeamercolor{block body}{bg=isglightgrey,fg=rhulgrey}
\setbeamercolor{block body alerted}{bg=isglightgrey,fg=rhulgrey}
\setbeamercolor{structure}{fg=black}
\setbeamercolor{block title alerted}{bg=red,fg=white}
%\setbeamercolor*{block title example}{bg=gray,fg=white}
%\setbeamercolor{block title}{use=structure,fg=white,bg=structure.fg!75!black}
%\setbeamercolor{block title alerted}{use=alerted text,fg=white,bg=alerted text.fg!75!black}
%\setbeamercolor{block title example}{use=example text,fg=white,bg=example text.fg!75!black}
%\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}
%\setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg!10!bg}
%\setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!10!bg}
%%% SEPARATION LINES / HEADER / FOOTER %%%
\setbeamertemplate{upper separation line head}[colsep=-2bp,rounded=false,shadow=false]
%\setbeamercolor*{separation line}{}
%\setbeamercolor*{upper separation line head}{parent=separation line}
%\setbeamercolor*{middle separation line head}{parent=separation line}
%\setbeamercolor*{lower separation line head}{parent=separation line}
%\setbeamercolor*{upper separation line foot}{parent=separation line}
%\setbeamercolor*{middle separation line foot}{parent=separation line}
%\setbeamercolor*{lower separation line foot}{parent=separation line}
%%% ITEMS / ENUMERATE / DESCRIPTION %%%
\setbeamercolor{item}{bg=white,fg=rhulorange}
%\setbeamercolor*{subitem}{parent=item}
%\setbeamercolor*{subsubitem}{parent=subitem}
%\setbeamercolor*{item projected}{parent=item,use=item,fg=white,bg=blue}
%\setbeamercolor*{subitem projected}{parent=item projected}
%\setbeamercolor*{subsubitem projected}{parent=subitem projected}
%\setbeamercolor*{enumerate item}{parent=item}
%\setbeamercolor*{enumerate subitem}{parent=subitem}
%\setbeamercolor*{enumerate subsubitem}{parent=subsubitem}
%\setbeamercolor*{itemize item}{parent=item}
%\setbeamercolor*{itemize subitem}{parent=subitem}
%\setbeamercolor*{itemize subsubitem}{parent=subsubitem}
%\setbeamercolor*{itemize/enumerate body}{}
%\setbeamercolor*{itemize/enumerate subbody}{}
%\setbeamercolor*{itemize/enumerate subsubbody}{}
%\setbeamercolor*{description item}{parent=item}
%%% TEXT %%%
\setbeamercolor*{normal text}{fg=black,bg=white}
\setbeamercolor*{alerted text}{fg=rhulorange,bg=white}
%%%Bibliography%%%
\bibliographystyle{alpha}
\renewcommand\bibfont{\scriptsize} % make bibliography entries smaller
\setbeamertemplate{frametitle continuation}[from second] %place continuation label on bibliography from the second slide onwards
\setbeamercolor*{bibliography entry title}{fg=black} % Use only black when writing the references
\setbeamercolor*{bibliography entry author}{fg=black}
\setbeamercolor*{bibliography entry location}{fg=black}
\setbeamercolor*{bibliography entry note}{fg=black}
\setbeamertemplate{bibliography item}{} % remove the icons for the references
\mode
<all>