From b871664b07f1d51adf10beb8ed13ecfe20da68d7 Mon Sep 17 00:00:00 2001 From: Dorchies David <david.dorchies@irstea.fr> Date: Tue, 3 Oct 2017 17:32:40 +0200 Subject: [PATCH] =?UTF-8?q?Pr=C3=A9sentation=20Irstea=20:=20Am=C3=A9liorat?= =?UTF-8?q?ion=20titre=20frame=20et=20TOC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beamerouterthemeirstea.sty | 20 +--------------- presentation_irstea/preambule.tex | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/presentation_irstea/beamerouterthemeirstea.sty b/presentation_irstea/beamerouterthemeirstea.sty index d66b9b5..440bec2 100644 --- a/presentation_irstea/beamerouterthemeirstea.sty +++ b/presentation_irstea/beamerouterthemeirstea.sty @@ -1,24 +1,6 @@ \mode<presentation> % Frame title -\defbeamertemplate*{frametitle}{irstea}[1][] -{ - \begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle} - \begin{tikzpicture} - \node[anchor=south west] (gimmick_irstea) at (1,0) - {\includegraphics[width=1cm,keepaspectratio]{presentation_irstea/CouvCadreMarineGH}}; - - \useasboundingbox(0,0) rectangle(\the\paperwidth,1.2); - \ifx\insertframesubtitle\@empty% - {\node[anchor=west, gris,font=\Large] at (1.5,0.41){\insertframetitle};} - \else% - {\node[anchor= west, gris,font=\Large] at (1.5,0.61){\insertframetitle};% - \node[anchor= west, ocean,font=\large] at (1.5,0.11){\textsc{\insertframesubtitle}};}% - \fi - \end{tikzpicture} - \end{beamercolorbox} -} - - +\defbeamertemplate*{frametitle}{irstea}[1][]{\IrsteaFrameTitle{\insertframetitle}{\insertframesubtitle}} \mode<all> \ No newline at end of file diff --git a/presentation_irstea/preambule.tex b/presentation_irstea/preambule.tex index 9b8194f..1b0a7c5 100644 --- a/presentation_irstea/preambule.tex +++ b/presentation_irstea/preambule.tex @@ -28,6 +28,12 @@ \usefolder{presentation_irstea} \usetheme{irstea} +% Reduce spacing in table of contents (beamer) +% https://tex.stackexchange.com/a/51458 +\usepackage{etoolbox} +\makeatletter +\patchcmd{\beamer@sectionintoc}{\vskip1.5em}{\vskip1em}{}{} +\makeatother % Automatic frame titles and subtitles from section and subsection % @see https://tex.stackexchange.com/a/15429 @@ -40,3 +46,20 @@ %\renewcommand*\beamer@checkframetitle{\global\let\beamer@frametitle\relax\@ifnextchar\bgroup\beamer@inlineframetitle{}} \makeatother +% Definition of custom Frame Title for Irstea +\newcommand{\IrsteaFrameTitle}[2]{ + \begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle} + \begin{tikzpicture} + \node[anchor=south west] (gimmick_irstea) at (1,0) + {\includegraphics[width=1cm,keepaspectratio]{presentation_irstea/CouvCadreMarineGH}}; + \useasboundingbox(0,0) rectangle(\the\paperwidth,1.2); +\def\tempa{1#2}% Third example https://tex.stackexchange.com/a/286903/124910 +\if\tempa1% + {\node[anchor=west, gris,font=\Large] at (1.5,0.41){#1};}% +\else% + {\node[anchor= west, gris,font=\Large] at (1.5,0.61){#1};% + \node[anchor= west, ocean,font=\large] at (1.5,0.11){\textcolor{ocean}{\textsc{#2}}};}% +\fi + \end{tikzpicture} + \end{beamercolorbox} +} \ No newline at end of file -- GitLab