# Different vertical spacing for beamer slides

I am preparing some slides with beamer.

The issue is that, it seems the \frame command treats things differently. That is, if the subsequent stuff is normal text or itemized environment, spacing is okay. If the subsequent thing is columns environment, it shifts the text up differently.

Am I right? What to do to avoid this behaviour?

%% document class
\documentclass[mathserif, t]{beamer}
\mode<presentation>{
\usetheme{Dresden}
\setbeamercovered{transparent}
}

\mode<handout>{
% tema simples para ser impresso
\usepackage[bar]{beamerthemetree}
% Colocando um fundo cinza quando for gerar transparências para serem impressas
% mais de uma transparência por página
\beamertemplatesolidbackgroundcolor{black!5}
}

\begin{document}
\frame{
\frametitle{Transfer Matrix Method TMM}
\begin{columns}
\column[t]{0.55\textwidth}
\begin{itemize}
\item Assuming a wave equation:
\begin{equation*}
\psi_j(x) = A_j \cdot e^{p_j(x)} + B_j \cdot e^{-p_j(x)}
\end{equation*}
\item Having a \emph{continuous} and \emph{smooth} curve requires boundary conditions.
\item For each \emph{slice} the subsequent $A_{j+1}$, $B_{j+1}$ parameters will be identified by the current $A_{j}$, $B_{j}$ parameters through:
{\scriptsize
\begin{equation*}
\begin{bmatrix}
A_{j+1} \\
B_{j+1}
\end{bmatrix}
=
M_j \cdot
\begin{bmatrix}
A_{j} \\
B_{j}
\end{bmatrix}
\end{equation*}
}
\end{itemize}
\column[t]{0.45\textwidth}
\begin{itemize}
\item Concatenating the different slices, one obtains:
\end{itemize}
{\scriptsize
\begin{equation*}
\begin{bmatrix}
A_{N-1} \\
B_{jN-1}
\end{bmatrix}
=
M_{N-1}  \ldots     M_{1} \cdot     M_{0}
\begin{bmatrix}
A_{0} \\
B_{0}
\end{bmatrix}
\end{equation*}
}
\end{columns}
}
\frame{ %The shifted up columns occurs here
\frametitle{Transfer Matrix Method TMM}
\begin{columns}
\column[t]{0.5\textwidth}
\textcolor{unibored}{This leads to tunnelling probability $T_x(E)$ which leads to knowing the current density $J(V)$.} %<- This is shifted up!
\column[t]{0.5\textwidth}
\begin{figure}[htbp]
\centering
\includegraphics[width= 0.8\textwidth]{}
\caption{Comparison between WKB and TMM transmission probabilities.}
\end{figure}
\end{columns}
\begin{columns}[t]
\column[]{0.5\textwidth}
\begin{block}{Benefits}
\begin{itemize}
\item Ability to simulate multi insulator structure.
\item Better mathematical accuracy.
\end{itemize}
\end{block}
\column[]{0.5\textwidth}
\begin{block}{Drawbacks}
\begin{itemize}
\item More complicated
\item Contains some try \& error options for into its details.
\end{itemize}
\end{block}
\end{columns}
}
\end{document}


Sorry about the lengthy code you can take out whatever you see unnecessary.

• What exactly is the problem? Please add pictures. – lhf Aug 14 '19 at 15:24
• I have recently added the picture and retested the code. It works okay if I replace the picture with text. It shifts down as shown by the red arrows when I add the picture though the picure is cropped right at the upper axis limits (i.e. very small white vertical space added from the picutre which is 541x440 pixels) – Mazen Aug 15 '19 at 17:23

With the help of the valign option (introduced by the adjustbox package) and the \captionof command from the caption package:

%% document class
\documentclass[t]{beamer}
\mode<presentation>{
\usetheme{Dresden}
\setbeamercovered{transparent}
}

\mode<handout>{
% tema simples para ser impresso
\usepackage[bar]{beamerthemetree}
% Colocando um fundo cinza quando for gerar transparências para serem impressas
% mais de uma transparência por página
\beamertemplatesolidbackgroundcolor{black!5}
}

\usepackage{caption}
\begin{document}

\frame{ %The shifted up columns occurs here
\frametitle{Transfer Matrix Method TMM}
\begin{columns}
\column[t]{0.5\textwidth}
\textcolor{blue}{This leads to tunnelling probability $T_x(E)$ which leads to knowing the current density $J(V)$.} %<- This is shifted up!
\column[t]{0.5\textwidth}
%\begin{figure}[htbp]
\centering
\includegraphics[width= 0.8\textwidth,valign=t]{example-image}
\captionof{figure}{Comparison between WKB and TMM transmission probabilities.}
%\end{figure}
\end{columns}
\begin{columns}[t]
\column[]{0.5\textwidth}
\begin{block}{Benefits}
\begin{itemize}
\item Ability to simulate multi insulator structure.
\item Better mathematical accuracy.
\end{itemize}
\end{block}
\column[]{0.5\textwidth}
\begin{block}{Drawbacks}
\begin{itemize}
\item More complicated
\item Contains some try \& error options for into its details.
\end{itemize}
\end{block}
\end{columns}
}
\end{document}

• Thanks and I understand that it’s possible to adjust the vertical spacing using valign. But from a programming point of view why does this thing happen? – Mazen Aug 15 '19 at 19:05