forked from robjhyndman/ETC3550Slides
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MonashWhite.sty
131 lines (103 loc) · 3.77 KB
/
MonashWhite.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
%% This is file `MonashBlue.sty',
%% Modification to metropolis scheme created for Monash Business School
%% Created by Rob J Hyndman. 28 March 2017
%% This should really be a proper beamer theme, but I have no time...
% UTF8
\usepackage[utf8]{inputenc}
% Plenty of room
\setbeamersize{text margin left=2em,text margin right=2em}
% metropolis options
\metroset{progressbar=foot}
% Monash colours
\usecolortheme{MonashWhite}
\usefonttheme{structurebold}
% Rounded corners on boxes
\useinnertheme{rounded}
% Lets make descriptions and alerts bold
\setbeamerfont{description item}{series=\bfseries}
\setbeamerfont{alerted text}{series=\bfseries}
% Redefine shaded environment if it exists (for R plots)
\ifcsname Shaded\endcsname
\definecolor{shadecolor}{RGB}{225,225,225}
\renewenvironment{Shaded}{\color{black}\begin{snugshade}\color{black}}{\end{snugshade}}
\fi
% Figure placement using textpos
\usepackage{graphicx}
\usepackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}
\def\placefig#1#2#3#4{\begin{textblock}{.1}(#1,#2)\rlap{\includegraphics[#3]{#4}}\end{textblock}}
\def\maxwidth{11.5cm}
\def\maxheight{8cm}
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\def\fullwidth#1{\vspace*{-0.2cm}\par\centerline{\includegraphics[width=20cm]{#1}}}
\def\fullheight#1{\vspace*{-0.2cm}\par\centerline{\includegraphics[height=12cm]{#1}}}
% Clever right hand placement
\newcommand*{\atright}[1]{{%
\unskip\nobreak\hfill\penalty50
\hskip2em\hbox{}\nobreak\hfill#1
\parfillskip=0pt\finalhyphendemerits=0\par}}
% Slow reveal lists
\def\biz{\begin{itemize}[<+-| alert@+>]}
\def\eiz{\end{itemize}}
\def\ben{\begin{enumerate}[<+-| alert@+>]}
\def\een{\end{enumerate}}
% Fix dates
\usepackage[no-weekday]{eukdate}
% A more interesting and tighter font
\usepackage[lf,t]{carlito}
% Square bullets and enumerated items
\setbeamertemplate{items}[square]
% larger squares for enumeration
\defbeamertemplate{enumerate item}{mysquare}
{ \raisebox{-0.ex}{\hbox{%
\usebeamerfont*{item projected}%
\usebeamercolor{enumerate item}%
\vrule width4ex height2.7ex depth.7ex%
\hskip-4ex%
\hbox to4ex{%
\hfil%
\color{LightGrey}\raisebox{.2ex}{\insertenumlabel}%
\hfil}%
}}%
}
[action]
{\setbeamerfont{item projected}{size=\scriptsize}}
\setbeamertemplate{enumerate item}[mysquare]
\setbeamertemplate{itemize item}[square]
\setbeamertemplate{items}[mysquare]
\setbeamertemplate{section in toc}[square]
\setbeamerfont{section number projected}{size=\large}
\setbeamercolor{section number projected}{bg=Orange,fg=white}
\setbeamercolor{section in toc shaded}{fg=DarkYellow}
\setbeamercolor{section in toc}{fg=Orange}
\setbeamertemplate{section in toc shaded}[default][50]
\def\showtoc{\AtBeginSection[]{
\frame<beamer>{
\frametitle{Outline}
\setcounter{tocdepth}{2}\vspace*{0.2cm}
\tableofcontents[currentsection]
}}}
\def\notoc{\AtBeginSection[]{}}
% Monash title page
\setbeamerfont{title}{series=\bfseries,parent=structure,size=\LARGE}
\setbeamertemplate{title page}
{\placefig{-0.01}{-0.01}{width=1.01\paperwidth,height=1.01\paperheight}{MonashTitleSlide}
\begin{textblock}{7.5}(1,2.8)
{\color{white}\raggedright\usebeamerfont{title}\par\inserttitle}
\end{textblock}
\begin{textblock}{7.5}(1,7)
{\color{white}\raggedright{\insertauthor}\\[0.2cm]
\insertdate}
\end{textblock}}
\showtoc
% Reduce vertical space around displayed equations
\usepackage{etoolbox}
\preto\frame{%
\setlength{\abovedisplayskip}{1pt}%
\setlength{\belowdisplayskip}{4pt}%
\setlength{\abovedisplayshortskip}{0pt}%
\setlength{\belowdisplayshortskip}{0pt}}