From f2d73d3ab22b3f658640ccd21a24df0a7bf36405 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 1 Jun 2023 19:34:15 +0200 Subject: [PATCH] update projektor --- presentation/projektor.sty | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/presentation/projektor.sty b/presentation/projektor.sty index 8f09ca9..1c473c7 100644 --- a/presentation/projektor.sty +++ b/presentation/projektor.sty @@ -69,3 +69,48 @@ % Pas de préfix pour les figures \RequirePackage[figurename=]{caption} + +% Support des sous-titres +\makeatletter +\newcommand\startsubtitle{ + \renewcommand{\metropolis@frametitlestrut@start}{ + \rule{0pt}{1ex + + \totalheightof{ + \ifcsdef{metropolis@frametitleformat}{\metropolis@frametitleformat X}{X} + } + } + } + \renewcommand{\metropolis@frametitlestrut@end}{ + \rule[-3ex]{0pt}{\metropolis@frametitle@padding} + } +} + +\newcommand\stopsubtitle{ + \renewcommand{\metropolis@frametitlestrut@start}{ + \rule{0pt}{\metropolis@frametitle@padding + + \totalheightof{ + \ifcsdef{metropolis@frametitleformat}{\metropolis@frametitleformat X}{X} + } + } + } + \renewcommand{\metropolis@frametitlestrut@end}{ + \rule[-\metropolis@frametitle@padding]{0pt}{\metropolis@frametitle@padding} + } +} +\makeatother + +\setbeamercolor{framesubtitle}{fg=white} +\setbeamerfont{framesubtitle}{series=\mdseries} +\addtobeamertemplate{frametitle}{ + \ifx\insertframesubtitle\empty\else + \startsubtitle + \fi +}{ + \ifx\insertframesubtitle\empty\else + \vspace{-4ex} + \usebeamerfont{framesubtitle} + \usebeamercolor[fg]{framesubtitle} + \insertframesubtitle + \stopsubtitle + \fi +}