beamerthemeens.sty 3.92 KB
Newer Older
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% BEAMER THEME FOR ENSPS %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% place in same folder as your .tex
% \usetheme{ens} in preamble
% also need ENSPS-revert.png

\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{ensbeamer}[2019/09/04 Beamer Theme]
\RequirePackage{tikz}
\RequirePackage{xcolor}

\makeatletter
\newif\if@section\@sectionfalse
\DeclareOption{sectiontitle}{
  \@sectiontrue
}

\ProcessOptions\relax

\definecolor{bleuens}{RGB}{0,119,139} % bleu ens !
\definecolor{vertens}{RGB}{0,230,180}
\definecolor{violetens}{RGB}{125,85,199}

\setbeamercolor{structure}{fg=bleuens}
%\setbeamercolor{sidebar}{fg=bleuens,bg=white}
\setbeamercolor{sidebar}{bg=bleuens,fg=white}
\setbeamercolor{title in sidebar}{fg=white}
 \setbeamercolor{section in sidebar}{fg=white}
 \setbeamercolor{section in sidebar shaded}{fg=bleuens!40}
 \setbeamercolor{subsection in sidebar}{fg=white}
 \setbeamercolor{subsection in sidebar shaded}{fg=bleuens!60}
 \setbeamercolor{frametitle}{fg=bleuens,bg=white}

\def\swidth{2cm}

Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
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


%
% -----------------------------
% Title Page

\setbeamerfont{title}{size=\Huge}
\setbeamerfont{author}{size=\large}
\setbeamerfont{institut}{size=\Large}
\setbeamerfont{subtitle}{size=\Large}
\setbeamerfont{date}{size=\Large}
\setbeamertemplate{title page}{%
\begin{tikzpicture}[remember picture,overlay]
\fill[bleuens]
  (current page.north west) rectangle (current page.south east);
\node
  at ([yshift=+.15\textheight]current page.center) (title)
  {\usebeamerfont{title}\textcolor{white}{\inserttitle}};

\node[below=2em]
  at(title) (subtitle)
  {\usebeamerfont{subtitle}\textcolor{white}{\insertsubtitle}};

\node
  at ([yshift=-70pt]current page.center) (institute)
  {\usebeamerfont{institute}\textcolor{white}{\insertinstitute}};

\node
  at ([yshift=-50pt]current page.center) (author)
  {\usebeamerfont{author}\textcolor{white}{\insertauthor}};

\node[anchor=north west]
  at (current page.north west) (logo)
  {\usebeamercolor[fg]{titlegraphic}
    \includegraphics[scale=0.3]{ENSPS-revert.png}};


\end{tikzpicture}
}



%
% --------------------------------------
% Sidebar

83 84 85 86
\useoutertheme[height=0pt,width=\swidth, hideothersubsections]{sidebar}

\setbeamertemplate{sidebar left}
{
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
87 88
  {\vspace{0.9em}
\hspace{-0.4em}
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
    \begin{minipage}{\swidth}
      \centering
      \insertlogo
    \end{minipage}
  \usebeamerfont{title in sidebar}%
    \vskip1em%
    \usebeamercolor[fg]{title in sidebar}%
    \insertshorttitle[width=\swidth,center,respectlinebreaks]\par%
    \vskip.5em%
  }%
  \insertverticalnavigation{\swidth}%
  \vfill
  \hbox to2cm{\hskip0.6cm\usebeamerfont{section in sidebar} \strut\usebeamercolor[fg]{section in    sidebar}\insertframenumber/\inserttotalframenumber\hfill}%
  \vskip3pt%
}%

Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
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
% --------------------------------------------------------------------------
% Section as frame title
\if@section
\addtobeamertemplate{frametitle}{
   \let\insertframetitle\insertsectionhead}{}
\addtobeamertemplate{frametitle}{
   \let\insertframesubtitle\insertsubsectionhead}{}

\makeatletter
 \CheckCommand*\beamer@checkframetitle{\@ifnextchar\bgroup\beamer@inlineframetitle{}}
  \renewcommand*\beamer@checkframetitle{\global\let\beamer@frametitle\relax\@ifnextchar\bgroup\beamer@inlineframetitle{}}

  \fi

\setbeamertemplate{caption}{\raggedright\insertcaption\par}
\setbeamertemplate{navigation symbols}[horizontal]

% ---------------------------------------------------
% BLOC
\setbeamertemplate{blocks}[rounded][shadow=false]
\setbeamercolor{block body}{fg=black,bg=bleuens!20}
\setbeamercolor{block title}{fg=black,bg=bleuens!40}

\setbeamercolor{block body example}{fg=black,bg=vertens!40}
\setbeamercolor{block title example}{fg=black,bg=vertens}

\setbeamercolor{block body alerted}{fg=black,bg=violetens!40}
\setbeamercolor{block title alerted}{fg=black,bg=violetens}

\setbeamercolor{subitem}{fg=violetens}

\makeatother
% LOGO :
\logo{\includegraphics[scale=0.3]{ENSPS-revert.png}}