-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbeamerouterthemeage.sty
157 lines (136 loc) · 5.54 KB
/
beamerouterthemeage.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
% See the file LICENSE.md for more details.
% tikz for drawing the frame title
\RequirePackage{tikz}
% optionally remove headline
\newif\ifbeamer@noheadline
\DeclareOptionBeamer{noheadline}{\beamer@noheadlinetrue}
\ProcessOptionsBeamer
% re-define the logo command
\renewcommand{\logo}[1]{\def\beamer@logo{#1}}
% Set the default value
\logo{}
\mode<presentation>
\beamer@compresstrue
\AtBeginDocument{
{
\ifbeamer@noheadline%
\else%
\usebeamerfont*{headline}
\colorlet{global.bg}{bg}
\usebeamercolor{section in head/foot}
\usebeamercolor{frametitle}
\pgfdeclareverticalshading{beamer@barshade}{\the\paperwidth}{%
color(0ex)=(section in head/foot.bg);%
color(6ex)=(section in head/foot.bg)%
}
\pgfdeclareverticalshading{beamer@aboveframetitle}{\the\paperwidth}{%
color(0ex)=(frametitle.bg);%
color(1ex)=(frametitle.bg);%
color(1ex)=(section in head/foot.bg)
}
\begingroup
\selectcolormodel{gray}
\pgfdeclareverticalshading{beamer@belowframetitle}{\the\paperwidth}{%
color(0ex)=(pgftransparent!100);%
color(1ex)=(pgftransparent!0)
}
\pgfdeclarefading{beamer@belowframetitlemask}{\pgfuseshading{beamer@belowframetitle}}
\endgroup
\fi%
}
}
% Navigation symbols
\defbeamertemplate*{navigation symbols}{}
% footline and headline
\setbeamercolor*{author in head/foot}{parent=palette primary,bg=secondary}
\setbeamercolor*{date in head/foot}{parent=palette primary,bg=secondary}
\setbeamercolor*{title in head/foot}{parent=palette secondary,bg=secondary}
\setbeamercolor*{page number in head/foot}{parent=palette primary,bg=secondary}
\setbeamercolor*{section in head/foot}{parent=palette tertiary,bg=k50}
\setbeamercolor*{subsection in head/foot}{parent=palette primary}
\setbeamertemplate{page number in head/foot}[totalframenumber]%
\defbeamertemplate*{footline}{age theme}
{%
\ifnum\theframenumber=1%
\else%
\begin{beamercolorbox}[colsep=1pt]{upper separation line foot}
\end{beamercolorbox}
\leavevmode%
\begin{beamercolorbox}[wd=0.3\paperwidth,ht=2.25ex,dp=1ex,left,leftskip=1ex]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~|~%
\usebeamerfont{date in head/foot}\insertshortdate{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=0.4\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=0.3\paperwidth,ht=2.25ex,dp=1ex,right,rightskip=1ex]{page number in head/foot}%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\usebeamertemplate{page number in head/foot}%
\end{beamercolorbox}%
\fi%
\vskip0pt%
}%
\defbeamertemplate*{headline}{age theme}
{%
\ifbeamer@noheadline%
\else\ifnum\theframenumber=1%
\else%
\pgfuseshading{beamer@barshade}%
\vskip-0.05ex%
\begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=0ex]{empty}
\begin{pgfpicture}
\begin{pgfscope}%
\pgfsetfillcolor{section in head/foot.bg}%
\pgfpathrectangle{\pgfpoint{-.5\paperwidth}{-0.5ex}}{\pgfpoint{\paperwidth}{1ex}}%
\pgfsetfading{beamer@belowframetitlemask}{}%
\pgfusepath{fill}%
\end{pgfscope}%
\end{pgfpicture}%
\end{beamercolorbox}%
\vskip-6.85ex%
\begin{beamercolorbox}[ignorebg,ht=2.25ex,dp=2.5ex]{section in head/foot}
\insertnavigation{\paperwidth}
\end{beamercolorbox}%
\fi\fi%
\vskip0pt%
}%
% Frame title
\defbeamertemplate*{frametitle}{age theme}
{%
\vskip-1pt%
\hbox{\leavevmode
\hskip-\Gm@lmargin%
\hbox{%
\usebeamerfont{frametitle}%
\begin{tikzpicture}%
% Draw the background rectangle
\fill[k20] (current page.north west) rectangle ([shift={(0,-3.0ex)}]current page.north east);%
% Manually specify the bounding box
\useasboundingbox (current page.north west) rectangle ([shift={(0,-3.0ex)}]current page.north east);%
% Draw hysteresis
\draw[line width=2pt, color=primary] ([shift={(0.2\paperwidth,0)}]current page.north west) -- ([shift={(0.2\paperwidth,-3.0ex)}]current page.north west);%
\draw[line width=2pt, color=primary] ([shift={(0.9\paperwidth,0)}]current page.north west) -- ([shift={(0.9\paperwidth,-3.0ex)}]current page.north west);%
\draw[line width=2pt, color=primary] ([shift={(0,-3.0ex+1pt)}]current page.north west) -- ([shift={(0.9\paperwidth,-3.0ex+1pt)}]current page.north west);%
\draw[line width=2pt, color=primary] ([shift={(0.2\paperwidth,-1pt)}]current page.north west) -- ([shift={(\paperwidth,-1pt)}]current page.north west);%
% Add text
\node[anchor=center, align=center, primary] at ([xshift=0.55\paperwidth,yshift=-1.5ex]current page.north west) {\expandafter\ifblank\expandafter{\beamer@frametitle}{\insertshorttitle}{\beamer@frametitle}};%
% Add logos
\node[anchor=center, align=center] at ([xshift=0.1\paperwidth,yshift=-1.5ex+1pt]current page.north west) {\includegraphics[width=0.19\paperwidth]{logos/unikassel.pdf}};%
\node[anchor=center, align=center] at ([xshift=0.95\paperwidth,yshift=-1.5ex-1pt]current page.north west) {\beamer@logo};%
\end{tikzpicture}%
}%
}
\ifdefempty{\insertframesubtitle}%
{}%
{% else
\hbox{\leavevmode%
\usebeamerfont{framesubtitle}%
\begin{beamercolorbox}[wd=\textwidth,ht=2.25ex,dp=1ex,left]{framesubtitle}%
\usebeamerfont{framesubtitle}\insertframesubtitle%
\end{beamercolorbox}}%
}%
\vskip0pt%
}
\mode
<all>