39

I need a frame looking like the image below in beamer. The 3rd column will have multirow text with an equation. There are no horizontal lines, neither do I need the boxes around each of the columns.

enter image description here

I tried \subfloat and \minipage. With \subfloat the text doesn't show up and with \minipage the images are placed one over other and the text is not wrapped.

\begin{tabular}{ccc}
\begin{minipage}{0.45\textwidth}
\includegraphics[scale=0.46]{images/fig1} 
\end{minipage}
\pause
&
\begin{minipage}{0.1\textwidth}
\includegraphics[scale=0.46]{images/fig2}
\end{minipage}
\pause
&
\begin{minipage}{0.45\textwidth}
\textbf{Title} \newline
                            text1 \newline 
                            text2 \newline
                            text3 \newline
\end{minipage}

\end{tabular}

How can I go about it?

1 Answer 1

74

beamer provides the columns environment. Within it, you specify a column environment with a given width. Together, the following generic structure is used:

\begin{columns}[<options>]
  \begin{column}{<width>}
    ...
  \end{column}
  ...
  \begin{column}{<width>}
    ...
  \end{column}
\end{columns}

It is best to specify the above <width> parameters as factors of \textwidth. As such, I've passed the option onlytextwidth to columns in the example below. Since these environments are inherent to beamer, it doesn't warrant using something like multicol. Here's an example of what you might be after - I used \rule{<width>}{<height>} to denote your graphics:

enter image description here

\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/a/94159/5764
\begin{document}
\begin{frame}
  \frametitle{This is a frame title}
  \begin{columns}[onlytextwidth]
    \begin{column}{0.4\textwidth}
      \centering
      \rule{100pt}{150pt}% Place your graphic here
    \end{column}
    \begin{column}{0.2\textwidth}
      \centering
      \rule{40pt}{150pt}% Place your graphic here
    \end{column}
    \begin{column}{0.4\textwidth}
    Here is some regular text in a column. And there is an equation
    \[
      f(x)=ax^2+bx+c
    \]
    Here is some more text.
    \end{column}
​  \end{columns}
\end{frame}
\end{document}​

Read the beamer package documentation (p 127, section 12.7 Splitting a Frame into Multiple Columns) for more information.


For adjusting the vertical alignment of the columns, you can add the t (for top) option to the columns environment:

enter image description here

\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/a/94159/5764
\usepackage[export]{adjustbox}
\begin{document}
\begin{frame}
  \frametitle{This is a frame title}
  \begin{columns}[onlytextwidth,t]
    \begin{column}{0.4\textwidth}
      \centering
      \includegraphics[width=40pt,height=150pt,valign=t]{example-image-a}% Place your graphic here
    \end{column}
    \begin{column}{0.2\textwidth}
      \centering
      \includegraphics[width=40pt,height=150pt,valign=t]{example-image-b}% Place your graphic here
    \end{column}
    \begin{column}{0.4\textwidth}
    Here is some regular text in a column. And there is an equation
    \[
      f(x)=ax^2+bx+c
    \]
    Here is some more text.
    \end{column}
​  \end{columns}
\end{frame}
\end{document}​

Note that the inclusion of graphics makes for some unintuitive output in terms of alignment. That's before alignment at the top implies the "baseline of the top line." And since graphics are placed in a single line, their top turns out to be more like their bottom. To correct for this, we use adjustbox's valign=t option, which is export to be used as part of graphicsx's \includegraphics options.

2
  • 1
    Is there any way to put the text at top of the column aligned with the pictures? In your example, it is not and I have not achieved it with the options for columns command Commented Jan 9, 2016 at 15:51
  • 3
    @MarcosAlex: See the updated answer.
    – Werner
    Commented Jan 9, 2016 at 19:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .