[Tex/LaTex] Forcing beamer blocks to be the same height — interaction with figures

beamerbeamerposterblockcolumns

I am trying to make a beamer poster. I am organizing the poster in columns. In two of the columns, I would like to align some blocks half-way down the page. My current approach to this is to try to force the blocks above them to be the same height, although I am open to other suggestions. I am inserting \vboxs inside the blocks to try to set their height. This works to some extent, but is interacting with vertical padding and leads to different effective heights depending on whether the block contains text or a figure. What is the best way to get the second row of blocks to be vertically aligned?

enter image description here

Here is my not quite minimal example

\documentclass[]{beamer}
% Set up as beamerposter
\usepackage[orientation=landscape,size=A2,scale=1.47,debug]{beamerposter}
\usetheme{Modified}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{textgreek}
\usepackage[utf8]{inputenc}
\graphicspath{{./figures/}}
\usepackage[super]{nth}
\usepackage{grffile}
\usepackage{amsmath,amsthm, amssymb, latexsym}
\usepackage{subcaption}
\usepackage{lipsum}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document information
\title{Title}
\author[]{Authors}
\institute[]{
Institute1\\
Institute2
}

% Make the figure caption labels bold
%\setbeamerfont{caption}{series=\bfseries}
% Beamer disables figure numbering by default (it assumes figure numbers on 
% slides would not make sense). This command restores autonubering
\setbeamertemplate{caption}[numbered]
\setbeamerfont{caption name}{series=\bfseries}
\setbeamertemplate{caption label separator}[period]

\begin{document}

% beamer has a problem filling vertical space in colums
% have to manually specify column heights 
% 
\newlength{\colheightb}
\setlength{\colheightb}{0.8775\paperheight}

% beamer can't really vertically align blocks properly
% Workaround is to do manual alignment
% 
\newlength{\blockheight}
\setlength{\blockheight}{23cm}

% Latex places too much space beneath figure captions.
% This variable makes an adjustment
\setlength{\belowcaptionskip}{-0.5ex}

% I want the scatter plots to be exactly the same size
\newlength{\scatterwidth}
\setlength{\scatterwidth}{30cm}

% There was too much space between the title and the blocks, this was the patch
\newlength{\yfudge}
\setlength{\yfudge}{-0.85cm}

\begin{frame}{}
\begin{columns}[T, totalwidth=\textwidth]

\begin{column}{.49\linewidth}
\vspace{\yfudge}
\vbox to \colheightb{%
    \begin{block}{Section}
        \vbox to \blockheight{
        The block containing text is a little bit taller, and also the vertical padding between the title and the text is reduced (eliminated?).
        }
    \end{block}

    \begin{block}{Section}
    \end{block}    
    \vfill
}
\end{column}

\begin{column}{.49\linewidth}
\vspace{\yfudge}
\vbox to \colheightb{%
    \begin{block}{Section}
        \vbox to \blockheight{

        \begin{figure}[H]
        \vspace{10ex}
        \caption{The block contianing a figure is not the correct height!}
        \end{figure}
        }
    \end{block}

    \begin{block}{Section}
    {
    }
    \end{block}
    \vfill
}
\end{column}


\end{columns}
\end{frame}
\end{document}

And here is the style document

\usepackage{grffile}
\usepackage{calc}
\usepackage{tcolorbox}  
\usepackage{lmodern}

\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer
\mode<presentation>
\setbeamercolor{section in head/foot}{use=structure,bg=structure.fg!25!bg}
\useoutertheme[subsection=false]{miniframes}
\setbeamertemplate{frametitle}[default][center]
\AtBeginDocument{%
  {
    \usebeamercolor{section in head/foot}
  } 
  \pgfdeclareverticalshading{beamer@headfade}{\paperwidth}
  {%
    color(0cm)=(bg);
    color(1.25cm)=(section in head/foot.bg)%
  }
  \setbeamercolor{section in head/foot}{bg=}
}
\beamertemplatedotitem
\mode
<all>

