[Tex/LaTex] Set the position of blocks in beamer presentations

beamerblock

I am writing a beamer presentation and I want a block at the same position in each frame. This is the code:

\documentclass[notes=show,beamer]{beamer}

\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{mathpazo}
\usepackage{hyperref}
\usepackage{multimedia}
\usepackage{graphics}

\setcounter{MaxMatrixCols}{10}
\usetheme{Boadilla}


\begin{document}

\title{Models}

\maketitle


\begin{frame}


\begin{block}{Definition}
\begin{equation*}
\boldsymbol{X}=\left\{ 
\begin{array}{ccccc}
\\ 
\\ 
\\\ 
\\ 
\end{array}%
\right. 
\end{equation*}
\end{block}

\bigskip example

\end{frame}


\begin{frame}

\begin{block}{Definition}
\begin{equation*}
\boldsymbol{X}=\left\{ 
\begin{array}{ccccc}
\\ 
\\ 
\\\ 
\\ 
%
\end{array}
\right. 
\end{equation*}
\end{block}

\textsl{Types of models}

\bigskip

\begin{tabular}{ll}
\textbf{1} &  \\ 
&  \\ 
2 &  \\ 
&  \\ 
3 & 
\end{tabular}

\end{frame}

\end{document}

But with this, code the block "Definition" in the second and in the third frames has a different position. Is there a way to keep the position of the block fixed?

Best Answer

Using the frame positioning option [t] with frames 2 and 3 will make the two frames start at the same vertical position (top). You can deliberately add some extra vertical space before the frame starts to better manage the visual appearance.

\documentclass[notes=show]{beamer}    
\usepackage{amsfonts,lmodern}
\usepackage{amsmath}
\usepackage{mathpazo}
\usepackage{hyperref}
\usepackage{multimedia}
\usepackage{graphics}

\setcounter{MaxMatrixCols}{10}
\usetheme{Boadilla}    

\begin{document}    
\title{Models}    
\maketitle    

\begin{frame}[t]
\vspace{2em}

\begin{block}{Definition}
\begin{equation*}
\boldsymbol{X}=\left\{ 
\begin{array}{ccccc}
\\ 
\\ 
\\\ 
\\ 
\end{array}%
\right. 
\end{equation*}
\end{block}

\bigskip example

\end{frame}    

\begin{frame}[t]
\vspace{2em}

\begin{block}{Definition}
\begin{equation*}
\boldsymbol{X}=\left\{ 
\begin{array}{ccccc}
\\ 
\\ 
\\\ 
\\ 
%
\end{array}
\right. 
\end{equation*}
\end{block}

\textsl{Types of models}

\bigskip

\begin{tabular}{ll}
\textbf{1} &  \\ 
&  \\ 
2 &  \\ 
&  \\ 
3 & 
\end{tabular}    
\end{frame}

\end{document}

enter image description here