4

This is what I obtain with my code, B images should be on the same level as A and with caption below them, and below A

I am having troubles positioning 7 images: I need to have a big one on the left side, and 6 smaller on the right, each one of them with a different caption, and a big caption below all of them.

It has all to have the same height, and must not change aspect ratio of the images. The big one must be 5cm*5cm, the others the remaining space. It is a big images, with 6 small details on the side, with captions used as a reference to where to look (single letter or number)

I tried different solutions, but none was what I needed. The closest I got to what I need was using the following code:

\usepackage{graphicx}
\usepackage{geometry}
\geometry{
  top=20mm,            
  inner=20mm,
  outer=20mm,
  bottom=20mm,
  headheight=3ex,       
  headsep=3ex,          
}
\usepackage[export]{adjustbox}
\begin{document}
{\centering
\begin{table}[ht]
\begin{tabular}{p{7cm}p{12cm}}

\cline{1-2}
 & \\
\includegraphics[max width=5cm, max height=5cm]{example-image-a} 
\caption{image 1} & \begin{tabular}[l]{@{}l@{}}
\includegraphics[max width=2cm, max height=2cm]{example-image-b} 
\includegraphics[max width=2cm, max height=2cm]{example-image-b} 
\includegraphics[max width=2cm, max height=2cm]{example-image-b} \\
\includegraphics[max width=2cm, max height=2cm]{example-image-b} 
\includegraphics[max width=2cm, max height=2cm]{example-image-b} 
\includegraphics[max width=2cm, max height=2cm]{example-image-b} 
\end{tabular} 
 & \\

\end{tabular}
\end{table}
\end{document}

But it is not aligned, nor occupying all the page width. And I can not add the caption I need.

About the small captions, I need just to put a reference number to look in the big image so if it is possible to overlay in one corner a small number, is even better.

Thank you for your help

4
  • Forgot to mention it: The small ones must be images 3 on top, 3 on bottom.
    – Lpuo
    Commented Nov 29, 2018 at 11:28
  • Do the smaller figures have the same aspect ratio?
    – egreg
    Commented Nov 29, 2018 at 11:30
  • you should edit you question and clarify, what you like to obtain. the best way with adding a sketch of desired positioning of subfigures.
    – Zarko
    Commented Nov 29, 2018 at 12:03
  • I added a picture of what i obtain with my code. the pictures should be with the big one on the left, and the 6 small on the right side (yes the smaller have the same aspect ratio). all should have below each picture a caption. i hope this helps clarify, sorry i wasn't clearer before
    – Lpuo
    Commented Nov 29, 2018 at 13:33

1 Answer 1

5

something like this?

enter image description here

above images preserve their aspect ratio.

\documentclass{article}
\usepackage{geometry}
\geometry{margin=20mm,
  headheight=3ex,
  headsep=3ex,
}
\usepackage{array}
\usepackage[export]{adjustbox}
\usepackage{subfig}

\begin{document}
{\centering
\begin{table}[ht]
\begin{tabular}{m{\dimexpr5cm+3\tabcolsep}l}
\includegraphics[width=5cm]{example-image-a}
\caption{image 1} 
    &   \setkeys{Gin}{width=2cm}
        \subfloat[\label{subfig:a}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:b}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:c}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:d}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:e}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:f}]{\includegraphics{example-image-b}}
\end{tabular}
\end{table}
\end{document}

edit: your question is not clear. from your comment can be concluded that actually you looking for the following:

enter image description here

but i'm not sure in this

\documentclass{article}
\usepackage{geometry}
\geometry{margin=20mm,
  headheight=3ex,
  headsep=3ex,
}
\usepackage{array, multirow}
\usepackage[export]{adjustbox}
\usepackage{subfig}

\begin{document}
    \begin{table}[htb]
\centering
\setkeys{Gin}{width=2cm}
    \subfloat[\label{subfig:a}]{\includegraphics{example-image-b}}
    \subfloat[\label{subfig:b}]{\includegraphics{example-image-b}}
    \subfloat[\label{subfig:c}]{\includegraphics{example-image-b}}\\[1ex]

\includegraphics[width=5cm]{example-image-a}
                \caption{image 1}

    \subfloat[\label{subfig:d}]{\includegraphics{example-image-b}}
    \subfloat[\label{subfig:e}]{\includegraphics{example-image-b}}
    \subfloat[\label{subfig:f}]{\includegraphics{example-image-b}}
    \end{table}
\end{document}

edit (2): in third try ... hopefully now i is what you like to obtain:

enter image description here

\documentclass{article}
\usepackage{geometry}
\geometry{margin=20mm,
  headheight=3ex,
  headsep=3ex,
}
\usepackage{array, multirow}
\usepackage[export]{adjustbox}
\usepackage{subfig}

\begin{document}
{\centering
\begin{table}[ht]
    \centering
\begin{tabular}{p{\dimexpr5cm+3\tabcolsep}l}
\multirow[t]{2}{=}[-4.4mm]{\includegraphics[width=5cm,valign=c]{example-image-a}
                \caption{image 1}
                }
    &   \setkeys{Gin}{width=2cm}
        \subfloat[\label{subfig:a}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:b}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:c}]{\includegraphics{example-image-b}}  \\
    &   \setkeys{Gin}{width=2cm}
        \subfloat[\label{subfig:d}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:e}]{\includegraphics{example-image-b}}
        \subfloat[\label{subfig:f}]{\includegraphics{example-image-b}}
\end{tabular}
\end{table}
\end{document}
3
  • thank you! is a good way, but no, sorry that i didn't write it. i meant 3 on top, 3 on bottom
    – Lpuo
    Commented Nov 29, 2018 at 11:27
  • that means thad small images should be in two lines on the right side of bigger image?
    – Zarko
    Commented Nov 29, 2018 at 11:35
  • Yes that is right. I posted a pic of what i obtain with my code. sorry if i wasn't clear enough
    – Lpuo
    Commented Nov 29, 2018 at 13:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .