Reputation: 21
Which library should I use that will allow me to make a grid of pictures, same dimensions. Like 3 pictures per row. Is there an easy way to do that for like 30 pictures without worrying about each line alone. Thank you
Upvotes: 2
Views: 962
Reputation: 111
A solution that utilizes the floatrow
package.
\documentclass{article}
\usepackage{graphicx}
\usepackage{floatrow}
\usepackage{mwe}
\usepackage{showframe}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\begin{figure}[H]
\begin{floatrow}[3]
\ffigbox{\includegraphics[width = 0.3\textwidth]{example-image-a}}{}
\ffigbox{\includegraphics[width = 0.3\textwidth]{example-image-b}}{}
\ffigbox{\includegraphics[width = 0.3\textwidth]{example-image-c}}{}
\end{floatrow}
\end{figure}
\lipsum[3]
\end{document}
Upvotes: 1
Reputation: 38783
You could use something like this:
\documentclass{article}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{pgffor}
\usepackage{xcolor}
\newadjustimage{\myimage}{max size={.33\textwidth}{.33\textwidth}}%
\begin{document}
\def\imagelist{example-image, example-image-duck, example-image-a, example-image-b, example-image-10x16, example-image-16x10}
\noindent\foreach \x in \imagelist{%
\makebox[.33\textwidth][c]{\myimage{\x}}\hfill%
}
\end{document}
Upvotes: 4