-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaaltoslides.cls
202 lines (182 loc) · 7.52 KB
/
aaltoslides.cls
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
200
201
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{aaltoslides}
%Pass your school to aaltologo with
%\PassOptionsToPackage{ELEC}{aaltologo} in your master slides
\RequirePackage{aaltologo}
\RequirePackage{graphicx,color}
\LoadClass{beamer}
\logo{}
\newcommand{\smalllogo}{}
\newcommand{\largelogo}{}
\newcommand\aaltofootertext[3]{\def\footfrow{#1}\def\footsrow{#2}\def\foottrow{#3}}
\aaltofootertext{}{}{}
\newif\iffooter\footertrue
\newif\ifnormaltitle\normaltitlefalse
% AALTO COLORS DEFINED IN AALTOLOGO
% LENGTHS
\newlength\aaltofooterplace \setlength\aaltofooterplace{8.5cm}
\newlength\aaltofooterruleheight \setlength\aaltofooterruleheight{2.5pt}
\newlength\aaltofooterrulewidth \setlength\aaltofooterrulewidth{12cm}
\newlength\aaltotitleboxplace \setlength\aaltotitleboxplace{0cm}
\newlength\aaltotitleboxheight \setlength\aaltotitleboxheight{5cm}
\newlength\aaltotitleboxwidth \setlength\aaltotitleboxwidth{12cm}
\newlength\aaltotitlesep \setlength\aaltotitlesep{0.3cm}
\newlength\aaltotitleentrysep \setlength\aaltotitleentrysep{0.2cm}
\newlength\largelogoheight \setlength\largelogoheight{1.5cm}
\newlength\smalllogoheight \setlength\smalllogoheight{0.5cm}
\newcommand\largelogoscale{0.3}
\newcommand\smalllogoscale{0.3}
% OPTIONS
% Primary color
\DeclareOption{first=yellow}{\definecolor{primarycolor}{named}{aaltoYellow}}
\DeclareOption{first=red}{\definecolor{primarycolor}{named}{aaltoRed}}
\DeclareOption{first=blue}{\definecolor{primarycolor}{named}{aaltoBlue}}
\DeclareOption{first=gray}{\definecolor{primarycolor}{named}{aaltoGray}}
\DeclareOption{first=lgreen}{\definecolor{primarycolor}{named}{aaltoLightGreen}}
\DeclareOption{first=dgreen}{\definecolor{primarycolor}{named}{aaltoGreen}}
\DeclareOption{first=purple}{\definecolor{primarycolor}{named}{aaltoPurple}}
\DeclareOption{first=magenta}{\definecolor{primarycolor}{named}{aaltoMagenta}}
\DeclareOption{first=orange}{\definecolor{primarycolor}{named}{aaltoOrange}}
\DeclareOption{first=lorange}{\definecolor{primarycolor}{named}{aaltoLightOrange}}
% Secondary color
\DeclareOption{second=yellow}{\definecolor{secondarycolor}{named}{aaltoYellow}}
\DeclareOption{second=red}{\definecolor{secondarycolor}{named}{aaltoRed}}
\DeclareOption{second=blue}{\definecolor{secondarycolor}{named}{aaltoBlue}}
\DeclareOption{second=gray}{\definecolor{secondarycolor}{named}{aaltoGray}}
\DeclareOption{second=lgreen}{\definecolor{secondarycolor}{named}{aaltoLightGreen}}
\DeclareOption{second=dgreen}{\definecolor{secondarycolor}{named}{aaltoGreen}}
\DeclareOption{second=purple}{\definecolor{secondarycolor}{named}{aaltoPurple}}
\DeclareOption{second=magenta}{\definecolor{secondarycolor}{named}{aaltoMagenta}}
\DeclareOption{second=orange}{\definecolor{secondarycolor}{named}{aaltoOrange}}
\DeclareOption{second=lorange}{\definecolor{secondarycolor}{named}{aaltoLightOrange}}
% Logo
\DeclareOption{logo=yellowexc}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{!}{aaltoYellow}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{!}{aaltoYellow}}
}
\DeclareOption{logo=yellowquo}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{''}{aaltoYellow}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{''}{aaltoYellow}}
}
\DeclareOption{logo=yellowque}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{?}{aaltoYellow}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{?}{aaltoYellow}}
}
\DeclareOption{logo=redexc}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{!}{aaltoRed}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{!}{aaltoRed}}
}
\DeclareOption{logo=redquo}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{''}{aaltoRed}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{''}{aaltoRed}}
}
\DeclareOption{logo=redque}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{?}{aaltoRed}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{?}{aaltoRed}}
}
\DeclareOption{logo=blueexc}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{!}{aaltoBlue}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{!}{aaltoBlue}}
}
\DeclareOption{logo=bluequo}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{''}{aaltoBlue}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{''}{aaltoBlue}}
}
\DeclareOption{logo=blueque}{%
\renewcommand{\largelogo}{\AaltoLogoLarge{\largelogoscale}{?}{aaltoBlue}}
\renewcommand{\smalllogo}{\AaltoLogoSmall{\smalllogoscale}{?}{aaltoBlue}}
}
\DeclareOption{logo=random}{%
\renewcommand{\largelogo}{\AaltoLogoRandomLarge{\largelogoscale}}
\renewcommand{\smalllogo}{\AaltoLogoRandomSmall{\smalllogoscale}}
}
% Other options
\DeclareOption{nofoot}{\footerfalse}
\DeclareOption{nologo}{\renewcommand{\largelogo}{\vspace{\largelogoheight}}\renewcommand{\smalllogo}{}}
\DeclareOption{normaltitle}{\normaltitletrue}
\ExecuteOptions{first=purple,second=blue,logo=redexc}
\ProcessOptions
\newcommand{\aaltosl@name}{aaltoslides}
\newcommand{\aaltosl@date}{Feb 21, 2016}
\newcommand{\aaltosl@version}{Version 2.0}
\newcommand{\aaltosl@id}{\aaltosl@version\space (\aaltosl@date)}
\typeout{********************************************************^^J%
'\aaltosl@name'\space Document Class\space\aaltosl@id^^J%
Author: Kimmo Jarvinen ([email protected])^^J%
^^J%
Last modified by Marko Kosunen ([email protected])^^J%
********************************************************^^J%
}
% SOME CUSTOMIZATION
\setbeamertemplate{navigation symbols}{} % Remove navigation symbols
\setbeamertemplate{frametitle continuation}[from second]
\setbeamersize{text margin left=1cm, text margin right=1cm}
\iffooter\setbeamertemplate{footline}{\vspace{1.1cm}}\fi % B. Brumley's fix to the "text too low problem"
% Set fonts
\renewcommand{\rmdefault}{phv} % Helvetica (resembles Arial)
\renewcommand{\sfdefault}{phv} % Helvetica (resembles Arial)
\setbeamerfont{title}{size=\Large, series=\bfseries}
\setbeamerfont{frametitle}{size=\Large, series=\bfseries}
% Set colors
\setbeamercolor{structure}{fg=primarycolor}
\setbeamercolor{alerted text}{fg=secondarycolor}
\setbeamercolor{example text}{fg=secondarycolor}
%%BLOCK
\setbeamercolor{block title}{fg=white,bg=secondarycolor!75}
\setbeamercolor{block body}{fg=black,bg=secondarycolor!10}
% FOOTER
\usebackgroundtemplate{
\iffooter
\begin{minipage}{\paperwidth}
\begin{center}
\vspace{\aaltofooterplace}
{\color{primarycolor}\rule{\aaltofooterrulewidth}{\aaltofooterruleheight}}
\end{center}
\vspace{-0.65cm}
\flushleft\hspace{0.40cm}\mbox{\smalllogo}
\vspace{-0.9cm}
\begin{flushright}
\Tiny \bfseries
\footfrow \qquad \ \, \phantom{0} \\
{\color{gray} \footsrow \qquad \ \, \phantom{0} \\
\foottrow \qquad \ \, \phantom{0} \\}
\end{flushright}
\end{minipage}
\fi
}
% TITLEPAGE
\ifnormaltitle
% More traditional title page
\newcommand{\aaltotitleframe}{
{\usebackgroundtemplate{}
\frame{
\vspace{0.6cm}
\largelogo
\vspace{0.3cm}
\titlepage
}}}
\else
% Aalto-style title page
\newcommand{\aaltotitleframe}{
{\usebackgroundtemplate{
\begin{minipage}{\paperwidth}
\vspace{0.8cm}
\hspace{0.5cm}
\mbox{\largelogo}
\vspace{\aaltotitleboxplace}
\begin{center}
{\color{primarycolor}\rule{\aaltotitleboxwidth}{\aaltotitleboxheight}}
\end{center}
\end{minipage}
}
\frame[t]{
\vspace{1.2cm}
\vspace{\largelogoheight}
{\color{white}
{\bfseries \Large \inserttitle} \\[\aaltotitlesep]
\insertauthor \\[\aaltotitleentrysep]
\footnotesize \insertinstitute \\[\aaltotitleentrysep]
\insertdate
}}
}}
\fi