-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeamerthemeLundUniversity.sty
183 lines (159 loc) · 6.13 KB
/
beamerthemeLundUniversity.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
\ProvidesPackage{beamerthemeLundUniversity}
\RequirePackage{tikz,pgf}
\RequirePackage[overload]{textcase}
\RequirePackage{setspace}
%%%\usepackage[urw-garamond]{mathdesign} %kappa doesn't work
\usepackage{mathdesign}
\usepackage[scaled]{helvet}
\usetikzlibrary{shapes,arrows,calc}
\definecolor{LUCopper}{RGB}{156,97,20}
\definecolor{LUBlue}{RGB}{0,0,128}
\definecolor{LUPink}{RGB}{233,196,199}
\definecolor{LUGreen}{RGB}{173,202,184}
\definecolor{LULBlue}{RGB}{185,211,220}
\definecolor{LUIvory}{RGB}{214,210,196}
\newcommand{\titlecolor}[1]{\renewcommand{\giventitlecolor}{#1}}
\newcommand{\titleimage}[1]{\renewcommand{\giventitleimage}{#1}}
\newcommand{\giventitlecolor}{}
\newcommand{\giventitleimage}{}
\providecommand*{\lulogo}{images/lunduniversity.pdf}
\renewcommand*\lulogo{images/lunduniversity.pdf}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Outer theme
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\useoutertheme[width=.15\paperwidth]{sidebar}
\setlength{\beamer@headheight}{.165\paperheight}
\pgfdeclareimage[width=.13\paperwidth]{small-logo}{\lulogo}
%\pgfdeclareimage[width=.5\paperwidth]{main-logo}{\lulogo}
%\pgfdeclareimage[width=.33\paperwidth]{large-corner}{large-corner}
%\pgfdeclareimage[height=\beamer@headheight]{small-corner}{small-corner}
\setbeamertemplate{sidebar left}{%
%\vskip7pt
\insertverticalnavigation{\beamer@sidebarwidth}%
}
\setbeamertemplate{footline}[text line]{%
\insertshortauthor\strut\hfill\insertshorttitle\hfill\insertshortdate\hspace{1em}\insertframenumber/\inserttotalframenumber}
\addtobeamertemplate{frametitle}{}{%
\begin{pgfpicture}
\pgf@relevantforpicturesizefalse
\pgftransformxshift{-\Gm@lmargin}
\pgftransformyshift{\beamer@headheight+18pt}
%\pgftext[at=\pgfpoint{\paperwidth}{-\beamer@headheight},right,base]{\pgfuseimage{small-corner}}
\pgfpathmoveto{\pgfpoint{.15\paperwidth}{0pt}}
\pgfpathlineto{\pgfpoint{.15\paperwidth}{-\beamer@headheight}}
\pgfsetlinewidth{3.5pt}
\pgfsetinnerlinewidth{1pt}
\pgfsetinnerstrokecolor{LUCopper}
\pgfsetcolor{white}
\pgfusepath{stroke}
\pgfpathmoveto{\pgfpoint{.15\paperwidth}{-.22\paperheight}}
\pgfpathlineto{\pgfpoint{.15\paperwidth}{-.97\paperheight}}
\pgfsetlinewidth{1pt}
\pgfsetinnerlinewidth{0pt}
\pgfsetcolor{LUCopper}
\pgfusepath{stroke}
\pgftext[at=\pgfpoint{.075\paperwidth}{-.97\paperheight},center,base]{\pgfuseimage{small-logo}}
\end{pgfpicture}%
\vskip-25pt%
}
\setbeamertemplate{title page}{
\begin{tikzpicture}%[overlay]
\ifx\giventitlecolor\@empty %check if there is a bg color set
\draw[fill=LUPink, line width=.3cm, draw=white, use as bounding box] (0,0)
rectangle (\paperwidth, 1\paperheight);
\else
\draw[fill=\giventitlecolor, line width=.3cm, draw=white, use as bounding box] (0,0)
rectangle (\paperwidth, 1\paperheight);
\fi
\ifx\giventitleimage\@empty
%if no title image do nothing
\else
\begin{scope}
\clip (.15, .15) rectangle ($(\paperwidth,\paperheight) - (-0.005\paperwidth, .15)$);
\node[inner sep=0, anchor=south west] at (.15,.15) {\giventitleimage};
\end{scope}
\fi
\usebeamerfont{title} %set font to title font
\renewcommand{\baselinestretch}{.9} %reduce line spacing
%draw white title box
\node[draw=white, shape=rectangle,minimum height=1cm, align=left, fill=white, font=\Large, inner ysep=.5cm]
at (.6\paperwidth, .7\paperheight) (titlenode) {\inserttitle};
%draw more white boxes
\draw[fill=white,draw=none]
($(titlenode.south east)+(-.1cm,0)$) rectangle ($(titlenode.north east)+(\paperwidth,0)$);
\draw[fill=white,draw=none]
($(titlenode.south west)+(0,.1cm)$) rectangle ($(titlenode.south east)+(\paperwidth,-0.2cm)$);
%draw the line to the edge of the page
\begin{scope}
\clip (.15, .15) rectangle ($(\paperwidth,1\paperheight) - (-0.005\paperwidth, .15)$);
\draw[very thick, draw=LUCopper] ($(titlenode.text)+(0,-.17cm)$) -- ($(titlenode.text)+(\paperwidth,-.17cm)$);
\end{scope}
%draw subtitle if there is one
\ifx\insertsubtitle\@empty
%if there is no subtitle dont draw anything
\else
%draw subtitle and boxes
\draw[fill=white,draw=none]
($(titlenode.south west)+(0,-0.1cm)$) rectangle ($(titlenode.south east)+(\paperwidth,-0.3cm)$);
\usebeamerfont{subtitle}
\node[align=left, anchor=text, draw=none,font=\footnotesize] at ($(titlenode.text)+(0,-.5cm)$)
{\MakeUppercase{\insertsubtitle}};
\fi
%draw logos
\node at ($(\paperwidth,0)-(1.1cm,.1cm)$) {\includegraphics[scale=.6]{\lulogo}};
\node[anchor=north west] at ($(0,\paperheight)-(0cm,0cm)$) {\includegraphics[scale=.15]{\lulogo}};
\end{tikzpicture}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Inner Theme
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\useinnertheme{rectangles}
\setbeamertemplate{navigation symbols}{}
\setlength{\leftmargini}{.5em}
\setlength{\leftmarginii}{1.0em}
\setlength{\leftmarginiii}{1.5em}
\setlength{\leftmarginiv}{2.0em}
\setlength{\leftmarginv}{2.5em}
\setlength{\leftmarginvi}{3.0em}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Colours
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usecolortheme[named=LUCopper]{structure}
\usecolortheme{rose}
\setbeamercolor{title page}{fg=LUCopper}
\setbeamercolor{logo}{bg=LUCopper}
\setbeamercolor{frametitle}{fg=LUCopper,bg=white}
\setbeamercolor{section in sidebar}{fg=LUCopper}
\setbeamerfont{section in sidebar}{series=\bfseries}
\setbeamercolor{block title}{bg=LUGreen,fg=LUCopper}
\setbeamercolor{block body}{bg=LUGreen!50!white}
\setbeamercolor{block title alert}{bg=LUPink,fg=LUCopper}
\setbeamercolor{block body alert}{bg=LUPink!50!white}
\setbeamercolor{block title example}{bg=LUPink,fg=LUCopper}
\setbeamercolor{block body example}{bg=LUPink!50!white}
\setbeamerfont{title}{family={\rmfamily}, series={\bfseries}}
\setbeamerfont{subtitle}{family={\rmfamily},series={\bfseries}}
%\setbeamerfont{subtitle}{family={\sffamily},series={\bfseries}}
\setbeamerfont{frametitle}{family={\rmfamily},series={\bfseries}}
\setbeamerfont{block title}{family={\rmfamily},series={\bfseries}}
%\setbeamerfont{framesubtitle}{\uppercase}
\newcommand{\titleframe}{
\begingroup
\makeatletter
\setlength{\hoffset}{-\Gm@lmargin}
\makeatother
\begin{frame}[plain,shrink]
\titlepage
\end{frame}
\endgroup
}
\newcommand\ThankYouFrame{
\begin{frame}[plain,t]
\begin{pgfpicture}
\pgf@relevantforpicturesizefalse
\pgftransformxshift{-\Gm@lmargin}
\pgftransformyshift{5.5pt}
\DoPurpleBackground
\end{pgfpicture}
\end{frame}
}