-
Notifications
You must be signed in to change notification settings - Fork 3
/
beamerthemepolymtl.sty
167 lines (138 loc) · 4.24 KB
/
beamerthemepolymtl.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
%
% Copyright (c) 2011
% Manuel Vonthron - <manuel DOT vonthron AT acadis DOT org>
%
% This file may be distributed and/or modified under the terms of
% the Do What The Fuck You Want To Public License, Version 2
%
\ProvidesPackage{beamerthemepolymtl}[2011/04/20]
\RequirePackage{tikz}
\RequirePackage{calc}
\RequirePackage[scriptsize,it]{caption}
\captionsetup{labelformat=empty,labelsep=none}
\mode<presentation>
%%% variables and options
\def\beamer@polymtl@value@true{true}
\def\beamer@polymtl@value@false{false}
\def\beamer@polymtl@value@empty{}
\def\beamer@polymtl@url{}
\def\beamer@polymtl@numbering{}
\def\beamer@polymtl@titlepagelayout{}
\newlength{\beamer@polymtl@menuwidth}
\newlength{\beamer@polymtl@restofmenuwidth}
\setlength{\beamer@polymtl@menuwidth}{.3\paperwidth}
\DeclareOptionBeamer{url}[{www.polymtl.ca}]{\def\beamer@polymtl@url{#1}}
\DeclareOptionBeamer{numbering}[true]{\def\beamer@polymtl@numbering{#1}}
\DeclareOptionBeamer{titlepagelayout}[]{\def\beamer@polymtl@titlepagelayout{#1}}
\DeclareOptionBeamer{menuwidth}[]{\setlength{\beamer@polymtl@menuwidth}{#1}}
\ProcessOptionsBeamer
\setlength{\beamer@polymtl@restofmenuwidth}{0.95\paperwidth}
\addtolength\beamer@polymtl@restofmenuwidth{-\beamer@polymtl@menuwidth}
\useinnertheme{circles}
\useoutertheme{miniframes}
\usecolortheme{polymtl}
\setbeamertemplate{navigation symbols}{}
% TITLE PAGE
\defbeamertemplate*{title page}{titlepage}
{
\thispagestyle{empty}
\begin{picture}(0,0)(0,0)
\put(-29,-171){\includegraphics[width=1.01\paperwidth]{images/layout-1.pdf}}
\end{picture}
\begin{picture}(0,0)(0,0)
\put(10,30){
\begin{minipage}{0.9\linewidth}
\centering{\LARGE\color{polymtlwhite} \inserttitle\par}
\centering{\large\color{polymtllightgrey} \insertsubtitle\par}
\end{minipage}
}
\end{picture}
\begin{picture}(0,0)(0,0)
\put(10,-10){
\begin{minipage}{0.90\linewidth}
\centering{\large\color{polymtlwhite} \insertauthor\par}
\end{minipage}
}
\end{picture}
\begin{picture}(0,0)(0,0)
\put(10,-125){
\begin{minipage}{0.90\linewidth}
\centering{\color{polymtlblack} \insertinstitute\par}
\end{minipage}
}
\end{picture}
}
% HEADER
\defbeamertemplate*{headline}{polymtl}%
{
\begin{beamercolorbox}[wd=\paperwidth,leftskip=1em,sep=0.6em]{headerline title}
\begin{minipage}{\beamer@polymtl@restofmenuwidth}
{\tiny{\bfseries POLYTECHNIQUE} MONTR\'EAL}%
\end{minipage}
\hspace{0px}
\begin{minipage}{\beamer@polymtl@menuwidth}
\begin{flushright}
\insertsectionnavigationhorizontal{\beamer@polymtl@menuwidth}{}{}
\end{flushright}
\end{minipage}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth,sep=1px]{headerline border}
\vspace{1px}
\end{beamercolorbox}
}
% FOOTER
\defbeamertemplate*{footline}{polymtl}
{
%\leavevmode%
\begin{beamercolorbox}[wd=\paperwidth,leftskip=1em,sep=0.2em]{footerline}
\insertshorttitle\;--\;\insertshortauthor \hfill %
\ifx\beamer@polymtl@numbering\beamer@polymtl@value@false\relax\else
\insertframenumber/\inserttotalframenumber\;--\; %
\fi
\ifx\beamer@polymtl@url\beamer@polymtl@value@empty
{\bfseries www.polymtl.ca}
\else
{\bfseries \beamer@polymtl@url}
\fi
\end{beamercolorbox}
}
% SECTION LIST
\usesectionheadtemplate
{ %active
\color{polymtlred} \insertsectionhead
}
{ %other
\color{polymtllightgrey} \insertsectionhead
}
% BACKGROUND IMAGE
\setbeamertemplate{background}{
\ifnum\insertframenumber=1\else
\parbox[r][\paperheight]{\paperwidth}{
\vfill\hfill
\includegraphics[width=80px]{images/polymtl-watermark.pdf}
}
\fi
}
\defbeamertemplate*{frametitle}{}
{
\begin{beamercolorbox}[sep=0ex,ht= 2.5ex, wd=\paperwidth]{}
\hspace{2ex}\insertframetitle{} \hspace{1ex}\hrulefill %
\end{beamercolorbox}%
}
%
\newcommand{\sectionframe}[1]
{
\begin{beamercolorbox}[wd=\textwidth]{footerline}
\begin{minipage}{\textwidth}
\vspace{1em}
\centering\Large{\color{white}{#1}}
\vspace{1em}
\end{minipage}%
\end{beamercolorbox}%
\nointerlineskip
\begin{beamercolorbox}[sep=0ex,ht=2pt, wd=\textwidth]{headerline border}
\end{beamercolorbox}%
}
%\mode<handout>
\mode
<all>