PasTeX.cls 6.78 KB
Newer Older
Nicolas  MAILLET's avatar
message  
Nicolas MAILLET committed
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{PasTeX}[2016/10/06 v1.0]
\LoadClass{beamer}
\RequirePackage[utf8]{inputenc}
\RequirePackage[absolute,overlay]{textpos}
\RequirePackage{xcolor}
\RequirePackage{setspace}
\RequirePackage{helvet}
\RequirePackage{multicol}
\RequirePackage{tikz}
\RequirePackage{changepage}
\RequirePackage{graphicx}

\renewcommand{\familydefault}{\sfdefault}

\definecolor{pasteur-blue}{HTML}{005b9a}
\definecolor{pasteur-orange}{HTML}{e6a400}
\definecolor{pasteur-white}{RGB}{255,255,255}
\definecolor{pasteur-grey}{HTML}{555555}
\definecolor{pasteur-lightgrey}{RGB}{235,235,235}
\definecolor{pasteur-black}{HTML}{262626}

\makeatletter
	\newcommand{\xtiny}{\@setfontsize{\xtiny}{4pt}{4pt}}
	\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
	\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
	\def\thankstitle#1{\def\@thankstitle{#1}}
	\def\thanksmessage#1{\def\@thanksmessage{#1}}
	% Last slide
	\def\makethanks
	{
		\setbeamertemplate{frametitle}{\vfill\color{pasteur-white}\bfseries\small\centerline\insertframetitle}
		\setbeamercolor{background canvas}{bg=pasteur-blue}

		\begin{frame}[plain]
			\begin{color}{pasteur-white}
				% Title
				\frametitle{\@thankstitle}
				% Message
				\begin{minipage}[t][.85\textheight]{\textwidth}
				    \begin{center}
				    \vfill
				      \@thanksmessage
				      \vfill
				    \end{center}
				    \vfill
				\end{minipage}
				% Footer
				\makebox[\linewidth][c]
				{
	  				\begin{minipage}{\dimexpr\textwidth+45mm\relax}
						\fontsize{4}{5.5}\selectfont
						{
							\begin{columns}[b]
								\begin{column}[c]{.11\textwidth}
									\begin{column}[b]{.1\textwidth}
										\includegraphics[width=3mm, angle=270]{img/bubble.png}
									\end{column}
									\begin{column}[t]{.83\textwidth}
										\newline
										\newline
										\english{Public benefit foundation with official charitable status}\french{Fondation reconnue d'utilité publique habilitée à recevoir dons et legs}
									\end{column}
								\end{column}
								\hfill
								\begin{column}[c]{.3\textwidth}
									\flushright
									\english{\textbf{Institut Pasteur}\\25-28, rue du Docteur Roux\\75724 Paris Cedex 15 - France\\\textbf{www.pasteur.fr}}\french{\textbf{Institut Pasteur}\\25-28, rue du Docteur Roux\\75724 Paris Cedex 15\\\textbf{www.pasteur.fr}}
								\end{column}
							\end{columns}
						}
					\end{minipage}
				}
			\end{color}
		\end{frame}
76
77
		\setbeamertemplate{frametitle}{\color{pasteur-blue}\bfseries\small\insertframetitle}
		\setbeamercolor{background canvas}{bg=pasteur-white}
Nicolas  MAILLET's avatar
message  
Nicolas MAILLET committed
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
	}
\makeatother

% List
\defbeamertemplate{itemize item}{image}{\small\includegraphics[height=1.6ex]{img/bubble.png}}
\defbeamertemplate{itemize subitem}{image}{\tiny\includegraphics[height=1.6ex]{img/bubble.png}}
\setbeamertemplate{itemize item}[image]
\setbeamertemplate{itemize subitem}[image]
\setbeamertemplate{itemize subsubitem}{\large\color{pasteur-blue}$\bigcdot$}


% General theme
\setbeamertemplate{navigation symbols}{}
\setbeamercolor{normal text}{fg=pasteur-blue}
\setbeamertemplate{frametitle}{\color{pasteur-blue}\bfseries\small\insertframetitle}


% Header & Footer
\makeatletter
	\setbeamertemplate{headline}
	{
		\leavevmode
		\begin{beamercolorbox}[wd=\paperwidth,ht=15mm]{headtxtall}
	    		\hspace{19mm}
			\tiny\color{pasteur-orange}\MakeUppercase{\expandafter\protect\insertsectionhead}\newline
			\hspace*{7mm}
			\vspace*{3mm}
			\huge\color{pasteur-white}\textbf{\thesection.\thesubsection}~\Large\insertsubsection
		\end{beamercolorbox}
	}
	\setbeamercolor{headtxtall}{bg=pasteur-blue}


	\setbeamertemplate{footline}
	{
		\leavevmode
		\begin{textblock*}{1.5cm}(11.07cm,8.9cm)
			\includegraphics[width=1.2cm]{img/logo_ip_color.png}
		\end{textblock*}
		\vspace*{-5mm}
		\hspace*{4mm}
		\begin{beamercolorbox}[wd=0.6\paperwidth,ht=2mm]{foottxt}
			\xtiny{\qquad\enskip\insertframenumber\enskip$\bigcdot$\enskip\insertauthor\enskip$\bigcdot$\enskip\inserttitle\enskip$\bigcdot$\enskip\insertdate}
			\vspace*{0.2mm}
		\end{beamercolorbox}
		\vspace*{2mm}
	}
	\setbeamercolor{foottxt}{bg=pasteur-lightgrey,fg=pasteur-blue}
\makeatother

% Title page
\renewcommand{\maketitle}
{
	% First slide (title)
	{
		\setbeamercolor{background canvas}{bg=pasteur-blue}
		\begin{frame}[plain]
			\hspace{-12mm}
			\vspace{3mm}
			\colorbox{pasteur-white}
			{
				\begin{minipage}[t][3.83cm][c]{0,9\textwidth}
					\begin{color}{pasteur-orange}
						\hspace{11mm}
						\vspace{1mm}
						\begin{minipage}[t][3.83cm][c]{0,55\textwidth}
							\begin{spacing}{0.9}
								\flushleft
								\Large\textbf{\MakeUppercase{\inserttitle}}\vspace{2mm}
							\end{spacing}
							\linespread{1}\scriptsize{\MakeUppercase{\insertsubtitle}}\vspace{5mm}\\
							\noindent \raisebox{0.25ex}{\tiny$\bullet$}~\scriptsize{\insertauthor}\hfill \hfill \raisebox{0.25ex}{\tiny$\bullet$}~\scriptsize{\insertdate}
						\end{minipage}
					\end{color}
				\end{minipage}
			}
			\begin{textblock*}{2.5cm}(0.45cm,8.62cm)
				\english{\includegraphics[width=2.8cm]{img/for_ip.png}}\french{\includegraphics[width=2.8cm]{img/for_ip-fr.png}}
			\end{textblock*}
			\begin{textblock*}{2.5cm}(10.07cm,8.25cm)
				\includegraphics[width=2.2cm]{img/logo_ip_white.png}
			\end{textblock*}
		\end{frame}
	}
	%Second slide (Table of Content)
	{
		\defbeamertemplate*{headline}{}
		{
			\begin{beamercolorbox}[wd=\paperwidth,ht=15mm]{headtxt}
				\vspace{5mm}
	    		\hspace{12mm}
				\huge{\english{Contents}\french{Sommaire}}
			\end{beamercolorbox}
		}
		\setbeamercolor{headtxt}{bg=pasteur-blue,fg=pasteur-orange}
			
		\begin{frame}
		\scriptsize
		{
			\begin{columns}[t]
				\begin{column}{.5\textwidth}
					\tableofcontents[hideallsubsections,sections={1-3}]
				\end{column}
				\begin{column}{.5\textwidth}
					\tableofcontents[hideallsubsections,sections={4-6}]
				\end{column}
			\end{columns}
		}
		\end{frame}
	}
}
% TOC
\setbeamertemplate{section in toc}
{
	\begin{color}{pasteur-white}
		\colorbox{pasteur-orange}{\MakeUppercase{\english{Part}\french{Partie}} \inserttocsectionnumber}
	\end{color}
	\\\vspace{2mm}
	\begin{color}{pasteur-black}
		\inserttocsection \par
	\end{color}
	\vspace{2mm}
}

% Sections
\AtBeginSection[]
{
	\begin{frame}
		\vspace*{-28mm}
	    	\hspace*{-12mm}
		\colorbox{pasteur-blue}
		{
		\begin{minipage}[l][72mm][c]{\paperwidth}
			\hspace{25mm}
			%\vspace{-5mm}
			\begin{minipage}[l][10cm][c]{0,3\paperwidth}
				\begin{tikzpicture}
					\node (image) at (-1,0) {\includegraphics[width=2cm]{img/bubble.png}};
					\node at (0.3,-0.8)
					{\setlength{\fboxsep}{5pt}\colorbox{pasteur-white}{\color{pasteur-orange}\huge\textbf{\MakeUppercase{\english{Part}\french{Partie}} \insertsectionnumber}}};
				\end{tikzpicture}
				\begin{adjustwidth}{7mm}{-2mm}
					\flushleft
					\color{pasteur-white}\insertsection
				\end{adjustwidth}
			\end{minipage}
		\end{minipage}
		}
	\end{frame}
}