add subtitles
This commit is contained in:
parent
71b96da8ee
commit
4e1fd95271
1 changed files with 45 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue