-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamerouterthemeUniversityOfManchester.sty
150 lines (137 loc) · 4.48 KB
/
beamerouterthemeUniversityOfManchester.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
% (Unofficial) University of Manchester Beamer Theme
% Based upon the official PowerPoint styling.
% -------------------------------------------
% Authors: <[email protected]>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Calculate lengths
\newlength{\logowidth}
\newlength{\logoheight}
\newlength{\logopad}
\newlength{\footerpos}
\setlength{\logowidth}{20mm}
\setlength\logoheight{0.4347\logowidth} % 20/46 ~= 0.4347
\setlength\logopad{0.7391\logoheight} % 170/230 ~= 0.7391
\setlength\footerpos\paperwidth
\addtolength\footerpos{-1em}
%% Modify lengths, if compressed
\ifbeamer@compress
\setlength{\logopad}{.5\logopad}
\fi
%% Side Margins
\newlength{\sidemargin}
\setlength{\sidemargin}{0.5\logowidth}
\addtolength{\sidemargin}{\logopad}
\setbeamersize{
text margin left=\sidemargin,
text margin right=\sidemargin,
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Cull the navigation
\defbeamertemplate*{navigation symbols}{UniversityOfManchester}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Headline
\defbeamertemplate*{headline}{UniversityOfManchester}{%
\begin{tikzpicture}[overlay,remember picture]
\node[anchor=north west,yshift=-\logopad,xshift=\logopad]
at (current page.north west) {
\ifthenelse{%
\boolean{beamer@dark} \OR
\( \boolean{beamer@darktitle} \AND \c@framenumber=\beamer@titleframestart \) \OR
\boolean{beamer@darkframe}
}{%
\includegraphics[width=\logowidth]{TAB_allwhite}
}{%
\includegraphics[width=\logowidth]{TAB_col_white_background}
}
};
\end{tikzpicture}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Slide Title Text
\defbeamertemplate*{frametitle}{UniversityOfManchester}{%
\ifbeamer@plainframe%
\vskip.5\logopad
\else%
\vskip3\logopad%
\vskip-\topsep%
\fi%
\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}%
\insertframetitle\par%
\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}%
\insertframesubtitle
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Frame Numbering and Footline
\defbeamertemplate*{footline}{UniversityOfManchester}{%
\ifbeamer@framenumber%
\ifnum\c@framenumber=\beamer@titleframestart\else%
\pgftext[base, right, at=\pgfpoint{\footerpos}{1em}]{%
\usebeamercolor[fg]{framenumber}%
\usebeamerfont{framenumber}%
\insertframenumber{}%
\ifbeamer@totalframenumber%
/\inserttotalframenumber
\fi%
}
\fi
\fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Title Slide
\defbeamertemplate*{title page}{UniversityOfManchester}{%
% This is slide 0
\setcounter{framenumber}{\beamer@titleframestart}
% Skip the required amount of space
\vskip3\logopad%
% Input the title
\usebeamerfont{title}%
\usebeamercolor[fg]{title}%
\begin{minipage}[b][2\baselineskip][b]{\textwidth}%
\raggedright%
\inserttitle%
\end{minipage}
\vskip-.5\baselineskip
%
\begin{pgfpicture}
\pgfsetlinewidth{2pt}
\pgfsetroundcap
\pgfsetdash{{0pt}{4pt}}{0cm}
\pgfpathmoveto{\pgfpoint{0mm}{0mm}}
\pgfpathlineto{\pgfpoint{\textwidth}{0mm}}
\pgfusepath{stroke}
\end{pgfpicture}
\vfill
%
\usebeamerfont{subtitle}%
\begin{minipage}{\textwidth}
\raggedright%
\insertsubtitle%
\end{minipage}\vskip.25\baselineskip
%
\usebeamerfont{author}%
\begin{minipage}{\textwidth}
\raggedright%
\insertauthor%
\end{minipage}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Slide Background
\defbeamertemplate*{background canvas}{UniversityOfManchester}{%
\ifthenelse{%
\boolean{beamer@dark} \OR
\( \boolean{beamer@darktitle} \AND \c@framenumber=\beamer@titleframestart \) \OR
\boolean{beamer@darkframe}
}{%
\begin{tikzpicture}
\path [outer color = uompurple!60!black,
inner color = uompurple]
(0,0) rectangle (\paperwidth,\paperheight);
\end{tikzpicture}%
}{}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%