-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamerouterthemerudi.sty
92 lines (80 loc) · 3.31 KB
/
beamerouterthemerudi.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
% ======================================================================
% ======================================================================
% ======================================================================
%
% UNOFFICIAL style for beamer presentations at RU-DI
% Radboud University, Donders Institute,
% Nijmengen, Netherlands
%
% Author: Pierre Guetschel <[email protected]>
% Date: Oct 2022
% Instructions:
% - to create the title page, use: \titleframe
% - to create a section page, use: \sectionframe
%
% Inspirations:
% - https://tex.stackexchange.com/questions/146529/design-a-custom-beamer-theme-from-scratch
% -
%
% ======================================================================
% ======================================================================
% ======================================================================
%%%%%%%%%%%%%%%%%% HEADLINE (logo) %%%%%%%%%%%%%%%%%%
\newlength{\logoheight}
\setlength{\logoheight}{1cm}
%\logo{\includegraphics[width=.1\textwidth]{logo_rudi-notext.pdf}}
\defbeamertemplate*{headline}{rudi}
{
\hfill
\ifnum \ifinsectionframe 1 \else \ifintitleframe 1 \else 0 \fi\fi=1 % if in_title_frame OR in_section_frame
\includegraphics[height=\logoheight]{logo_rudi.pdf}
\else
\includegraphics[height=\logoheight]{logo_rudi-notext.pdf}
\fi
\vspace{-\logoheight}
\hspace{-1ex}
}
%%%%%%%%%%%%%%%%%% FOOTLINE (logo) %%%%%%%%%%%%%%%%%%
\newlength{\footlogoheight}
\setlength{\footlogoheight}{.2cm}
\defbeamertemplate*{footline}{rudi}
{
\ifnum \ifinsectionframe 1 \else \ifintitleframe 1 \else 0 \fi\fi=1 % if in_title_frame OR in_section_frame
{}
\else
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
\fi
}
%%%%%%%%%%%%%%%%%% SIDEBAR %%%%%%%%%%%%%%%%%%
\newlength{\sidebarunit}
\setlength{\sidebarunit}{1.5mm}
\newcommand*{\sidebarwidth}{3\sidebarunit}
\setbeamersize{sidebar width left=\sidebarwidth}
\defbeamertemplate*{sidebar canvas left}{rudi}
{
\ifinsectionframe
{}
\else
\ifintitleframe
{}
\else
\begin{tikzpicture}[remember picture,overlay]%
\node[fill=rudi-bright-red, rectangle, anchor=north west, minimum width=3\sidebarunit, minimum height=\paperheight, inner sep=0ex, inner ysep=0ex, outer sep=0ex, outer ysep=0ex] (first band) at (current page.north west) {};%
\node[fill=rudi-ru-red, rectangle, anchor=north west, minimum width=2.6\sidebarunit, minimum height=\paperheight, inner sep=0ex, inner ysep=0ex, outer sep=0ex, outer ysep=0ex] (second band) at (current page.north west) {};%
\node[fill=rudi-dark-red, rectangle, anchor=north west, minimum width=1.6\sidebarunit, minimum height=\paperheight, inner sep=0ex, inner ysep=0ex, outer sep=0ex, outer ysep=0ex] (third band) at (current page.north west) {};%
\end{tikzpicture}%
\fi\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%