/
beamerouterthemeuuplain.sty
199 lines (145 loc) · 5.17 KB
/
beamerouterthemeuuplain.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
\RequirePackage{svnrev}
\ProvidesPackageSVN $Id: beamerouterthemeuuplain.sty 15 2006-02-07 10:29:27Z adam $
% Copyright 2005 by uubeamer developers <uubeamer@cs.uu.nl>
%
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt.
\RequirePackage{calc}
\RequirePackage{uucorporatecolors}[2005/03/28]
%%Define variables
\newdimen\beamer@sidebarwidth
\newif\ifbeamer@navbar
\beamer@navbartrue
\DeclareOptionBeamer{navbar}[true]{\csname beamer@navbar#1\endcsname}
\newif\ifbeamer@displaysidebar
\beamer@displaysidebartrue
\DeclareOptionBeamer{sidebar}[false]{\csname beamer@displaysidebar#1\endcsname}
\newif\ifbeamer@showpagenr
\beamer@showpagenrtrue
\DeclareOptionBeamer{showpagenr}[true]{\csname beamer@showpagenr#1\endcsname}
\ProcessOptionsBeamer
\mode<presentation>
\ifbeamer@displaysidebar
\beamer@sidebarwidth=1.5cm
\pgfdeclareimage[height=8mm]{UUlogo}{UU_logo_fullcolor_uncoated_sol_left}
\else
\beamer@sidebarwidth=0cm
\pgfdeclareimage[height=8mm]{UUlogo}{UU_logo_fullcolor_uncoated_sol_right}
\fi
\typeout{sidebar\the\beamer@sidebarwidth}
% Local shortcuts
\colorlet{ICSyellow}{uuyellow!20!white}
% Structural color
\setbeamercolor{structure}{fg=uuxred}
\colorlet{beamerstructure}{uuxred}
% Background with circle
\usebackgroundtemplate{%
\begin{pgfpicture}{0cm}{0cm}{\the\paperwidth}{\the\paperheight}
% Do some clipping first
% Very annoying otherwise with psnup
% Next, fill background with ICSyellow
\pgfsetcolor{ICSyellow}
\pgfpathrectangle{\pgfpoint{0cm}{0cm}}{\pgfpoint{\the\paperwidth}{\the\paperheight}}
\pgfusepath{clip,fill}
% This has to be dependent on variable
% if sidebar is to be shown, move everything
% bit to the left
\pgfsetcolor{white}
\pgfpathcircle{\pgfpoint{-175mm-\beamer@sidebarwidth}{+8cm}}{30cm}
\pgfusepath{fill}
\ifbeamer@displaysidebar
\pgftext[at=\pgfpointxy{12.723187}{0.4},right,base]{\pgfuseimage{UUlogo}}
\else
\pgftext[at=\pgfpointxy{11.923187}{0.4},right,base]{\pgfuseimage{UUlogo}}
\fi
\end{pgfpicture}
}
\useheadtemplate{}
\usefoottemplate{}
%\beamertemplatenavigationsymbolshorizontal
\beamertemplatelargeframetitle
\useitemizeitemtemplate{\tiny\raise1.5pt\hbox{\color{beamerstructure}$\blacktriangleright$}}
\usesubitemizeitemtemplate{\tiny\raise1.5pt\hbox{\color{beamerstructure}\textbullet}}
\usesubsubitemizeitemtemplate{\tiny\raise1.5pt\hbox{\color{beamerstructure}\textbullet}}
%\defbeamertemplate{headline}{sidebar theme}{}
\def\beamer@sidebarformat#1#2#3{%
\begin{beamercolorbox}[wd=\beamer@sidebarwidth,leftskip=#1,rightskip=1ex plus1fil,vmode]{#2}
\vbox{}%
#3\par%
\vbox{}%
\vskip-1.5ex%
\end{beamercolorbox}
}
\defbeamertemplate*{section in sidebar}{sidebar theme}
{%
\vbox{%
\vskip1ex%
\beamer@sidebarformat{-5pt}{section in sidebar}{\insertsectionhead}%
}%
}
\defbeamertemplate*{section in sidebar shaded}{sidebar theme}
{%
\vbox{%
\vskip1ex%
\beamer@sidebarformat{-5pt}{section in sidebar shaded}{\insertsectionhead}%
}%
}
\defbeamertemplate*{subsection in sidebar}{sidebar theme}
{%
\beamer@sidebarformat{-3pt}{subsection in sidebar}{\insertsubsectionhead}%
}
\defbeamertemplate*{subsection in sidebar shaded}{sidebar theme}
{%
\beamer@sidebarformat{-3pt}{subsection in sidebar shaded}{\insertsubsectionhead}%
}
\ifbeamer@displaysidebar
% Sidebar
\setbeamersize{sidebar width right=\beamer@sidebarwidth}
\defbeamertemplate*{sidebar right}{sidebar theme}
{
\beamer@tempdim=\beamer@sidebarwidth%
\advance\beamer@tempdim by -6pt%
\vskip2cm
\insertverticalnavigation{\beamer@sidebarwidth}%
\vfill
%Possible page numbers
\ifbeamer@showpagenr
\beamer@sidebarformat{5pt}{}{\hfill\insertframenumber\hskip1em\hfill}%
\fi
}%
% Margins
\setbeamersize{text margin left=0.5cm,text margin right=0.5cm}
\else
% Make sure to override the default!!
\userightsidebartemplate{0cm}{
\ifbeamer@showpagenr
% if no sidebar is used, but
% showpagenr=true, then we need to
% display pagenumber still
\vfill
% would be nice to have something like -\beamer@sidebarwidth,
% this is not working now
% This would mean that pagenumbering is always at same place
% \hskip -\beamer@sidebarwidth
\hskip -1.5cm
\begin{beamercolorbox}[wd=1.5cm,leftskip=5pt,rightskip=1ex plus1fil,vmode]{}
\vbox{}%
\hfill\insertframenumber\hskip1em\hfill\par%
\vbox{}%
\vskip-1.5ex%
\end{beamercolorbox}
\fi
}
\fi
\ifbeamer@navbar
%no width, we only need to place the
%navigation symbols on the bottom
\useleftsidebartemplate{0cm}{%
\vfill%
\beamertemplatenavigationsymbolshorizontal
\insertnavigationsymbols%
\hfill%
}
\fi
\mode<all>