-
Notifications
You must be signed in to change notification settings - Fork 15
/
basileabeam.sty
387 lines (327 loc) · 12.1 KB
/
basileabeam.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
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
% Based on http://blog.barisione.org/2007-09/torino-a-pretty-theme-for-latex-beamer/
% Adjustments for University of Basel, Department of Mathematics and Computer Science
% Ivan Giangreco
% February 2015
\usepackage[utf8]{inputenc}
\graphicspath{{Figures/}}
\mode<presentation>
% Package used for dash rule in titles
\usepackage{dashrule}
% Packages used for displaying notes
\usepackage{pgfpages}
% Text to be set for frontpage
\newcommand*{\ulogo}[1]{\def\ulogoint{#1}}
\newcommand*{\ulistelement}[1]{\def\ulistelementint{#1}}
% Have user add more information.
%\newcommand*{\email}[1]{\def\insertemail{#1}}
\newcommand*{\email}[1]{\ifdefined\email \def\insertemail{#1}\fi}
% Turn off navigation symbols.
\setbeamertemplate{navigation symbols}{}
% Required to make basileabeam pdf/xelatex ready
\usepackage{ifpdf}
% Required to have more commands (i.e. boolean flags)
\usepackage{etoolbox}
% Flag to turn off the total number of frames in the footer
% i.e. if flag is on: in footer x / y
% if flag is off: in footer x
\providetoggle{bbTotalNoSlidesEnabled}
\toggletrue{bbTotalNoSlidesEnabled} % Default is true i.e. x / y
\newcommand{\totalNoSlidesDisabled}{\togglefalse{bbTotalNoSlidesEnabled}}
% Flag to turn off the header containing sections, enabled by default.
\providetoggle{bbHeaderSectionsEnabled}
\toggletrue{bbHeaderSectionsEnabled} % Default is true, i.e. with header.
\newcommand{\headerSectionsDisabled}{\togglefalse{bbHeaderSectionsEnabled}}
% Required to position the logo on the title page
\usepackage{tikz}
% Items.
\defbeamertemplate{itemize item}{squarealt}%
{\tiny\raise.5ex\hbox{\donotcoloroutermaths$\blacksquare$}}
\defbeamertemplate{itemize subitem}{squarealt}%
{\tiny\raise.4ex\hbox{\donotcoloroutermaths$\square$}}
\defbeamertemplate{itemize subsubitem}{squarealt}%
{\tiny\raise.3ex\hbox{\donotcoloroutermaths$\blacksquare$}}
\setbeamertemplate{items}[squarealt]
% Colors.
\definecolor{hcolor}{RGB}{165,215,210} % Color 1
\definecolor{lcolor}{RGB}{45,55,60} % Color 3
\definecolor{highlightcolor}{RGB}{210,5,55} % Color 5
%% Official color sequence
\definecolor{bcolor1}{RGB}{165,215,210}
\definecolor{bcolor2}{RGB}{30,165,165}
\definecolor{bcolor3}{RGB}{45,55,60}
\definecolor{bcolor4}{RGB}{140,145,150}
\definecolor{bcolor5}{RGB}{210,5,55}
\definecolor{bcolor6}{RGB}{235,130,155}
\definecolor{bcolor7}{RGB}{190,195,200}
\definecolor{bcolor8}{RGB}{0,110,110}
\definecolor{bcolor9}{RGB}{0,0,0}
\definecolor{bcolor10}{RGB}{255,255,255}
\setbeamercolor*{palette primary}{fg=black,bg=white}
\setbeamercolor*{palette highlight}{fg=black,bg=hcolor}
\setbeamercolor*{palette line}{fg=black,bg=lcolor}
\setbeamercolor*{title page header}{parent=palette highlight}
\setbeamercolor*{titlelike}{bg=black}
\setbeamercolor*{frametitle}{bg=black,fg=black}
\setbeamercolor*{lineup}{parent=palette line}
\setbeamercolor*{part title}{bg=black,fg=black}
\setbeamercolor*{item}{fg=hcolor}
\setbeamercolor*{page footer}{parent=palette highlight}
\setbeamercolor*{alerted text}{fg=highlightcolor}
\hypersetup{colorlinks=false,linkcolor=hcolor,urlcolor=hcolor,citecolor=lcolor}
\setbeamercolor{note page}{bg=white, fg=black}
\setbeamercovered{transparent}
% Lengths.
\newlength{\beamer@fancy@lineup}
\setlength{\beamer@fancy@lineup}{.025\paperheight}
\newlength{\beamer@fancy@linemid}
\setlength{\beamer@fancy@linemid}{.015\paperheight}
\newlength{\beamer@fancy@linebottom}
\setlength{\beamer@fancy@linebottom}{.01\paperheight}
\newlength{\headerheight}
\setlength{\headerheight}{.045\paperheight}
% This particular setting is because 1ex pdflatex < 1ex xelatex
% sets the height of the logo
\ifpdf
\def\ulogoheightint{5ex}
\else
\def\ulogoheightint{4ex}
\fi
% Margins.
\newlength{\beamer@fancy@normalmargin}
\setlength{\beamer@fancy@normalmargin}{.06\paperwidth}
\setbeamersize{text margin left=\beamer@fancy@normalmargin}
\setbeamersize{text margin right=\beamer@fancy@normalmargin}
\setlength\leftmargini{.6\beamer@fancy@normalmargin}
\setlength\leftmarginii{.6\beamer@fancy@normalmargin}
\setlength\leftmarginiii{.6\beamer@fancy@normalmargin}
% Font.
% This is only available for xe/luatex
\ifpdf % do not use this on non xe/luatex
% nothing
\else
\usefonttheme{professionalfonts}
\usepackage{fontspec}%
\newfontfamily\utitlefont{Georgia}%
\setmainfont{Arial}%
\setsansfont{Arial}%
\fi
%
\setbeamerfont{author}{size={\fontsize{8}{12}}}
\setbeamerfont{email}{size={\fontsize{6}{12}}}
\setbeamerfont{institute}{size={\fontsize{8}{12}}}
\setbeamerfont{date}{size={\fontsize{8}{12}}}
\setbeamerfont{title in head/foot}{series=\mdseries,size={\fontsize{6}{6}}}
\setbeamerfont{information}{family=\sffamily}
% again, the special utitlefont is only available on xe/luatex
\ifpdf
% nothing
\else
\setbeamerfont{title}{family=\utitlefont}
\setbeamerfont{frametitle}{family=\utitlefont}
\fi
\DeclareTextFontCommand{\emph}{\bfseries}
\DeclareTextFontCommand{\red}{\bfseries\textcolor{highlightcolor}}
% Title page, you should use this in a frame with the [plain] option.
\defbeamertemplate*{title page normal}{fancy theme}[1][]{
{\parskip0pt\offinterlineskip%
\hbox{\hskip-\Gm@lmargin\hbox{\vbox{%
\@tempdima=\textwidth\textwidth=\paperwidth\hsize=\textwidth\def\\{,}\vbox{}\vskip-1.5ex%
% Top Logo.
\begin{beamercolorbox}[wd=\paperwidth,ht=7ex,leftskip=2ex,dp=0.25\paperheight]{title page header}
%\includegraphics[height=4ex]{\ulogoint}
\newline \newline
\end{beamercolorbox}%
%% Top Logo positioned with tikz
\begin{tikzpicture}[remember picture,overlay]
\node[%
yshift=-1.5em,xshift=1.5em
] (img) at (current page.north west) [anchor=north west]{%
\includegraphics[height=\ulogoheightint]{\ulogoint}};
\end{tikzpicture}
\vbox{}\vskip-\beamer@fancy@lineup%
\vbox{}\vskip-\beamer@fancy@linemid%
}}%
\hskip-\Gm@rmargin%
}}\hfil%
%
% Title.
\vskip4ex
\usebeamerfont{title}\inserttitle\par%
\ifx\insertsubtitle\@empty%
\else%
\vskip0.25ex%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
\fi%
\def\beamer@decolines@truetext{true}%
\vskip-.25\beamer@leftmargin%
\begin{beamercolorbox}[wd=\textwidth,ht=.1ex,dp=0ex]{}%
\usebeamercolor[bg]{lineup}\hdashrule{\textwidth}{0.5pt}{1pt 1pt}
\end{beamercolorbox}%
\vspace{2ex}%
% Authors, institute and date
\begin{beamercolorbox}[wd=\textwidth]{author}
{%
\usebeamerfont{information}%
\usebeamerfont{author}\insertauthor \hspace{1ex}
% Email is only printed if defined by user with \email{} and there is some content
\ifdefined\insertemail{%
\ifx\insertemail\@empty%
\\[1ex]%
\else%
\usebeamerfont{email}\textcolor{lcolor}{\textless \insertemail \textgreater}\\[1ex]%
\fi%}
}\else{%
\\[1ex]%
}%
\fi%
\usebeamerfont{institute}\insertinstitute \\[1ex]%
\usebeamerfont{date}\insertdate%
}
\end{beamercolorbox}
}
\defbeamertemplate*{title page}{fancy}[1][]
{
\def\beamer@fancy@truetext{true}%
\usebeamertemplate{title page normal}%
}
% General frame.
\defbeamertemplate*{frametitle}{decolines theme}[1][left]
{
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\vbox{}\vskip-.5\beamer@leftmargin%
\begin{beamercolorbox}[sep=\beamer@leftmargin,#1,wd=\the\@tempdima]{}
\usebeamerfont{frametitle}\usebeamercolor[bg]{framesubtitle}%
\vbox{}\vskip0ex%
\if@tempswa\else\csname beamer@fte#1\endcsname\fi%
\strut\insertframetitle\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[bg]{framesubtitle}\insertframesubtitle\strut\par}%
\fi}%
\vskip-1ex%
\if@tempswa\else\vskip-\beamer@leftmargin\fi
\end{beamercolorbox}%
\def\beamer@decolines@truetext{true}%
\vskip-.5\beamer@leftmargin%
\begin{beamercolorbox}[wd=\textwidth,ht=.1ex,dp=0ex]{}%
\usebeamercolor[bg]{lineup}\hdashrule{\textwidth}{0.5pt}{1pt 1pt}
\end{beamercolorbox}%
}
% Frame title continuations, default
\defbeamertemplate*{frametitle continuation}{decolines theme}{(\insertcontinuationcount)}
% List elements
\defbeamertemplate{itemize item}{image}{\small\includegraphics[height=1.6ex]{\ulistelementint}}
\defbeamertemplate{itemize subitem}{image}{\scriptsize\includegraphics[height=1.6ex]{\ulistelementint}}
\defbeamertemplate{itemize subsubitem}{image}{\tiny\includegraphics[height=1.6ex]{\ulistelementint}}
\setbeamertemplate{itemize item}[image]
\setbeamertemplate{itemize subitem}[image]
\setbeamertemplate{itemize subsubitem}[image]
% Last slide
\newenvironment{changemargin}[2]{
\begin{list}{}{
\setlength{\topsep}{0pt}
\setlength{\leftmargin}{#1}
\setlength{\rightmargin}{#2}
\setlength{\listparindent}{\parindent}
\setlength{\itemindent}{\parindent}
\setlength{\parsep}{\parskip}
}\item[]}{
\end{list}
}
\newcommand{\lastpage}[1]{
\begin{changemargin}{0.5\textwidth}{\rightmargin}
\begin{columns}
\column{.6\textwidth}
{\parskip0pt\offinterlineskip%
\hbox{\hskip-\Gm@lmargin\hbox{\vbox{%
\vbox{}\vskip-1.75ex%
\begin{beamercolorbox}[wd=\textwidth,ht=\paperheight]{title page header}
\end{beamercolorbox}%
\vbox{}\vskip-\beamer@fancy@lineup%
\vbox{}\vskip-\beamer@fancy@linemid%
}}%
\hskip-\Gm@rmargin%
}}\hfil%
\vskip4ex
\column{.4\textwidth}
{\raggedright {#1}}
\end{columns}
\end{changemargin}
}
% Blocks (box)
\setbeamertemplate{blocks}[shadow=false]
\setbeamertemplate{theorems}[normal font]
\setbeamercolor{block title}{fg=black,bg=hcolor!100}
\setbeamercolor{block body}{bg=hcolor!40}
\setbeamercolor{block body example}{bg=hcolor!40}
% Adjust caption
\setbeamertemplate{caption}{\raggedright\insertcaption\par}
% Backup slides
\newcommand{\backupbegin}{
\newcounter{finalframe}
\setcounter{finalframe}{\value{framenumber}}
}
\newcommand{\backupend}{
\setcounter{framenumber}{\value{finalframe}}
}
% Header.
\defbeamertemplate*{headline}{decolines theme}{%
\iftoggle{bbHeaderSectionsEnabled}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{page footer}%
% Flush the bar to the left.
\setbeamercolor{section in head/foot}{fg=black, bg=white}
\insertsectionnavigationhorizontal{\paperwidth}{\hskip0pt plus1fill}{\hskip0pt plus1fill}
\end{beamercolorbox}%
}
}{}
}
% Footer.
\defbeamertemplate*{footline}{decolines theme}
{
\hbox{%
\begin{beamercolorbox}[wd=0.9\textwidth,ht=3ex,dp=1.5ex,left,leftskip=2ex]{page footer}%
\usebeamerfont{title in head/foot}\insertshorttitle{}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=0.1\textwidth,ht=3ex,dp=1.5ex,right,leftskip=2ex]{page footer}%
\centering
\usebeamerfont{title in head/foot}%
\iftoggle{bbTotalNoSlidesEnabled}{\insertframenumber{} / \inserttotalframenumber}{\insertframenumber}%
\end{beamercolorbox}}%
}
% Bibliography
\usepackage[backend=biber,style=authoryear,hyperref=false]{biblatex}
\defbibenvironment{bibliography}
{\list{}
{\settowidth{\labelwidth}{\usebeamertemplate{bibliography item}}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\labelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\itemsep}%
\setlength{\parsep}{\parsep}}}
{\endlist}
{\item}
\setbeamercolor{bibliography item}{parent=palette primary}
\setbeamercolor*{bibliography entry author}{parent=palette primary}
\setbeamercolor*{bibliography entry title}{parent=palette primary}
\setbeamercolor*{bibliography entry note}{parent=palette primary}
\setbeamertemplate{bibliography item}{\small\includegraphics[height=1.6ex]{\ulistelementint}}
\renewcommand*{\citesetup}{\tiny}
\renewcommand*{\bibfont}{\footnotesize}
\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}
\nocite{*}
\mode
<all>
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\usebeamercolor[fg]{normal text}
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\makeatother