in my Beamer presentation, I would like to dynamically switch images in a figure environnement.
More precisely, my figure contains 9 subfloats presented 3x3 and each of them should switch between two images during the presentation.
In order to avoid some "tilting" between the different elements, I thought that it would be a good idea to use an overlayarea inside each subfloat.
Sadly, when used in an figure environment, the overlayarea seems to behave very odd : every thing I put in it appear outside the overlayarea ??
Here is a very short example :
\documentclass[9pt, aspectratio=43]{beamer}
\usepackage [francais]{babel}
\usepackage [T1]{fontenc}
\usepackage [utf8]{inputenc}
\usepackage[position=top]{subfig}
\usepackage{pdfpages}
\begin{document}
\begin{frame}
%% This works fine : 123 appears INSIDE the overlayarea
\fbox{\begin{overlayarea}{3cm}{2cm}
\fbox{123}
\end{overlayarea}}
%% This looks odd : 456 appears OUTSIDE the overlayarea
\begin{figure}
\fbox{\begin{overlayarea}{3cm}{2cm}
\fbox{456}
\end{overlayarea}}
\end{figure}
\end{frame}
\end{document}
Perhaps I mis-use this environnement ?
Thanks a lot :)
BR
Donut
Quick workaround: warp your subimages in minipages of fixed height:
\documentclass[9pt, aspectratio=43]{beamer}
\begin{document}
\begin{frame}
\begin{figure}
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%
\end{minipage}%
\hfill
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%
\end{minipage}%
\hfill
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%
\end{minipage}%
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%%
\end{minipage}%
\hfill
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%
\end{minipage}%
\hfill
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%
\end{minipage}%
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%
\end{minipage}%
\hfill
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%
\end{minipage}%
\hfill
\begin{minipage}[c][.3\textheight][c]{.3\textwidth}
\centering
\includegraphics<1>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-9x16}%
\includegraphics<2>[width=\textwidth,height=.3\textheight,keepaspectratio]{example-image-duck}%
\end{minipage}%
\end{figure}
\end{frame}
\end{document}
Related
I use the following example code to create a subfigure in my latex document.
\usepackage{caption}
\usepackage{subcaption}
\begin{figure}
\centering
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{Figures/F1.png}
\caption{}
\label{fig:1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{Figures/F2.png}
\caption{}
\label{fig:2}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{Figures/F3.png}
\caption{}
\label{fig:3}
\end{subfigure}
\caption{Values}
\label{fig:three graphs}
\end{figure}
And I get the following output configuration
But the sub-figures are too small on the page. So I want to change it to the following configuration and make the figure a bit larger and centered. How to modify this code to change the Figure configuration?
\documentclass{article}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-duck}
\caption{}
\label{fig:1}
\end{subfigure}
\quad
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-duck}
\caption{}
\label{fig:2}
\end{subfigure}
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-duck}
\caption{}
\label{fig:3}
\end{subfigure}
\caption{Values}
\label{fig:three graphs}
\end{figure}
\end{document}
I'd like to put tikzpicture next to a picture on a beamer but right now the tikzpicture is way below the slide ! Here is my code :
\begin{frame}{Frame name}
\begin{columns}[t]
\column{.5\textwidth}
\centering
\begin{tikzpicture}{Tikzpicture name}
%my tikzpicture here
\end{tikzpicture}
\column{.5\textwidth}
\centering
\includegraphics[width=100px, height=200 px]{PICTURE.jpg}
\end{columns}
\end{frame}
You can use T as alignment option for the columns to make sure the very top of the columns is aligned instead of the baseline of the first lines.
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\frametitle{Frame name}
\begin{columns}[T]
\begin{column}{.5\textwidth}
\centering
\begin{tikzpicture}{Tikzpicture name}
\draw (0,0) circle [radius=1cm];
\end{tikzpicture}
\end{column}
\begin{column}{.5\textwidth}
\centering
\includegraphics[width=100px, height=200 px]{example-image-duck}
\end{column}
\end{columns}
\end{frame}
\end{document}
I would like to refresh this thread: Subfigs of a figure on multiple pages.
I am struggling with reproduction. I have used suggestions on this post and I have used subfig docs. Unfortunately, neither works.
%Packages which I am using:
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{figure}
\centering
\subfloat[]{figures/fig1.pdf}
\qquad
\subfloat[]{figures/fig2.pdf}
\caption{Caption nr 1.}
\label{fig:figure1_2}
\end{figure}
\begin{figure}
\ContinuedFloat
\centering
\subfloat[]{figures/fig3.pdf}%
\qquad
\subfloat[]{figures/fig4.pdf}
\caption[]{Caption nr 2}
\label{fig:fig3_4}
\end{figure}
\end{document}
The output of it is a page with directories of figures displays accordingly without a figure itself.
Please let me know if something I missed.
You need to include the images with \includegraphics:
\documentclass{article}
%Packages which I am using:
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{figure}
\centering
\subfloat[]{\includegraphics[width=5cm]{example-image-duck}}
\qquad
\subfloat[]{\includegraphics[width=5cm]{example-image-duck}}
\caption{Caption nr 1.}
\label{fig:figure1_2}
\end{figure}
\begin{figure}
\ContinuedFloat
\centering
\subfloat[]{\includegraphics[width=5cm]{example-image-duck}}%
\qquad
\subfloat[]{\includegraphics[width=5cm]{example-image-duck}}
\caption[]{Caption nr 2}
\label{fig:fig3_4}
\end{figure}
\end{document}
I have this code in LaTex:
\begin{figure}[h!]
\centering
\subfigure[]{\includegraphics[width=50mm]{katua.jpg}}
\subfigure[]{\includegraphics[width=60mm]{txakurren_balioak.png}}
\subfigure[]{\includegraphics[width=60mm]{katuen_balioak.png}}}
\label{fig:eb3}
\end{figure}
and I get this:
And I want to put the images in two columns. In the column of the left the image of the cat and in the right the two histograms. How it is possible to do this?
Instead of \centering you could use \hfill to do the centering, see the example below:
\documentclass{report}
\usepackage{graphicx}
\usepackage{subfigure}
\begin{document}
\begin{figure}[h!]
\hfill
\subfigure[]{\includegraphics[width=50mm]{example-image-a}}
\hfill
\subfigure[]{\includegraphics[width=60mm]{example-image-b}}
\hfill
\hfill
\subfigure[]{\includegraphics[width=60mm]{example-image-c}}
\end{figure}
\end{document}
I have a twosided document and want to add some wrapfigures. The speciality is that I want wrapped section titles on left pages.
The example shows the problem for the second section. For the first and third everything is fine.
MWE:
\documentclass[12pt,a4paper,twoside,openright]{scrbook}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{caption}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\chapter{First Chapter}
\section{First Section}
\begin{wrapfigure}[14]{o}{0.4\linewidth}
\begin{center}
\includegraphics[width=0.75\linewidth]{picture}
\end{center}
\vspace*{-1em}
\captionsetup{width=0.75\linewidth}
\caption[short]{long.}
\end{wrapfigure}
\blindtext[5]
\section{Second Section}
\begin{wrapfigure}[14]{o}{0.4\linewidth}
\begin{center}
\includegraphics[width=0.75\linewidth]{picture}
\end{center}
\vspace*{-1em}
\captionsetup{width=0.75\linewidth}
\caption[short]{long.}
\end{wrapfigure}
\blindtext
\section{Third Section}
\begin{wrapfigure}[14]{o}{0.4\linewidth}
\begin{center}
\includegraphics[width=0.75\linewidth]{picture}
\end{center}
\vspace*{-1em}
\captionsetup{width=0.75\linewidth}
\caption[short]{long.}
\end{wrapfigure}
\blindtext
\end{document}
Result:
https://i.imgur.com/N8cuf0D.jpg