5

I have several similar slides in beamer. Each slide has 2 parts side by side. On the left hand, there is a tikzpicture in a minipage, it is same for all the slides; On the right hand, there are several blocks, some slides have more blocks, some have less. What I notice is, due to the different length of the blocks of the different slides, the position of the left hand changes - This is not what I want. I would like the height of the left hand to remain for all the slides, which is independent of the length and height of the right hand. Does anyone know how to do it?

Here are 2 typical slides, one could notice that the position of the left rectangle is not same between the 2 slides...

\documentclass{beamer}
\usetheme{Boadilla}
\usepackage{color}
\usepackage{tikz}
\usepackage{framed}
\usepackage{multicol}
\usepackage{xifthen}% http://ctan.org/pkg/xifthen
\begin{document}

\begin{frame}
  \begin{columns}
    \begin{column}{0.32\textwidth}
      \resizebox{0.66\textwidth}{!}{%  
        \begin{minipage}[t][10cm][t]{\linewidth-2\fboxsep-2\fboxrule}% Remove fbox rule/sep width
          \hspace*{-1em}{\begin{tikzpicture}[thick, scale=0.4]
              \filldraw[fill=white!20] (2,2) rectangle (6,12);
            \end{tikzpicture}}
        \end{minipage}}
    \end{column}
    \begin{column}{0.64\textwidth}
      \begin{alertblock}
        a \vspace{2cm} b
      \end{alertblock}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \begin{columns}
    \begin{column}{0.32\textwidth}
      \resizebox{0.66\textwidth}{!}{%  
        \begin{minipage}[t][10cm][t]{\linewidth-2\fboxsep-2\fboxrule}% Remove fbox rule/sep width
          \hspace*{-1em}{\begin{tikzpicture}[thick, scale=0.4]
              \filldraw[fill=white!20] (2,2) rectangle (6,12);
            \end{tikzpicture}}
        \end{minipage}}
    \end{column}
     \begin{column}{0.64\textwidth}
      \begin{alertblock}
        a \vspace{7cm} b
      \end{alertblock}
    \end{column}
  \end{columns}
\end{frame}
\end{document}
  • Can you please provide a complete document illustrating the undesired bahaviour? – Gonzalo Medina Aug 16 '12 at 20:43
  • Related: tex.stackexchange.com/questions/51487/… – percusse Aug 16 '12 at 20:45
  • @percusse, the option [T] does not solve my problem, because the height of the left hand is still dependent to the height of the right hand - that is not what I want... – SoftTimur Aug 16 '12 at 21:04
  • If you can give a complete code we can check otherwise there is not much to guess. – percusse Aug 16 '12 at 21:16
  • I have amended the OP with a complete example, I think maybe it is because the block in the second slide is too long for the left hand... – SoftTimur Aug 16 '12 at 21:36
8

You can achieve a consistent top alignment, if you set the optional parameters for both the frame and the columns environment:

\begin{frame}[t] % align frame content to top
  \begin{columns}[T] % align all columns to top of first line
    % definition of individual columns
  \end{columns}
\end{frame}

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.