1

Consider this example:

\documentclass{beamer}
\AtBeginSection[]{
  \begin{frame}
    \vspace{3cm}
    \centering
    \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
      \Large\insertsectionhead\par%                                                                                                                                                                         
    \end{beamercolorbox}
    \vfill
  \end{frame}
  }

\AtBeginSubsection[]{
  \begin{frame}
    \vspace{3cm}
    \centering
    \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
      \Large\insertsectionhead\par%                                                                                                                                                                         
      \vspace{0.5cm}
      \large\insertsubsectionhead\par%                                                                                                                                                                      
    \end{beamercolorbox}
    \vfill
  \end{frame}
  }
\begin{document}
\section{Section 1}
\subsection{Subsection 1 A}
\end{document}

I use \vspace with the intention to fix the positions of section and subsection heads. However, when viewed in a slide mode, the section head is changing position when moving from section title page to subsection title page.

How to solve?

4

The problem is that by default the frame content is vertically centered and needs to be aligned to the top. This can be achieved by mean of the [t] option given globally as in \documentclass[t]{beamer} or individually for a particular frame as in \begin{frame}[t].

MWE

\documentclass[t]{beamer}
\AtBeginSection[]{
  \begin{frame}
    \vspace{3cm}
    \centering
    \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
      \Large\insertsectionhead\par%                                                                                                                                                                         
    \end{beamercolorbox}
    %\vfill
  \end{frame}
  }

\AtBeginSubsection[]{
  \begin{frame} % or  \begin{frame}[t] (if not set globally)
    \vspace{3cm}
    \centering
    \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
      \Large\insertsectionhead\par%                                                                                                                                                                         
      \vspace{0.5cm}
      \large\insertsubsectionhead\par%                                                                                                                                                                      
    \end{beamercolorbox}
    %\vfill
  \end{frame}
  }
\begin{document}
\section{Section 1}
\subsection{Subsection 1 A}
\end{document}

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.