4

I've the following code (see below) to put 6 pictures in one slide in a nice manner (I got this code from a different question/answer on this site). However, it is unclear to me how to caption each of 6 pictures. Could anyone please explain?

\documentclass[fleqn]{beamer}
\usepackage{amsmath}

\usepackage{amssymb}

\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{subfigure}
\evensidemargin -1cm \textheight=24.5cm \textwidth=16.cm
\oddsidemargin=0cm \topmargin=-1cm \topskip=0cm \headheight=0cm
\headsep=0cm
\usepackage{beamerthemesplit}
\usetheme{Goettingen}
\usepackage{color}

\begin{frame}
    \begin{columns}[t]
        \frametitle{Bla}
        \column{.3\textwidth}
        \centering
        \includegraphics[width=3.0cm,height=2.5cm]{pic1}\\
        \includegraphics[width=3.0cm,height=2.5cm]{pic4}

        \column{.3\textwidth}
        \centering
        \includegraphics[width=3.0cm,height=2.5cm]{pic2}\\
        \includegraphics[width=3.0cm,height=2.5cm]{pic5}

        \column{.3\textwidth}
        \centering
        \includegraphics[width=3.0cm,height=2.5cm]{pic3}\\
        \includegraphics[width=3.0cm,height=2.5cm]{pic6}
    \end{columns}
    \begin{center}
        \scalebox{0.8}{%
            $E = m c^2$
        }
    \end{center}
\end{frame}
1

2 Answers 2

4

Like this?

enter image description here

For image placement I suggest to use tabularx:

\documentclass{beamer}
%\usepackage{amsmath}
%\usepackage{amssymb}
%\usepackage{epsfig}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage{graphicx}
%\usepackage{subfigure}% dont't use, it is obsolete
%\evensidemargin -1cm \textheight=24.5cm \textwidth=16.cm
%\oddsidemargin=0cm \topmargin=-1cm \topskip=0cm \headheight=0cm
%\headsep=0cm
\usepackage{beamerthemesplit}
\usetheme{Goettingen}
%\usepackage{color}% here make option clash, move to beamer option or simple delete

    \begin{document}
\begin{frame}[t]
\frametitle{Bla}
    \begin{figure}
\begin{tabularx}{\textwidth}{CCC}
\includegraphics[width=3.0cm,height=2cm]{example-image-a}
\caption{fig 1}
    &   \includegraphics[width=3.0cm,height=2cm]{example-image-b}
        \caption{fig 2}
        &   \includegraphics[width=3.0cm,height=2cm]{example-image-c}
            \caption{fig 3}
    \\[-3ex]
\includegraphics[width=3.0cm,height=2cm]{example-image-a}
\caption{fig 4}
    &   \includegraphics[width=3.0cm,height=2cm]{example-image-b}
        \caption{fig 5}
        &   \includegraphics[width=3.0cm,height=2cm]{example-image-c}
            \caption{fig 6}     
\end{tabularx}\vspace{-3ex}
    \end{figure}
\[
\displaystyle E = m c^2
\]
\end{frame}
    \end{document}

Hopefully the code is enough self-explanatory

0
3

If you arrange the content inside a tabular, you can easily manage the location of the captions:

enter image description here

\documentclass{beamer}

\let\Tiny\tiny% http://tex.stackexchange.com/a/94159/5764

\usepackage{graphicx}

\usepackage{beamerthemesplit}
\usetheme{Goettingen}

\begin{document}

\begin{frame}
  \frametitle{Frame title}
  \makebox[\textwidth]{%
    \begin{tabular}{ c c c }
      \includegraphics[width=3.0cm,height=2.5cm]{example-image-a} &
      \includegraphics[width=3.0cm,height=2.5cm]{example-image-b} &
      \includegraphics[width=3.0cm,height=2.5cm]{example-image-c} \\
      \footnotesize (a) &
      \footnotesize (b) &
      \footnotesize (c) \\[\medskipamount]
      \includegraphics[width=3.0cm,height=2.5cm]{example-image-c} &
      \includegraphics[width=3.0cm,height=2.5cm]{example-image-a} &
      \includegraphics[width=3.0cm,height=2.5cm]{example-image-b} \\
      \footnotesize (d) &
      \footnotesize (e) &
      \footnotesize (f)
    \end{tabular}%
  }

  \begin{center}
      \scalebox{0.8}{%
          $E = m c^2$
      }
  \end{center}
\end{frame}

\end{document}

You must log in to answer this question.

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