1

I would like to create a figure with five images as shown in the attached file (2 images on the left, and 3 on the right side) and put a thin black border around all five images. I only know how to put images side to side like this:

 \begin{figure}[!h]
 \includegraphics[width=0.5\textwidth]{image1.eps}
 \includegraphics[width=0.5\textwidth]{image3.eps}
 \end{figure}

example

But this does not help me in this case. Does anyone know how to do this?

1

Using minipages:

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}[!h]
\begin{minipage}{.45\textwidth}
\fbox{\includegraphics[width=\textwidth,height=3cm]{example-image-a}}
\vspace*{1.5cm}

\fbox{\includegraphics[width=\textwidth,height=3cm]{example-image-b}}
\end{minipage}
\hfill
\begin{minipage}{.45\textwidth}
\fbox{\includegraphics[width=\textwidth,height=2cm]{example-image-a}}
\vspace*{0.5cm}

\fbox{\includegraphics[width=\textwidth,height=2cm]{example-image-b}}
\vspace*{0.5cm}

\fbox{\includegraphics[width=\textwidth,height=2cm]{example-image-c}}
\end{minipage}
\end{figure}

\end{document}

enter image description here

@JohnKormylo had the good idea to use minipages of a specific height:

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}[!h]
\begin{minipage}[c][8cm][c]{.45\textwidth}
\fbox{\includegraphics[width=\textwidth,height=3cm]{example-image-a}}
\vfill

\fbox{\includegraphics[width=\textwidth,height=3cm]{example-image-b}}
\end{minipage}
\hfill
\begin{minipage}[c][8cm][c]{.45\textwidth}
\fbox{\includegraphics[width=\textwidth,height=2cm]{example-image-a}}
\vfill

\fbox{\includegraphics[width=\textwidth,height=2cm]{example-image-b}}
\vfill

\fbox{\includegraphics[width=\textwidth,height=2cm]{example-image-c}}
\end{minipage}
\end{figure}

\end{document}
  • Thank you. This works exactly the way I wanted! – AL B Apr 17 at 19:07
  • 1
    You could also specify the height of the minipages (optional) and use \vfill to fill in the gaps. – John Kormylo Apr 18 at 5:26
  • @JohnKormylo Good idea! – def Apr 18 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.