-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsotonbrand.sty
208 lines (194 loc) · 6.97 KB
/
sotonbrand.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
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
202
203
204
205
206
207
208
\newif\ifblacktitle
\newif\iflogofirst
\logofirstfalse
\definecolor{plainblack}{HTML}{231F20}
\definecolor{richblack}{HTML}{00131D}
\definecolor{neutral1}{HTML}{495961}
\definecolor{neutral2}{HTML}{758D9A}
\definecolor{neutral3}{HTML}{9FB1BD}
\definecolor{neutral4}{HTML}{E1E8EC}
\definecolor{marine1}{HTML}{005c84}
\definecolor{marine2}{HTML}{74C9E5}
\definecolor{marine3}{HTML}{3CBAC6}
\definecolor{marine4}{HTML}{B3DBD2}
\definecolor{marine5}{HTML}{4BB694}
\definecolor{marine6}{HTML}{C1D100}
\definecolor{horizon1}{HTML}{FCBC00}
\definecolor{horizon2}{HTML}{EF7D00}
\definecolor{horizon3}{HTML}{E73037}
\definecolor{horizon4}{HTML}{D5007F}
\definecolor{horizon5}{HTML}{8D3970}
\newcommand{\sotonlogofirst}{
\logofirsttrue
}
\newcommand{\usesotonslide}[2]{
\defineblockstyle{SotonSlide}{
titlewidthscale=1, bodywidthscale=1, titleleft,
titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=0pt,
bodyverticalshift=0pt, roundedcorners=0, linewidth=0pt, titleinnersep=1cm,
bodyinnersep=1cm
}{
\ifBlockHasTitle%
\draw[draw=none, left color=#1, right color=#2]
(blocktitle.south west) rectangle (blocktitle.north east);
\fi%
\draw[draw=none, fill=blockbodybgcolor] %
(blockbody.north west) [rounded corners=30] -- (blockbody.south west) --
(blockbody.south east) [rounded corners=0]-- (blockbody.north east) -- cycle;
}
\colorlet{blocktitlefgcolor}{white}
\useblockstyle{SotonSlide}
}
\defineblockstyle{Plain}{
titlewidthscale=1, bodywidthscale=1, titleleft,
titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=0pt,
bodyverticalshift=0pt, roundedcorners=0, linewidth=0pt, titleinnersep=1cm,
bodyinnersep=1cm
}{
\ifBlockHasTitle%
\draw[draw=none, fill=blocktitlebgcolor]
(blocktitle.south west) rectangle (blocktitle.north east);
\fi%
\draw[draw=none, fill=blockbodybgcolor] %
(blockbody.north west) [rounded corners=30] -- (blockbody.south west) --
(blockbody.south east) [rounded corners=0]-- (blockbody.north east) -- cycle;
}
\defineblockstyle{Underline}{
titlewidthscale=1, bodywidthscale=1, titleleft,
titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=0pt,
bodyverticalshift=0pt, roundedcorners=0, linewidth=2pt, titleinnersep=1cm,
bodyinnersep=1cm
}{
\ifBlockHasTitle%
\shade[draw=none, left color=blocktitlebgcolor, right color=blocktitlebgcolor]
($(blocktitle.south west)+(3.9\blocktitleinnersep,0)$) rectangle ($(blocktitle.south east)-(3.9\blocktitleinnersep,\blocklinewidth)$);
\shade[draw=none, left color=backgroundcolor, right color=blocktitlebgcolor]
($(blocktitle.south west)+(0,0)$) rectangle ($(blocktitle.south west)+(4\blocktitleinnersep,-\blocklinewidth)$);
\shade[draw=none, right color=backgroundcolor, left color=blocktitlebgcolor]
($(blocktitle.south east)-(4\blocktitleinnersep,\blocklinewidth)$) rectangle ($(blocktitle.south east)-(0,0)$);
\fi%
}
\definetitlestyle{FilledSwap}{
width=\paperwidth, roundedcorners=0, linewidth=2pt, innersep=1.5cm,
titletotopverticalspace=0mm, titletoblockverticalspace=20mm,
titlegraphictotitledistance=10pt
}{
\shade[draw=none, left color=titlebgcolor, right color=titlebgcolor]
(\titleposleft + 11.9\titleinnersep,\titleposbottom) rectangle (\titleposright - 11.9\titleinnersep,\titleposbottom - \titlelinewidth);
\shade[draw=none, left color=backgroundcolor, right color=titlebgcolor]
(\titleposleft + 2\titleinnersep,\titleposbottom) rectangle (\titleposleft + 12\titleinnersep,\titleposbottom - \titlelinewidth);
\shade[draw=none, right color=backgroundcolor, left color=titlebgcolor]
(\titleposright - 12\titleinnersep,\titleposbottom) rectangle (\titleposright - 2\titleinnersep,\titleposbottom - \titlelinewidth);
}
\definetitlestyle{SotonTitleFade}{
width=\paperwidth, roundedcorners=0, linewidth=0pt, innersep=1.5cm,
titletotopverticalspace=0mm, titletoblockverticalspace=20mm,
titlegraphictotitledistance=10pt
}{
\shade[draw=none, top color=titlebgcolor, bottom color=titlebgcolor!70!]
(\titleposleft,\titleposbottom) rectangle (\titleposright,\titlepostop); %
}
\definetitlestyle{FadeTitle}{
width=\paperwidth, roundedcorners=0, linewidth=0pt, innersep=1.5cm,
titletotopverticalspace=0mm, titletoblockverticalspace=20mm,
titlegraphictotitledistance=10pt
}{
\draw[draw=none, fill=titlebgcolor]%
(\titleposleft,\titleposbottom) rectangle (\titleposright,\titlepostop); %
\shade[draw=none, top color=titlebgcolor!95!, bottom color=backgroundcolor]
(\titleposleft,\titleposbottom + 0.1\titleinnersep) rectangle (\titleposright,\titleposbottom - 0.5\titleinnersep);
}
\definecolorstyle{SotonBrandStyle}{}{
% Background Colors
\colorlet{backgroundcolor}{white}
\colorlet{framecolor}{plainblack}
% Title Colors
\colorlet{titlefgcolor}{white}
\colorlet{titlebgcolor}{marine1}
% Block Colors
\colorlet{blocktitlebgcolor}{marine1}
\colorlet{blocktitlefgcolor}{plainblack}
\colorlet{blockbodybgcolor}{white}
\colorlet{blockbodyfgcolor}{plainblack}
% Innerblock Colors
\colorlet{innerblocktitlebgcolor}{white}
\colorlet{innerblocktitlefgcolor}{plainblack}
\colorlet{innerblockbodybgcolor}{neutral4}
\colorlet{innerblockbodyfgcolor}{plainblack}
% Note colors
\colorlet{notefgcolor}{plainblack}
\colorlet{notebgcolor}{neutral4}
\colorlet{notefrcolor}{neutral4}
}
\definelayouttheme{Soton}{
\blacktitlefalse
\titlegraphic{\includegraphics[width=\linewidth]{logowhite}}
\usecolorstyle[]{SotonBrandStyle}
\usebackgroundstyle{Default}
\usetitlestyle{Filled}
\usesotonslide{marine1}{marine1!70!white}
\useinnerblockstyle{Table}
\usenotestyle{Default}
}
\definelayouttheme{SotonFade}{
\blacktitlefalse
\titlegraphic{\includegraphics[width=\linewidth]{logowhite}}
\usecolorstyle[]{SotonBrandStyle}
\usebackgroundstyle{Default}
\usetitlestyle{SotonTitleFade}
\useblockstyle{Underline}
\useinnerblockstyle{Table}
\usenotestyle{Default}
}
\definelayouttheme{SotonPlain}{
\blacktitletrue
\titlegraphic{\includegraphics[width=\linewidth]{logoblue}}
\usecolorstyle[]{SotonBrandStyle}
\usebackgroundstyle{Default}
\usetitlestyle{FilledSwap}
\colorlet{blocktitlefgcolor}{white}
\useblockstyle{Plain}
\useinnerblockstyle{Table}
\usenotestyle{Default}
}
\ifthenelse{\paperwidth < \paperheight}{
\newcommand{\sotonlogowidth}{0.34\paperwidth}
}{
\newcommand{\sotonlogowidth}{0.34\paperheight}
}
\makeatletter
\renewcommand\TP@maketitle{%
\hspace*{2cm}
\iflogofirst
\begin{minipage}{\sotonlogowidth}
\centering
\@titlegraphic
\end{minipage}
\begin{minipage}{\linewidth - 4cm - \sotonlogowidth}
\raggedleft
\ifblacktitle \color{plainblack} \else \color{titlefgcolor} \fi
{\bfseries \Huge \sc \@title \par}
\vspace*{1em}
{\huge \@author \par}
\vspace*{1em}
{\LARGE \@institute}
\end{minipage}
\else
\begin{minipage}{\linewidth - 4cm - \sotonlogowidth}
\raggedright
\ifblacktitle \color{plainblack} \else \color{titlefgcolor} \fi
{\bfseries \Huge \sc \@title \par}
\vspace*{1em}
{\huge \@author \par}
\vspace*{1em}
{\LARGE \@institute}
\end{minipage}%
\begin{minipage}{\sotonlogowidth}
\centering
\@titlegraphic
\end{minipage}
\fi
\begin{minipage}{2cm}
\end{minipage}
}
\makeatother