How can I insert an array of figures in a beamer-class presentation?
1,111
I guess there could be multiple ways of putting array of figures inside a frame.
The following three slides are basically shares the same simple idea. Note the $
at the beginning and the end of array
.
\documentclass{beamer}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{ragged2e}
\usepackage{etoolbox}
\apptocmd{\frame}{}{\justifying}{}
\begin{document}
\begin{frame}[t]{arrary of figures}
\includegraphics[width=0.33\linewidth]{example-image-a}
\includegraphics[width=0.33\linewidth]{example-image-b}
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\includegraphics[width=0.33\linewidth]{example-image-a}
\includegraphics[width=0.33\linewidth]{example-image-b}
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\includegraphics[width=0.33\linewidth]{example-image-a}
\includegraphics[width=0.33\linewidth]{example-image-b}
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\end{frame}
\begin{frame}[t]{array of figures tabular}
\begin{tabular}{ccc}
\includegraphics[width=0.33\linewidth]{example-image-a} &
\includegraphics[width=0.33\linewidth]{example-image-b} &
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\includegraphics[width=0.33\linewidth]{example-image-a} &
\includegraphics[width=0.33\linewidth]{example-image-b} &
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\includegraphics[width=0.33\linewidth]{example-image-a} &
\includegraphics[width=0.33\linewidth]{example-image-b} &
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\end{tabular}
\end{frame}
\begin{frame}{The Gem5 simulator}
\begin{figure}[h]
\centering
$\begin{array}{ccc}
\includegraphics[width=0.33\linewidth]{example-image-a} &
\includegraphics[width=0.33\linewidth]{example-image-b} &
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\includegraphics[width=0.33\linewidth]{example-image-a} &
\includegraphics[width=0.33\linewidth]{example-image-b} &
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\includegraphics[width=0.33\linewidth]{example-image-a} &
\includegraphics[width=0.33\linewidth]{example-image-b} &
\includegraphics[width=0.33\linewidth]{example-image-c} \\
\end{array}$
\end{figure}
\end{frame}
\end{document}
Related videos on Youtube
Author by
A.nechi
Updated on August 01, 2022Comments
-
A.nechi over 1 year
I want to insert an array containing figures in a beamer presentation. Is this possible?
If yes, is there an example for it?
I tried with side-to-side figures, but I'm getting a weird error message from this code:
\documentclass[fleqn,15pt]{beamer} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{ragged2e} \usepackage{etoolbox} \usepackage{multirow} \usetheme[blue,dark,colorblocks,tocinheader,]{tubs} \apptocmd{\frame}{}{\justifying}{} \begin{document} \section{The Gem5 simulator} \begin{frame}{The Gem5 simulator} \begin{array}{ccc} Fig 1 & Fig 2 & Fig 3 \\ Fig 4 & Fig 5 & Fig 6 \end{array} \end{frame} \end{document}
TUBS : Template of the university
-
samcarter_is_at_topanswers.xyz about 7 yearsPlease help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with
\documentclass{...}
and ending with\end{document}
. -
samcarter_is_at_topanswers.xyz about 7 yearsIt's certainly possible to arrange images in an array. But it would be helpful if we would know how exactly you want them to be arranges. Maybe draw a sketch? And show us what you tried to put side to side figures, maybe this can easily be debugged.
-
A.nechi about 7 yearsI edited the question to be more clear ... SORRY
-
Joseph Wright about 7 yearsOther than the fact that
array
is a math mode construct, and what you are after here is atabular
, I'm not sure I see an issue. -
A.nechi about 7 yearsForget about the array ... is there an alternative to place 6 figures : 3 on top and 3 on bottom
-
-
samcarter_is_at_topanswers.xyz about 7 yearsYou don't need
\usepackage{graphicx}
with beamer, it already provides this functionality.