From 75a201b1536aa0517e16ff43d400a8bd22e95a5b Mon Sep 17 00:00:00 2001 From: Cedric Ware <cedric.ware@telecom-paristech.fr> Date: Sat, 16 May 2020 13:10:08 +0200 Subject: [PATCH] Fix helvet font selection. More flexible dimensions in frame title, enable on-the-fly change. --- texinputs/beamerthemetptnew.sty | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/texinputs/beamerthemetptnew.sty b/texinputs/beamerthemetptnew.sty index 5046844..7dea741 100644 --- a/texinputs/beamerthemetptnew.sty +++ b/texinputs/beamerthemetptnew.sty @@ -56,8 +56,8 @@ logoipp/.is if=tpt@logoipp, helvet/.is choice, helvet/.default=true, - helvet/false/.code={\let\sfdefault=\tpt@save@sffamily}, - helvet/true/.code={\renewcommand\sfdefault{phv}}, + helvet/false/.code={\let\sfdefault=\tpt@save@sffamily\normalfont}, + helvet/true/.code={\renewcommand\sfdefault{phv}\normalfont}, nohelvet/.style={helvet=false}, framecount/.is choice, framecount/false/.code={\setbeamertemplate{page in head/foot}[plain]}, @@ -366,23 +366,28 @@ % Frame title +\tpt@deflength{\tptframetitlesep}{3ex} +\tpt@deflength{\tptframetitlefriezewidth}{19.5mm} +\tpt@deflength{\tptframetitlefriezeheight}{5mm} + \defbeamertemplate*{frametitle}{tpt default}[1][left] { \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}% - \@tempdima=\paperwidth% - \advance\@tempdima by -1.95cm% les 3 blocs de couleur - \advance\@tempdima by -3ex% + \setlength{\@tempdima}{% + \dimexpr \paperwidth - \tptframetitlefriezewidth - \tptframetitlesep + \relax}% \begin{beamercolorbox}[sep=0cm,#1,wd=\paperwidth]{frametitle} \usebeamerfont{frametitle}% \if@tempswa\else\csname beamer@fte#1\endcsname\fi% - \begin{minipage}[b]{1.95cm} + \begin{minipage}[b]{\tptframetitlefriezewidth} \iftpt@infolines\vspace*{.15cm}\else\vspace*{.5cm}\fi \mbox{% - \tptfrieze{0.65cm}{.5cm}{% + \tptfrieze{% + 0.333\tptframetitlefriezewidth}{\tptframetitlefriezeheight}{% page in head/foot.bg,dept in head/foot.bg,title in head/foot.bg} }\par% - \end{minipage} - \hspace*{1ex} + \end{minipage}% + \hspace*{\tptframetitlesep}% \begin{minipage}[c]{\@tempdima} \ifx\insertframesubtitle\@empty% \strut\insertframetitle\strut\par% @@ -448,6 +453,10 @@ \fi } +% +% Macro pour recalculer la hauteur des haut et bas de page. +% +\newcommand*\tptcalculateheadfoot{\beamer@calculateheadfoot} % .. from tptthemtheme? % Contents frame (FIXME part frame option). -- GitLab