\setbeamercolor{headline}{bg=black,fg=white}
\setbeamercolor{title in headline}{bg=black,fg=white}
\setbeamercolor{author in headline}{bg=black,fg=white}
\setbeamercolor{institute in headline}{bg=black,fg=white}
\setbeamercolor{date in headline}{bg=black,fg=white}
\setbeamercolor{block body}{bg=white,fg=black}
\setbeamercolor{block title}{bg=black,fg=white}

\setbeamertemplate{headline}{  
\leavevmode
\begin{beamercolorbox}[wd=\paperwidth]{headline}
\vskip1cm
\raggedright
\usebeamercolor{title in headline}{
\color{fg}{\fontsize{110}{110}\selectfont {\inserttitle}}\\[3ex]}
\usebeamercolor{author in headline}{
\color{fg}\LARGE{\insertauthor}\\[1ex]}
\usebeamercolor{institute in headline}{
\color{fg}\large{\insertinstitute}\\[1ex]}  
\vskip2ex
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
\rule{0pt}{3pt}
\end{beamercolorbox}
}
% no navigation on a poster
\setbeamertemplate{navigation symbols}{}  


% Use rounded blocks
%\setbeamertemplate{blocks}[rounded]

% Larger titles for the block
\makeatletter 
\newcommand\semiHuge{\@setfontsize\semiHuge{45}{40}}
\makeatother
\setbeamerfont*{block title}{family=\sffamily,series=\bfseries,size=\semiHuge}

Edit: Update: I was able to finish my poster by manually adjusting the block heights until they approximately matched. This is not a solution, but it will have to do.

Edit: stacking column environments doesn't work as needed

It was suggested that proper vertical alignment could be achieved by stacking two column environments. This works if there are only two columns, but my use case is more complex, which wasn't reflected in the previous minimal example. I have created a new minimal example illustrating why the column alignment approach isn't suitable here, as it would require nesting column environments which creates new vertical alignment issues at the top.

enter image description here

\documentclass[]{beamer}
% Set up as beamerposter
\usepackage[orientation=landscape,size=A2,scale=1.47,debug]{beamerposter}
\usetheme{Modified}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{textgreek}
\usepackage[utf8]{inputenc}
\graphicspath{{./figures/}}
\usepackage[super]{nth}
\usepackage{grffile}
\usepackage{amsmath,amsthm, amssymb, latexsym}
\usepackage{subcaption}
\usepackage{lipsum}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document information
\title{Title}
\author[]{Authors}
\institute[]{
Institute1\\
Institute2
}

% Make the figure caption labels bold
%\setbeamerfont{caption}{series=\bfseries}
% Beamer disables figure numbering by default (it assumes figure numbers on 
% slides would not make sense). This command restores autonubering
\setbeamertemplate{caption}[numbered]
\setbeamerfont{caption name}{series=\bfseries}
\setbeamertemplate{caption label separator}[period]

\begin{document}

% beamer has a problem filling vertical space in colums
% have to manually specify column heights 
% 
\newlength{\colheightb}
\setlength{\colheightb}{0.7\paperheight}

% beamer can't really vertically align blocks properly
% Workaround is to do manual alignment
% 
\newlength{\blockheight}
\setlength{\blockheight}{10cm}

% Latex places too much space beneath figure captions.
% This variable makes an adjustment
\setlength{\belowcaptionskip}{-0.5ex}

% There was too much space between the title and the blocks, this was the patch
\newlength{\yfudge}
\setlength{\yfudge}{-0.85cm}

\begin{frame}{}
\begin{columns}[T, totalwidth=\textwidth]

\begin{column}{.32\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section}
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    \end{block} 
    \vfill

    \begin{block}{Section}
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    \end{block}   
}
\end{column}

\begin{column}{.67\linewidth}
\vbox to \colheightb{%

    \begin{columns}[t,totalwidth=\textwidth]
        \begin{column}{.48\linewidth}
            \begin{block}{Section}
                \vbox to \blockheight{Different height, and vertical padding between is reduced?!}
            \end{block}
        \end{column}
        \begin{column}{.48\linewidth}
            \begin{block}{Section}
                \begin{figure}[H]
                \vbox to \blockheight{
                \vspace{10ex}
                \caption{The block contianing a figure is not the correct height!}}
                \end{figure}
            \end{block}
        \end{column}
    \end{columns}
    \begin{columns}[T, totalwidth=\textwidth]
        \begin{column}{.48\linewidth}
            \begin{block}{Section}
            \end{block}    
        \end{column}
        \begin{column}{.48\linewidth}
            \begin{block}{Section}
            \end{block}
        \end{column}
    \end{columns}
    \vfill

}
\end{column}

