I want to place captions at right/left side of pictures in a beamer
presentation. However, the following code does not work due to incompatibilities between beamer
and floatrow
.
\documentclass{beamer}
\setbeamertemplate{caption}{\insertcaption}
\usepackage{floatrow}
\begin{document}
\begin{frame}
\begin{figure}
\floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,bottom},capbesidewidth=0.4\textwidth}}]{figure}[\FBwidth]
{\caption{Example image}\label{fig:example}}
{\includegraphics[width=0.5\textwidth]{example-image}}
%\includegraphics[width=0.5\textwidth]{example-image}
%\caption{Example image}
%\label{fig:example}
\end{figure}
\end{frame}
\end{document}
Best Answer
Here is a solution using a
columns
environment:Edit
Here, I define a new command (
\figurewithcaptionatside
) with 3 parameters (first parameter is optional):the options :
caption position
(vertical position:c
,t
orb
),caption on the left
,caption on the right
,caption width
,image width
,the material to make the caption,
the material to make the figure.
I use
pgfkeys
to manage the options.Usage:
The complete code: