1

I need to divide a frame into two columns and in each column i put two image taht one above the other.

\documentclass[compress,red]{beamer}
\usepackage{etex}
\mode<presentation>
\usetheme{Warsaw}
\usepackage[applemac]{inputenc}%les accents pour mac
\usepackage{caption}
\captionsetup{font=small}
\captionsetup{labelformat=empty}
\usepackage{subfigure}
 \usepackage{amsmath}
 \usepackage{graphicx}
\usepackage{array,ragged2e}
\usepackage{setspace}
\usepackage{multirow} 
  \begin{document}
   \section{section1 }
   \frame[shrink]{\frametitle{Titre de la fenetre}
   \begin{columns}
  \column{1.5in}
   \begin{figure}[!h]
   \centering
  \fbox{
   \mbox{\subfigure[Scénario 1]{\includegraphics[width=3cm]      {listefigures/scenario1.png}}\\
     \subfigure[Scénario 2]{\includegraphics[width=3cm]{listefigures/sc10.png}}}}
     \caption{Image 1} 
    \end{figure}
    \column{1.5in}
     \begin{figure}[!h]
    \centering
       \fbox{
     \mbox{\subfigure[Scénario 1]{\includegraphics[width=3cm]{listefigures/scenario2.png}}\\
     \subfigure[Scénario 2]{\includegraphics[width=3cm]{listefigures/sc11.png}}}}
      \caption{Image 2} 
       \end{figure}
        \end{columns}
               }


         \end{document}
Troy
  • 13,741
LearnToGrow
  • 2,579
  • Strip Down the unneccessary packages to get a right MWE as per http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl. Is this Add four images on a beamer frame one help you ? – texenthusiast Nov 17 '13 at 05:04
  • @texenthusiast, ok I am editing my code – LearnToGrow Nov 17 '13 at 05:09
  • You should never use the figure and table environments in beamer. These are floating objects. You should just use \includegraphics{...} for images and \begin{tabular}... \end{tabular} for tables. See Figure in Beamer, General question on floating and non-floating objects in LaTeX and Label and caption without float for some discussion. (And for beamer you probably shouldn't use captions anyway.) – Alan Munn Nov 17 '13 at 05:11
  • @AlanMunn, Ohhh! Then, beamer is very very very awful and I will not use it in the future. Oh my god. I am doing a bad choice. PowerPoint is very easy and very flexible against Beamerrrrrrrr!! – LearnToGrow Nov 17 '13 at 05:24
  • 1
    @phdstudent No, beamer is not very awful. The problem is that there are various things that you don't yet understand about LaTeX, and so you are making many (common) beginner's mistakes. – Alan Munn Nov 17 '13 at 05:26
  • @AlanMunn, I have used latex since 2010 and I have written scientific article and so on but the beamer is the first attack and it will be the last. – LearnToGrow Nov 17 '13 at 05:27
  • I think that beamer is still limited against latex. – LearnToGrow Nov 17 '13 at 05:31
  • @phdstudent If you don't know that figure is a floating environment, you are still a beginner, even if you've been using LaTeX for ten years. Sorry. Yes, beamer takes some getting used to, but there is an excellent tutorial in the manual, and it really is quite powerful. If you have any math at all in your presentation you surely can't be serious that Powerpoint is a better option. – Alan Munn Nov 17 '13 at 05:33
  • @AlanMunn, for the equation, I have used beamer.But, I am using figure in beamer and it works perfectly even when I use column. But , I need to get image above the other. I did not understand what do you mean by floating. I am not going deeper in latex. – LearnToGrow Nov 17 '13 at 05:42
  • @phdstudent -- Put this command in the figure environment \captionsetup[subfigure]{labelformat=empty}. You need caption package to do this. If you don't want the caption too then simply don't write into \subcaptionbox{none here}. Sorry the system thinks we are chatting so I put my answer here. – Jesse Nov 17 '13 at 08:45

1 Answers1

3

In this approach, subcaption package (which provides subfigure envrionment too) is used; instead of subfigure package. Please note that some packages have been disable to prevent crash.

Edit:

  1. To remove the label (a) and (b), use \captionsetup[subfigure]{labelformat=empty} from caption package.
  2. To remove the subcaption wording, simply delete the subcaption.
  3. To increase the vertical space between two images, use \vskip xxpt.

enter image description here

\documentclass[compress,red]{beamer}
\usepackage{etex}
\mode<presentation>
\usetheme{Warsaw}
%\usepackage[applemac]{inputenc}  %les accents pour mac. for xelatex, pdflatex is used here
\usepackage{caption}
\captionsetup{font=small}
\captionsetup{labelformat=empty}
\usepackage[list=true]{subcaption}
%\usepackage[demo]{graphicx}  % beamer already load this
\usepackage{multicol}
  \usepackage{animate}
%  \usepackage{movie 15}
 \usepackage{amsmath}
 \usepackage{epsfig}
\usepackage[all,knot]{xy}
\xyoption{arc}
\usepackage{url}
\usepackage{array,ragged2e}
\usepackage{multimedia}
\usepackage{hyperref}
\usepackage{setspace}
\usepackage{multirow} 

\begin{document}
   \section{section1}
   \begin{frame}[shrink]
   \frametitle{Titre de la fenetre}
\begin{columns}
  \column{2in}
\begin{figure}
\centering
 \subcaptionbox{subcaption}{\includegraphics[width=0.4\textwidth]{example-image-a}}\\
 \subcaptionbox{subcaption}{\includegraphics[width=0.4\textwidth]{example-image-b}}
 \caption{Image 1} 
\end{figure}
  \column{2in}
\begin{figure}
\centering
 \subcaptionbox{Scénario 1}{\includegraphics[width=0.4\textwidth]{example-image-a}}\\
 \subcaptionbox{Scénario 2}{\includegraphics[width=0.4\textwidth]{example-image-b}}
 \caption{Image 2}
\end{figure}
 \end{columns}
 \end{frame}
\end{document}
David Carlisle
  • 757,742
Jesse
  • 29,686