-
Notifications
You must be signed in to change notification settings - Fork 3
/
beamerthemeedmaths.sty
167 lines (145 loc) · 6.19 KB
/
beamerthemeedmaths.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
%% Package `edmaths' v0.99
%% File beamerthemeedmaths.sty
%% Copyright 2024 Josh Fogg
%%
%% beamerthemeedmaths.sty is a LaTeX style file for typesetting presentations
%% for the School of Mathematics at the University of Edinburgh, part of the
%% more general `edmaths' package. See README.md for usage instructions.
%%
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3 of this license or (at
%% your option) any later version.
%%
%% The latest version of this license is in http://latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained' and the current
%% maintainer of this work is Josh Fogg. Originally written by Saturnino Luz
%% for the Usher Institute and made generic to UoE by Ben Brown.
%%
%% This work consists of the files beamerthemeedmaths.sty, but in addition
%% requires images `white-tied-in' and `edinburgh-logo' to compile. The images
%% distributed with this work in the `edmaths' package are registered trademarks;
%% they are not to be used as part of derived or independent works without the
%% permission of The University of Edinburgh. This does not affect use as part
%% of compiled LaTeX documents using this style for the university.
\ProvidesPackage{beamerthemeedmaths}[2024-08-30 Edinburgh maths beamer theme v0.99]
\RequirePackage{amsfonts,graphicx,lmodern,mathptmx}
% Colour definitions to choose between
\definecolor{UoEblue}{RGB}{0,50,95} % #00325F
\definecolor{UoEcyan}{RGB}{69, 126, 129} % #457E81
\definecolor{UoEgreen}{RGB}{156, 154, 0} % #9C9A00
\definecolor{UoEgray}{RGB}{.392, .329, .329} % VARIES
\definecolor{UoEorange}{RGB}{204, 89, 17} % #CC5911
% Define colour command for use through rest of theme
\newcommand{\beamer@UoE@color}{UoEblue}
\DeclareOptionBeamer{colour}{\def\beamer@UoE@color{#1}}
% Change title height to fit styling
\newdimen\beamer@UoE@titleheight
\beamer@UoE@titleheight=10ex
\DeclareOptionBeamer{theight}{\beamer@UoE@titleheight=#1}
% Resolution is 9:5 (approx), as in ppt template
\geometry{paperwidth=25.40cm, paperheight=19.05cm}
\ProcessOptionsBeamer
\newcommand\crule[3][\beamer@UoE@color]{\textcolor{#1}{\rule{#2}{#3}}}
\setbeamerfont{title}{series=\bfseries,size=\fontsize{32}{36}}%
\setbeamerfont{subtitle}{size=\fontsize{24}{28}}
\setbeamerfont{author}{size={\fontsize{20}{24}}}
\setbeamerfont{institute}{size=\fontsize{22}{26}}
\setbeamerfont{pagexofy}{size=\tiny}
\setbeamerfont{caption}{size=\Large}
\setbeamerfont{frametitle}{family=\sffamily,series=\bfseries,size={\fontsize{23}{26}}}
\setbeamerfont{itemize item}{family=\sffamily,size={\fontsize{16}{18}}}
\setbeamerfont{itemize subitem}{family=\sffamily,size={\fontsize{16}{18}}}
\setbeamertemplate{itemize/enumerate body begin}{\fontsize{16}{19}\selectfont}
\setbeamertemplate{itemize/enumerate subbody begin}{\fontsize{16}{19}\selectfont}
\AtBeginDocument{\fontsize{18}{19}\selectfont}
%\setbeamertemplate{items}[ball]
\setbeamertemplate{navigation symbols}{}
\pgfdeclareimage[width=14.69cm]{white-tied-in}{images/white-tied-in}
\pgfdeclareimage[width=4.65cm]{edinburgh-logo}{images/edinburgh-logo}
\pgfdeclareimage[width=1.25cm]{little=u}{images/edinburgh-logo}
\setbeamerfont{alerted text}{series=\bfseries}
\setbeamercolor{alerted text}{fg=\beamer@UoE@color!80!black}
\setbeamercolor{title}{fg=black}
\setbeamercolor{normal text}{fg=black}
\setbeamertemplate{itemize item}{\color{\beamer@UoE@color}$\bullet$}
\setbeamertemplate{itemize subitem}{\color{\beamer@UoE@color}$\circ$}
\newcommand{\SetUoETitleMargin}[1]{\beamer@UoE@titleheight=#1}
\newcommand{\SetUoETitleHeight}[1]{\beamer@UoE@titleheight=#1}
\newlength\barheight\setlength\barheight{\paperheight}
\divide\barheight by 12
\setbeamertemplate{title page}{
\raggedright
% TITLE
{\usebeamerfont{title}\textcolor{white}\inserttitle\par~}
% SUBTITLE
\ifx\insertsubtitle\@empty
\else%
\\[1ex]
{\usebeamerfont{subtitle}\textcolor{white}\insertsubtitle}
\fi
\\[6ex]
% AUTHOR
{\usebeamerfont{author}\textcolor{white}\insertauthor}
\ifx\insertinstitute\@empty
\else%
\\[3ex]
{\\\usebeamerfont{institute}\textcolor{white}\insertinstitute}
\fi
% DATE
\ifx\insertdate\empty
\else%
\\[1ex]
\usebeamerfont{date}\textcolor{white}{\insertdate}
\fi
}
\setbeamertemplate{background}{
\setlength{\unitlength}{1cm}
\begin{picture}(25.4,19.05)(0,0)
% on first slide add UoE text logo across bottom left
\ifnum\c@framenumber=1%
\put(-.1, 0){\crule[\beamer@UoE@color]{25.4cm}{19.05cm}}
\put(0.44, 0.1){\pgfuseimage{white-tied-in}}
% on ever other slide add UoE logo at top of blue sidebar
\else%
\put(23.5, 0){\crule[\beamer@UoE@color]{1.80cm}{19.05cm}}
\put(23.65, 17.3){\includegraphics[width=1.45cm,height=1.45cm]{images/edinburgh-logo}}
\fi%
% add slide numbering to bottom right
\ifnum\c@framenumber<10%
\put(23.7,0.3){\centering\Large\color{white}{\phantom{0}\insertframenumber/\inserttotalframenumber}}
\else
\put(23.7,0.3){\centering\Large\color{white}{\insertframenumber/\inserttotalframenumber}}
\fi%
\end{picture}
}
% Default slide formatting
\setbeamertemplate{frametitle}{
% if not the starting fram, add a top margin
\ifnum\c@framenumber=1%
\empty%
\else
\vspace*{\beamer@UoE@titleheight}
\fi
% use the title colour from this class
\usebeamercolor[fg]{title}
% handle situation where there's no subtitle
\ifx\insertframesubtitle\@empty
\usebeamerfont{frametitle}{\insertframetitle}
\else
\usebeamerfont{frametitle}{\insertframetitle:~{\normalfont\insertframesubtitle}}
\fi
% ensures spacing after the title
\vspace*{1em}
}
%\newcommand{\UoEsettitleheight}[1]{\makeatletter\beamer@UoE@titleheight=#1\makeatother}
\setbeamersize{text margin left=2cm,text margin right=2.5cm}
% Ensures images are compressed when brought in by PDF
\pdfcompresslevel=9
\pdfobjcompresslevel=3
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "sample"
%%% End: