8

I'm using a custom beamer theme from my university. The frametitle height depends on whether any characters extend below the baseline. A frametitle named "example" is higher than a title named "test". This leads to jumping blocks when the content blocks are top-aligned.

The frametitle is defined as follows:

%frametitle

\setbeamertemplate{frametitle}
{
\vspace{2mm} \hspace*{-4mm}
\vbox{\hsize=10cm\bfseries\insertframetitle}

\begin{textblock*}{15mm}(110mm,4mm)
\includegraphics[width=14mm]{\logo} 
\end{textblock*}

\begin{textblock*}{1.5mm}(1mm,1mm)
\begin{pgfpicture}{0mm}{0mm}{1.5mm}{9mm}
    \color{green100}
    \pgfpathrectangle{\pgfpoint{0mm}{0mm}}{\pgfpoint{1.5mm}{9mm}}
    \pgfusepath{fill}
\end{pgfpicture}%
\end{textblock*}

}

Presentation example of jumping blocks:

\documentclass[t]{beamer}

\usetheme{jumping-theme}
\begin{document}

\begin{frame}
 \frametitle{test}
 \begin{block}{test}
  t
 \end{block}
\end{frame}

\begin{frame}
 \frametitle{Example}
 \begin{block}{example}
  e
 \end{block}
\end{frame}

\end{document}

Is there any way to fix the frametitle height? I thought the \vbox with height parameter would take care of this, but it doesn't.

  • 1
    This should fix it: replace \insertframetitle with \strut\insertframetitle. – Gonzalo Medina Apr 25 '13 at 13:03
  • Possibly also \strut at the end – egreg Apr 25 '13 at 13:09
9

Replace

\vbox{\hsize=10cm\bfseries\insertframetitle}

with

\vbox{\hsize=10cm\bfseries\strut\insertframetitle\strut}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.