I am trying to add two minipages beside each other in Latex beamer and I am getting the error ! Undefined control sequence.
I appreciate any help.
\documentclass[xcolor=dvipsnames]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{graphicx} % 30.05 13:01 adedd [demo]
\usepackage{wrapfig}
\usepackage{tikz}
\usetikzlibrary{shapes, arrows, shadows}
\usepackage{amsmath}
\usetheme{Antibes}
\newcommand{\twoobjects}[2]{%
\centering \leavevmode\vbox{\hbox{#1}\nointerlineskip\hbox{#2}} %
}
\usecolortheme[named=Maroon]{structure}
\setbeamercovered{transparent}
\setbeamertemplate{footline}[page number]
\title{Test Test}
\author{Test Test}
\institute{Test Test}
\date{11.02.15}
\usepackage{float}
\begin{document}
\begin{frame}
\frametitle{Related Projects}
\begin{block}{Test Test}
Test Test Test Test
\begin{itemize}
\item Test, Test, Test,...
\end{itemize}
\end{block}
\begin{figure}[H]
\centering
\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=.8\linewidth, height=360px]{img/moovit_2}
\captionof{figure}{Moovit map modes}
\label{fig:test1}
\end{minipage}%
\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=.8\linewidth, height=360px]{img/moovit_4}
\captionof{figure}{Moovit route monitoring}
\label{fig:test2}
\end{minipage}
\end{figure}
\end{frame}
\end{document}
Best Answer
Command
\captionof
is provided by packages likecapt-of
,caption
or anyKOMA
-class. It is useful if you want to give a caption in a non-floating environment, which can be useful at times.Here, we have a
beamer
case. Floating is disabled in beamer, the user is solely responsible that suff is fitting on the frame. You are using packagefloat
along with theH
placement specifier, which would again disable the floating.You were using
minipage
s to align the graphics, and give two separate captions. You don't needcaptionof
though.If you want to have a single caption for both figures, no problem as well
:-)
In general, a presentation is a visual/oral thing. Any text should aid the speaker. In my opinion, it is best just to say what is in the picture: «And here you can see the platypus doing the jazz dance«.