Newer
Older
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerx}[2016/02/14 v1.0.0beta, standard scientific slideshows layout for Ecole polytechnique (Palaiseau,France).]
%=======================================================================
% Declaration des options
%=======================================================================
\ProcessOptions*
%=======================================================================
% Package requis
%=======================================================================
\RequirePackage{calc}
\RequirePackage{ifthen} % pour utiliser des booleens
% \RequirePackage{ifpdf} % mode de compilation
% \RequirePackage[pagestyles]{titlesec}
\RequirePackage{graphicx}
\RequirePackage{xcolor}
% \RequirePackage{lmodern}
% \RequirePackage{multicol}
% \RequirePackage{amsmath}
% \RequirePackage{amssymb}
% \RequirePackage{mathrsfs}
% \RequirePackage{eso-pic}
% \RequirePackage{transparent}
\RequirePackage{xargs}
\RequirePackage{tikz}
% \RequirePackage{stmaryrd}
%=======================================================================
% Definition des couleurs
%=======================================================================
\definecolor{bleu303}{RGB}{0,62,92}
\colorlet{darkbleu303}{black!20!bleu303}
\colorlet{lightbleu303}{white!20!bleu303}
\colorlet{ultralightbleu303}{white!80!bleu303}
\definecolor{rouge485}{RGB}{213,43,30}
\colorlet{darkrouge485}{black!20!rouge485}
\colorlet{lightrouge485}{white!20!rouge485}
\colorlet{ultralightrouge485}{white!80!rouge485}
\definecolor{vert575}{RGB}{107,126,81}
\colorlet{darkvert575}{black!20!vert575}
\colorlet{lightvert575}{white!20!vert575}
\colorlet{ultralightvert575}{white!80!vert575}
%=======================================================================
% Definition du theme beamer
%=======================================================================
%---------- Parametres generaux
\usefonttheme{professionalfonts}
\usefonttheme[stillsansseriflarge,stillsansserifsmall]{serif}
\setbeamersize{text margin left=3mm}
\setbeamersize{text margin right=3mm}
\hspace*{1mm}%
\raisebox{1mm}{%
\textbf{ÉCOLE POLYTECHNIQUE}-- \insertshorttitle%
}%
\hspace*{\fill}
\raisebox{1mm}{%
\insertframenumber%
}%
\hspace*{1mm}%
\setbeamertemplate{logo}{LOGO}
\setbeamertemplate{frametitle}{%
\sffamily\Large\color{bleu303}\insertframetitle\\
\sffamily\large\color{lightbleu303}\insertframesubtitle%
}
\setbeamertemplate{frametitle continuation}{this is the next part of the title}
%=======================================================================
% Commandes de mise en page utilisateur
%=======================================================================
%---------- Informations sur le document
\def\polytitresave{}
\def\polysoustitresave{}
\def\polyauteursave{}
\def\polylogotitresave{}
\def\polylogopersosave{}
%---------- Mise en page
\newcommand{\MakeUppercaseWithNewline}[1]{%
\begingroup
\let\SavedOrgNewline\\%
\DeclareRobustCommand{\\}{\SavedOrgNewline}%
\MakeUppercase{#1}%
\endgroup
}
% use: \title[sous-titre]{titre}[titre court]
\renewcommand\polytitresave{#2}
\renewcommand\polysoustitresave{#1}
\ifthenelse{\equal{#3}{}}{%
\oldtitle{#2}%
}{%
\oldtitle[#3]{#2}%
}
% use: \author[auteur court]{auteur}
\renewcommand\polyauteursave{#2}
\oldauthor{\rmfamily\bfseries #1}
}
% \let\olddate=\date
\let\oldlogo=\logo%
\renewcommand\logo[1]{%
\renewcommand\polylogopersosave{%
\includegraphics[width=30mm,height=14mm,keepaspectratio]{#1}
}
}
\oldlogo{%
\hspace*{\paperwidth}%
\hspace*{-16mm}%
\makebox[\paperwidth]{%
\makebox[16mm]{%
}%
\hfill%
\makebox[32mm][r]{%
\polylogopersosave{}%
}%
\hspace*{1mm}%
}%
}
%=======================================================================
% Diapos conforme charte graphique
%=======================================================================
%--- Maketitle % TODO : clean
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
\renewcommand\maketitle{%
\setlength{\unitlength}{0.00625\paperwidth}%
\setbeamertemplate{background canvas}{%
\color{white}%
\begin{picture}(160,90)%
\put(80,45){%
\makebox(0,0)[c]{%
\includegraphics[width=\paperwidth,keepaspectratio]{beamerxbackground}%
}%
}%
\put(15,45){%
\makebox(0,0)[c]{%
\color{white}\includegraphics[height=0.25\paperheight,keepaspectratio]{beamerxlogo}%
}%
}%
\put(1,1){%
\makebox(0,0)[lb]{%
\begin{minipage}{0.5\paperwidth}\noindent%
\sffamily\footnotesize\polyauteursave%
\end{minipage}%
}%
}%
\put(159,1){%
\makebox(0,0)[rb]{%
\begin{minipage}{0.5\paperwidth}\noindent\flushright%
\sffamily\footnotesize\polydatesave%
\end{minipage}%
}%
}%
\put(159,46){%
\makebox(0,0)[rb]{%
\begin{minipage}{0.75\paperwidth}\noindent\flushright%
\Large\setlength{\baselineskip}{0.7\baselineskip}%
\sffamily\bfseries\MakeUppercaseWithNewline{\polytitresave}%
\end{minipage}%
}%
}%
\put(159,47){%
\makebox(0,0)[rt]{%
\begin{minipage}{0.75\paperwidth}\noindent\flushright%
\setlength{\baselineskip}{0.7\baselineskip}%
\sffamily\polysoustitresave%
\end{minipage}%
}%
}%
\end{picture}%
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
%--- XSection
% Prototype :
% \xsection{color_choice}
% [short_title]
% {title}
% [picture]
\newcommandx{\xsection}[4][{2={},4=welcome}]{%
\ifthenelse{\equal{#2}{}}{%
\section{#3}%
}{%
\section[#2]{#3}%
}%
\ifthenelse{\equal{#1}{bleu}}{%
\xsectionframe{lightbleu303}{white}{#4}{\arabic{section}}{#3}%
}{%
}
}
%- XSectionFrame
% Prototype :
% \xsectionframe{bg_color}
% {fg_color}
% {picture}
% {number}
% {title}
\newcommand{\xsectionframe}[5]{%
\setbeamertemplate{background canvas}{%
\setlength{\unitlength}{0.00625\paperwidth}%
\begin{picture}(160,90)%
\put(80,0){%
\makebox(0,0)[cb]{%
\includegraphics[width=\paperwidth,keepaspectratio]{#3}%
}%
\put(0,60){%
\color{#1}\rule{\paperwidth}{\paperheight/3}%
\begin{minipage}{140\unitlength}\centering%
\Huge\sffamily\color{#2}#4%
\begin{minipage}{140\unitlength}\centering%
\end{minipage}%
}%
}%
\end{picture}%
}
\begin{frame}[plain,c]
\end{frame}
\setbeamertemplate{background canvas}{}
}
%--- XSubSection
% Prototype :
% \xsubsection{color_choice}
% [short_title]
% {title}
% {subtitle}
% [picture]
\newcommandx{\xsubsection}[5][{2={},5=pei}]{%
\ifthenelse{\equal{#2}{}}{%
\section{#3}%
}{%
\section[#2]{#3}%
}%
\ifthenelse{\equal{#1}{bleu}}{%
\xsubsectionframe{lightbleu303}{darkbleu303}{white}{#5}{#3}{#4}%
%- XSubSectionFrame
% Prototype :
% \xsubsectionframe{bg_color}
% {bg_altcolor}
% {fg_color}
% {picture}
% {title}
% {subtitle}
\newcommand{\xsubsectionframe}[6]{%
\setbeamertemplate{background canvas}{%
\setlength{\unitlength}{0.00625\paperwidth}%
\begin{picture}(160,90)%
\put(80,90){%
\makebox(0,0)[ct]{%
\includegraphics[width=\paperwidth,keepaspectratio]{#4}%
}%
\put(0,0){%
\color{#1}\rule{\paperwidth}{0.5\paperheight}%
\color{#3}\includegraphics[height=\paperheight/22,keepaspectratio]{beamerxx}%
}%
}%
\put(160,22.5){%
\makebox(0,0)[c]{%
\color{#2}\includegraphics[height=3\paperheight/7,keepaspectratio]{beamerxarmes}%
}%
}%
\makebox(0,0)[cb]{%
\begin{minipage}{120\unitlength}\centering%
\large\rmfamily\bfseries\color{#3}\MakeUppercaseWithNewline{#5}%
}%
\put(80,18){%
\makebox(0,0)[ct]{%
\begin{minipage}{120\unitlength}\centering%
\large\rmfamily\color{#3}#6%
\end{minipage}%
}%
}%
\end{picture}%
}
\begin{frame}[plain,c]
\end{frame}
\setbeamertemplate{background canvas}{}
}
% Prototype:
% \begin{xframe}
% {title}
% {subtitle}
\newenvironment{xframe}[2]{%
\setbeamertemplate{background canvas}{%
\setlength{\unitlength}{0.00625\paperwidth}%
\begin{picture}(160,90)%
\makebox(0,0)[rt]{%
\color{lightbleu303}\includegraphics[height=\paperheight/7,keepaspectratio]{beamerxarmes}%
}%
}%
\end{picture}%
}%
\begin{frame}{#1}{#2}%
}{%
\end{frame}%
}
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
%--- XPic
% Prototype:
% \begin{xpic}
% [size adjustment]
% {picture}
\newenvironment{xpic}[2][hw]{%
\setbeamertemplate{background canvas}{%
\setlength{\unitlength}{0.00625\paperwidth}%
\begin{picture}(160,90)%
\put(80,45){%
\makebox(0,0)[c]{%
\ifthenelse{\equal{#1}{hw}}{%
\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#2}%
}{\ifthenelse{\equal{#1}{wh}}{%
\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#2}%
}{\ifthenelse{\equal{#1}{h}}{%
\includegraphics[height=\paperheight]{#2}%
}{%
\includegraphics[width=\paperwidth]{#2}%
}}}%
}%
}%
\end{picture}
}%
\begin{frame}[plain,b]\centering%
}{%
\vspace*{5mm}
\end{frame}%
}