forked from exporl/kuleuven-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
presentation-latex.tex
337 lines (272 loc) · 10.6 KB
/
presentation-latex.tex
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
% KU Leuven latex presentation template
%
% © 2012 Michael Hofmann
%
% This work is licensed under the Creative Commons Attribution 3.0 Unported License.
% To view a copy of this license, visit
% http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative
% Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
\documentclass[t,12pt,english
\ifx\beamermode\undefined\else,\beamermode\fi
]{beamer}
%\setbeameroption{show notes}
%\setbeameroption{show only notes}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[nohyperlinks]{acronym}
\usepackage{babel,lmodern,graphicx,mathptmx,xspace,wasysym,microtype,booktabs,tabularx,relsize,textcomp,longtable,lipsum,colortbl,eurosym,url,multicol,etoolbox,multimedia,pdfpages,fixltx2e,ifluatex,epstopdf}
\usepackage[olditem,oldenum]{paralist}
\usepackage[babel=true]{csquotes}
\usepackage[thinqspace,amssymb,textstyle]{SIunits}
\usepackage[textsize=tiny]{todonotes}
\usepackage[symbol]{footmisc}
\usepackage[notquote]{hanging}
\usepackage[normalem]{ulem}
%\usepackage{lua-visual-debug}
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
\graphicspath{{figures/}}
% Fix sort order in case the same file exists with multiple extensions
\DeclareGraphicsExtensions{.pdf,.png,.jpeg,.jpg,.eps}
\frenchspacing
\input{templates/definitions.tex}
%% From pandoc default template
%% End pandoc
\mode<presentation>
%\hypersetup{pdfpagemode=FullScreen}
\setbeamercolor{structure}{fg=kulbright}
\setbeamercolor{title}{fg=white}
\setbeamercolor{footline}{parent=title}
\setbeamercolor{normal text}{fg=kuldefault}
\setbeamercolor{item}{parent=normal text}
\setbeamercolor{section in toc}{parent=normal text}
\setbeamercolor{footline extra}{fg=white}
\setbeamerfont{title}{size=\Large}
\setbeamerfont{tiny structure}{series=\bfseries}
\setbeamerfont{caption}{}
\setbeamersize{text margin left=0.8cm}
\setbeamersize{text margin right=0.8cm}
\setbeamersize{sidebar width left=0cm}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize item}{\footnotesize\raise1pt\hbox{\textbullet}}
\setbeamertemplate{itemize subitem}{--}
\setbeamertemplate{itemize subsubitem}{\tiny\raise1.5pt\hbox{\textbullet}}
\setlength\leftmargini{1em}
\setlength\leftmarginii{1em}
\setlength\leftmarginiii{1em}
\defbeamertemplate{background canvas}{title}
{%
\pgfdeclarehorizontalshading{bgshading}{8.70cm}{color(0cm)=(kulleft); color(\the\paperwidth)=(kulright)}%
\vbox to 8.70cm{%
\pgfuseshading{bgshading}\hspace*{-1.6cm}%
}%
\hskip-\paperwidth%
\hskip1.6cm%
\vbox to \paperheight{%
\vskip0.5cm\hskip0.5cm\includegraphics[width=2.83cm]{templates/kuleuven}%
\vskip0.99cm\hskip0.76cm\includegraphics[width=2.84cm]{templates/key}%
\vskip-0.57cm\hskip11.61cm\includegraphics[width=0.58cm]{templates/sedes}\hspace*{-1cm}%
\vfill
}%
}
\defbeamertemplate{background canvas}{grid}
{%
\begin{tikzpicture}[remember picture,overlay,every node/.style={anchor=center}]
\foreach \d in {0,...,20} {
\draw[gray] (\d,0) -- (\d,-20);
\draw[gray] (0,-\d) -- (20,-\d);
\draw[lightgray] (\d+0.5,0) -- (\d+0.5,-20);
\draw[lightgray] (0,-\d-0.5) -- (20,-\d-0.5);
\node[anchor=north,red,font=\tiny] at (\d,0) {\d};
\node[anchor=west,red,font=\tiny] at (0,-\d) {\d};
}
\end{tikzpicture}
}
% add a macro that saves its argument
\newcommand{\footlineextra}[1]{\gdef\insertfootlineextra{#1}}
\newbox\footlineextrabox
% add a beamer template that sets the saved argument in a box.
% The * means that the beamer font and color "footline extra" are automatically added.
\defbeamertemplate*{footline extra}{default}{
%\begin{beamercolorbox}[ht=2.25ex,dp=1ex,leftskip=\Gm@lmargin]{footline extra}
\begin{beamercolorbox}[ht=0.37cm,dp=0.25cm,wd=0.4\paperwidth,left,leftskip=2ex]{footline extra}
\insertfootlineextra
%\par\vspace{2.5pt}
\end{beamercolorbox}
}
\defbeamertemplate{background canvas}{plain}{}
\defbeamertemplate{footline}{large}
{%
\pgfdeclarehorizontalshading{bgshading}{0.62cm}{color(0cm)=(kulleft); color(\the\paperwidth)=(kulright)}%
\vskip.3cm% make room for the logo
\parbox[t][0.62cm]{\paperwidth}{\pgfuseshading{bgshading}}\par%
\vskip-0.62cm%
\begin{beamercolorbox}[ht=0.37cm,dp=0.25cm,center]{page number in head/foot}%
\insertframenumber%
\end{beamercolorbox}%
\vskip-0.92cm%
\parbox[t][0.92cm]{\paperwidth}{\hskip10.33cm\includegraphics[width=2.10cm]{templates/kuleuven}}\par%
% set the box with the extra footline material but make it add no vertical space
\setbox\footlineextrabox=\vbox{\usebeamertemplate*{footline extra}}
\vskip -\ht\footlineextrabox
\vskip -\dp\footlineextrabox
\box\footlineextrabox%
}
% patch \begin{frame} to reset the footline extra material
\makeatletter
\let\beamer@original@frame=\frame
\def\frame{\gdef\insertfootlineextra{}\beamer@original@frame}
\footlineextra{}
\makeatother
\defbeamertemplate{footline}{nopagenumber}
{%
\pgfdeclarehorizontalshading{bgshading}{0.62cm}{color(0cm)=(kulleft); color(\the\paperwidth)=(kulright)}%
\vskip.3cm% make room for the logo
\parbox[t][0.62cm]{\paperwidth}{\pgfuseshading{bgshading}}\par%
\vskip-0.62cm%
\begin{beamercolorbox}[ht=0.37cm,dp=0.25cm,center,ignorebg]{page number in head/foot}%
%
\end{beamercolorbox}%
\vskip-0.92cm%
\parbox[t][0.92cm]{\paperwidth}{\hskip10.33cm\includegraphics[width=2.10cm]{templates/kuleuven}}\par%
}
\defbeamertemplate{footline}{small}
{%
\vskip.3cm% make room for the logo
\begin{beamercolorbox}[ht=0.37cm,dp=0.25cm,center,ignorebg]{normal text}%
\mdseries\insertframenumber%
\end{beamercolorbox}%
}
\setbeamertemplate{footline}[large]
\setbeamertemplate{frametitle}
{%
\nointerlineskip%
\vskip.28cm%
{\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertsupertitle\strut\par}%
\vskip-.2cm%
{\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\strut\par}%
\vskip-.3cm%
}
\setbeamertemplate{title page}
{
\vbox{}%
\vskip2.8cm%
\vbox to 6.5cm{%
\hskip2.8cm%
\begin{minipage}{7.9cm}
\begin{beamercolorbox}{title}
\usebeamerfont{title}%
\inserttitle\par%
\ifx\insertsubtitle\undefined%
\else%
\vskip0.25em%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
\fi%
\end{beamercolorbox}%
\vskip1em\par
\begin{beamercolorbox}{author}
\usebeamerfont{author}\usebeamercolor[fg]{subtitle}%
\insertauthor
\end{beamercolorbox}
\begin{beamercolorbox}{institute}
\usebeamerfont{institute}\usebeamercolor[fg]{subtitle}%
\insertinstitute
\end{beamercolorbox}
\begin{beamercolorbox}{date}
\usebeamerfont{date}\usebeamercolor[fg]{subtitle}%
\insertdate
\end{beamercolorbox}%
\end{minipage}%
\vfill
}
}
\mode<all>
\newcommand{\inlinesound}[2]{\movie[inlinesound,encoding=Signed,samplingrate=44100]{#1}{#2}}
% disable for now as otherwise all commands that go between frames generated by
% the filter will result in duplicate toc lines
\renewcommand{\addcontentsline}[3]{}
\newcommand{\largefooter}{\setbeamertemplate{footline}[large]}
\newcommand{\emptyfooter}{\setbeamertemplate{footline}[nopagenumber]}
\newcommand{\smallfooter}{\setbeamertemplate{footline}[small]}
\newcommand{\nofooter}{\setbeamertemplate{footline}[nofooter]}
\newcommand{\sectiontoc}{\AtBeginSection[]{{
\nosupertitle
\emptyfooter
\begin{frame}[noframenumbering]{Outline}
\tableofcontents[currentsection]
\end{frame}
\largefooter
}}}
\newcommand{\subsectiontoc}{\AtBeginSubsection[]{{
\nosupertitle
\emptyfooter
\begin{frame}[noframenumbering]{Outline}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
\largefooter
}}}
\newcommand{\notoc}{\AtBeginSection[]{}\AtBeginSubsection[]{}}
\newcommand{\nosupertitle}{\renewcommand{\insertsupertitle}{}}
\newcommand{\sectiontitle}{\renewcommand{\insertsupertitle}{\insertsectionhead}}
\newcommand{\subsectiontitle}{\renewcommand{\insertsupertitle}{\insertsectionhead\ifx\insertsubsectionhead\empty\else{} -- \insertsubsectionhead\fi}}
% animations do not work atm as figures are set on independent frames
\newcommand{\slidefig}[2]{\usebackgroundtemplate{\parbox[c][\paperheight][c]{\paperwidth}{\centering\includegraphics#1[height=\paperheight,width=\paperwidth,keepaspectratio]{#2}}}\begin{frame}[plain]\end{frame}\usedefaultcanvas}
\newcommand{\usedefaultcanvas}{\setbeamertemplate{background canvas}[\defaultcanvas]}
\newcommand{\gridcanvas}{\renewcommand{\defaultcanvas}{grid}\usedefaultcanvas}
\newcommand{\plaincanvas}{\renewcommand{\defaultcanvas}{plain}\usedefaultcanvas}
\newcommand{\insertsupertitle}{}
\newcommand{\defaultcanvas}{plain}
% Defining a new coordinate system for the page:
%
% ----------------
% |(0,1) (1,1)|
% | |
% |(0,0) (1,0)|
% ----------------
\makeatletter
\def\parsecomma#1,#2\endparsecomma{\def\page@x{#1}\def\page@y{#2}}
\tikzdeclarecoordinatesystem{page}{
\parsecomma#1\endparsecomma
\pgfpointanchor{current page}{north east}
% Save the upper right corner
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
% save the lower left corner
\pgfpointanchor{current page}{south west}
\pgf@xb=\pgf@x%
\pgf@yb=\pgf@y%
% Transform to the correct placement
\pgfmathparse{(\pgf@xc-\pgf@xb)*\page@x+(\pgf@xb)}
\expandafter\pgf@x\expandafter=\pgfmathresult pt
\pgfmathparse{(\pgf@yc-\pgf@yb)*\page@y+(\pgf@yb)}
\expandafter\pgf@y\expandafter=\pgfmathresult pt
}
\makeatother
% Example:
%\begin{tikzpicture}[remember picture,overlay,every node/.style={anchor=center}]
% \node at (page cs:0.5,0.3) {0.5,0.3};
% \node at (page cs:0,0) {0,0};
% \draw(page cs:0,0) -- (page cs:1,1);
% \draw[thick,red] (page cs:0,0) rectangle (page cs:1,1);
% \draw[thick,green] (page cs:0.2,0.2) rectangle (page cs:0.8,0.8);
%\end{tikzpicture}
\setcounter{secnumdepth}{0}
\title{Title}
\author{\mbox{Author 1} \and \mbox{Author 2}}
\date{Date}
\institute{institute name}
\begin{document}
\setbeamertemplate{background canvas}[title]
\begin{frame}[plain,noframenumbering]
\titlepage
\end{frame}
\usedefaultcanvas
\emptyfooter
\begin{frame}[noframenumbering]{Outline}
\tableofcontents
\end{frame}
\largefooter
\section{First Section}\label{first-section}
\begin{frame}{First slide}
\end{frame}
\end{document}