\end{columns}
\end{frame}
\end{document}

Best Answer

Here's a suggestion using minipages instead of the column environment. The good thing with minipages is that you can specify the height. The vertical alignment is done with \hfill.

The command is \begin{minipage}[alignment][HEIGHT][alignment]{WIDTH}...\end{minipage}

The text and figures seem to align fine now but please let me know if it doesn't work as you want it to.

I also created a new environment (called MRuleBlock) that might simplify your code. The code generates two slides, one without the new environment and one with.

Code:

\documentclass[]{beamer}
% Set up as beamerposter
\usepackage[orientation=landscape,size=A2,scale=1.47,debug]{beamerposter}
\usetheme{Modified}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{textgreek}
\usepackage[utf8]{inputenc}
\graphicspath{{./figures/}}
\usepackage[super]{nth}
\usepackage{grffile}
\usepackage{amsmath,amsthm, amssymb, latexsym}
%\usepackage{subcaption}
\usepackage{lipsum}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document information
\title{Title}
\author[]{Authors}
\institute[]{
Institute1\\
Institute2
}

\newlength{\blockheight}
\setlength{\blockheight}{.5\textheight}
\newlength{\blockwidth}
\setlength{\blockwidth}{.31\textwidth}

\newenvironment{MRuleBlock}[3]{%
\begin{minipage}[t][#2][t]{#3}%
\begin{block}{#1}%
}{%
\end{block}%
\end{minipage}%
}


% Make the figure caption labels bold
%\setbeamerfont{caption}{series=\bfseries}
% Beamer disables figure numbering by default (it assumes figure numbers on 
% slides would not make sense). This command restores autonubering
\setbeamertemplate{caption}[numbered]
\setbeamerfont{caption name}{series=\bfseries}
\setbeamertemplate{caption label separator}[period]

\begin{document}
\begin{minipage}[t][\blockheight][t]{\blockwidth}
\begin{block}{Section}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\end{block}
\end{minipage}
\hfill
\begin{minipage}[t][\blockheight][t]{\blockwidth}
\begin{block}{Section}
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{block}
\end{minipage}
\hfill
\begin{minipage}[t][\blockheight][t]{\blockwidth}
\begin{block}{Section}

\end{block}
\end{minipage}

\begin{minipage}[t][][t]{\blockwidth}
\begin{block}{Section}
Different height, and vertical padding between is reduced?!
\end{block}
\end{minipage}
\hfill
\begin{minipage}[t][][t]{\blockwidth}
\begin{block}{Section}
\begin{figure}[H]
\caption{The block containing a figure is the correct height!}
\end{figure}
\end{block}
\end{minipage}
\hfill
\begin{minipage}[t][][t]{\blockwidth}
\begin{block}{Section}
\lipsum[1]
\end{block}
\end{minipage}

\newpage
\begin{MRuleBlock}{Section}{\blockheight}{\blockwidth}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\end{MRuleBlock}
\hfill
\begin{MRuleBlock}{Section}{\blockheight}{\blockwidth}
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{MRuleBlock}
\hfill
\begin{MRuleBlock}{Section}{\blockheight}{\blockwidth}

\end{MRuleBlock}

\begin{MRuleBlock}{Section}{}{\blockwidth}
Different height, and vertical padding between is reduced?!
\end{MRuleBlock}
\hfill
\begin{MRuleBlock}{Section}{}{\blockwidth}
\begin{figure}[H]
\caption{The block containing a figure is the correct height!}
\end{figure}
\end{MRuleBlock}
\hfill
\begin{MRuleBlock}{Section}{}{\blockwidth}
\lipsum[1]
\end{MRuleBlock}
\end{document}

Which gives:

Satisfying result

You can obviously play around with the parameters \blockheight and \blockwidth to fine tune the blocks.