forked from pazz/beamerthemeWarwick
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbeamerouterthemeWarwick.sty
166 lines (146 loc) · 4.94 KB
/
beamerouterthemeWarwick.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
\mode<presentation>
\setbeamersize{text margin left=1cm,text margin right=1cm}
\newcommand{\warwicklogo}[1]{
\begin{minipage}[t]{#1}
\resizebox{#1}{!}{
\begin{tikzpicture}
\fill[wwmaincolour]
(0.03,0.99cm) --
(1.49cm,0.99cm) --
(1.49cm,0.03) --
(0.03,0.03) --
cycle;
\node[anchor=south west,inner sep=0pt] (logoleft) at (0,0)[]{
\includegraphics[width=1.5cm]{logo-with-descriptor-square}};
\end{tikzpicture}
}
\end{minipage}
}
\newcommand{\gettikzxy}[3]{%
\tikz@scan@one@point\pgfutil@firstofone#1\relax
\edef#2{\the\pgf@x}%
\edef#3{\the\pgf@y}%
}
% Frame title
\defbeamertemplate*{frametitle}{Warwick}[1][]
{
%\vskip0.5cm%
\begin{beamercolorbox}[wd=\paperwidth,ht=1.5cm]{frametitle}
\begin{tikzpicture}
\useasboundingbox[fill=white](0,-0.5) rectangle(\the\paperwidth,\the\paperheight);
\node (A) at (\the\paperwidth,\the\paperheight){};
\gettikzxy{(A)}{\ax}{\ay}
\if@doWarwickMain{
\if@doExternal{
\fill [wwsurroundcolour]
(0,\the\paperheight) --
(\the\paperwidth,\the\paperheight) --
(\the\paperwidth,0.7cm-0.099\paperwidth) --
(0,0.7cm-0.099\paperwidth) --
cycle;}
\else{
\fill [wwsurroundcolour]
(0,\the\paperheight) --
(\the\paperwidth,\the\paperheight) --
(\the\paperwidth,0.7cm-0.075\paperwidth) --
(0,0.7cm-0.075\paperwidth) --
cycle;}
\fi
}
\else{
\fill [wwsurroundcolour]
(0,\the\paperheight) --
(\the\paperwidth,\the\paperheight) --
(\the\paperwidth,0.7cm-0\paperwidth) --
(0,0.7cm-0\paperwidth) --
cycle;
}
\fi
\node[anchor=north west,inner sep=0pt] (logoleft) at (-0.01,0.7)[]{
\includegraphics[width=1.001\paperwidth]{logo-with-descriptor}};
% \node[fill] (A) at (\ax-2.5cm+1.3cm,0){};
\ifx\insertframesubtitle\@empty%
{\node[anchor=west, font=\Large] at (15pt,0){\insertframetitle};}
\else%
{\node[anchor= west, font=\large] at (15pt,0.2){\insertframetitle};%
\node[anchor= west, font=\small] at (1.5,-0.2){\insertframesubtitle};}%
\fi
\end{tikzpicture}
\end{beamercolorbox}
%\vskip0.3cm%
}
\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\ifnum\thepage>1\relax%
\ifbeamercolorempty[bg]{background canvas}{}{\color{bg}}%
\fill[wwsurroundcolour!0] (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fi
\end{tikzpicture}
}
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\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%
}
% % Title page
\defbeamertemplate*{title page}{Warwick}[1][]
{
\begin{beamercolorbox}[wd=\paperwidth,ht=1.8cm]{frametitle}
\begin{tikzpicture}
\useasboundingbox[fill=white](0,-1) rectangle(\the\paperwidth,\the\paperheight);
\node (A) at (\the\paperwidth,\the\paperheight){};
\gettikzxy{(A)}{\ax}{\ay}
\if@doWarwickFront{
\if@doExternalFront{
\fill [wwsurroundcolour]
(0,\the\paperheight) --
(\the\paperwidth,\the\paperheight) --
(\the\paperwidth,0.7cm-0.099\paperwidth) --
(0,0.7cm-0.099\paperwidth) --
cycle;}
\else{
\fill [wwsurroundcolour]
(0,\the\paperheight) --
(\the\paperwidth,\the\paperheight) --
(\the\paperwidth,0.7cm-0.075\paperwidth) --
(0,0.7cm-0.075\paperwidth) --
cycle;}
\fi
}
\else{
\fill [wwsurroundcolour]
(0,\the\paperheight) --
(\the\paperwidth,\the\paperheight) --
(\the\paperwidth,0.7cm-0\paperwidth) --
(0,0.7cm-0\paperwidth) --
cycle;
}
\fi
\node[anchor=north west,inner sep=0pt] (logoleft) at (-0.01,0.7)[]{
\includegraphics[width=1.001\paperwidth]{logo-with-descriptor}};
\end{tikzpicture}
\end{beamercolorbox}
%%%%%%%%%%%%%%%%%%%%%
\begin{beamercolorbox}[sep=8pt,center,#1]{title}
\usebeamerfont{title}\inserttitle\par%
\end{beamercolorbox}%
% \vskip0.05cm%
\begin{beamercolorbox}[sep=8pt,center,#1]{author}
\usebeamerfont{author}\insertauthor%
\end{beamercolorbox}
% \vskip0.05cm%
\begin{beamercolorbox}[center,#1]{date}
\usebeamerfont{author}\insertdate%
\end{beamercolorbox}
\vfill
}
\mode<all>