-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamerthemeexample.sty
108 lines (99 loc) · 3.57 KB
/
beamerthemeexample.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
\RequirePackage{tikz, datetime, textpos}
\yyyymmdddate \renewcommand{\dateseparator}{.}
% new color definitions
\definecolor{MedianBrown}{RGB}{119,95,85}
\definecolor{MedianLightBrown}{RGB}{235,221,195}
\definecolor{MedianLightBlue}{RGB}{148,182,210}
\definecolor{MedianOrange}{RGB}{221,128,71}
\definecolor{MedianLightOrange}{RGB}{216,178,92}
\definecolor{MedianUltraLightOrange}{RGB}{245,236,215}
% set font color
\setbeamercolor*{title page header}{fg=white}
\setbeamercolor*{title}{fg=MedianLightBrown}
\setbeamercolor*{author}{fg=white}
\setbeamercolor*{date}{fg=white}
\setbeamercolor*{item}{fg=MedianOrange}
\setbeamercolor*{frametitle}{fg=MedianBrown}
\setbeamercolor*{block title}{fg=white, bg=MedianOrange}
\setbeamercolor*{block title example}{fg=white, bg=MedianLightOrange}
\setbeamercolor*{block body}{bg=MedianUltraLightOrange}
\setbeamercolor*{block body example}{bg=MedianUltraLightOrange}
\setbeamercolor*{section in toc}{fg=black}
\setbeamercolor*{section page}{fg=white}
% set font sizes
\setbeamerfont{section page}{size=\LARGE}
\setbeamerfont{title}{size=\LARGE}
\setbeamerfont{author}{size=\Large}
\setbeamerfont{date}{size=\Large}
% no navigation symbols
\setbeamertemplate{navigation symbols}{}
% set itemize / toc shapes
\setbeamertemplate{items}[square]
\setbeamertemplate{itemize item}{\tikz{\draw[color=MedianOrange, semithick] rectangle(.2,.2);}}
\setbeamertemplate{itemize subitem}{\tikz{\draw[color=MedianLightBlue, ultra thick] rectangle(.2,.2);}}
\setbeamertemplate{sections/subsections in toc}[square]
% define the backgrounda of the slides
\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\ifnum\thepage>1\relax% Not the title page
\fill[color=MedianOrange] (0,8) rectangle(0.8,8.3);
\fill[color=MedianLightBlue] (0.9,8) rectangle(\the\paperwidth, 8.3);
\else% Title page
\fill[color=MedianBrown] (0,1.2) rectangle (\the\paperwidth,\the\paperheight);
\fill[color=MedianOrange] (0,0.1) rectangle(3.15,1.1);
\fill[color=MedianLightBlue] (3.3,0.1) rectangle(\the\paperwidth,1.1);
\fi
\end{tikzpicture}
}
% define the title page
\setbeamertemplate{title page}{
\begin{textblock*}{12cm}(2.5cm,2.8cm)
\begin{beamercolorbox}[wd=8cm]{title page header}
\usebeamerfont{title}\usebeamercolor{title}\inserttitle%
\end{beamercolorbox}%
\end{textblock*}
\begin{textblock*}{9cm}(-0.5cm,5cm)
\begin{beamercolorbox}{date}
\usebeamerfont{date}\insertdate%
\end{beamercolorbox}
\end{textblock*}
\begin{textblock*}{9cm}(2.5cm,5cm)
\begin{beamercolorbox}{author}
\usebeamerfont{author}\insertauthor%
\end{beamercolorbox}
\end{textblock*}
}
% define the section frame
\newcommand{\sectionframe}{{
\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fill[color=MedianOrange] (0,6) rectangle (1.5, 7);
\fill[color=MedianLightBlue] (1.6, 6) rectangle (\the\paperwidth, 7);
\end{tikzpicture}
}
\frame{\sectionpage}
}}
\setbeamertemplate{section page}{
\vspace{0.5\paperheight}
\begin{beamercolorbox}{frametitle}
\centering{\insertsectionhead}
\end{beamercolorbox}
}
% define a regular frame
\setbeamertemplate{frametitle}{
\vspace{0.3cm}
\begin{beamercolorbox}{frametitle}
\insertframetitle
\end{beamercolorbox}
\vspace{0.5cm}
}
% insert the logo in the top right and remove the logo from the titlepage
\setbeamertemplate{sidebar right}{
\ifnum\thepage>1\relax% Not the title page
\vspace{0.1cm}
\llap{\insertlogo\hskip0.1cm}%
\else
\fi
}