2

I need a layout similar to the following image. However I want only the 3 images on the right side to be subfigures (2a, 2b, 3c), But the big red image on the left should be numbered as Figure 1.

Layout

Currently I am using minipage and the 3 blue images are not caaptioned as subfigures.

\begin{figure}
%   \centering
    \begin{minipage}{0.8\textwidth}
        \includegraphics[width=\textwidth]{merge-scenario}
        \caption{Merge Scenario}
        \label{fig:merge-scenario}
    \end{minipage}%
    \begin{minipage}{0.15\textwidth}
        \includegraphics[width=\textwidth]{case_a}
        \caption{State A} 
        \label{fig:case-a}
        \includegraphics[width=\linewidth]{case_b}
        \caption{State B} 
        \label{fig:case-b}
        \includegraphics[width=\linewidth]{case_c}
        \caption{State C} 
        \label{fig:case-c}
    \end{minipage}
\end{figure}
| improve this question | | | | |
  • I use to do something similar with the subcaption package, but it's been a long time. Good luck. – Jon Jun 4 '19 at 12:14
2

Like this?

enter image description here

With use of the subfigure environment from the subcation package:

\documentclass{article}
\usepackage{caption}
\usepackage{subcaption}
\makeatletter
\renewcommand\thesubfigure{\thefigure\alph{subfigure}} % redefine subcaption number format
\renewcommand\p@subfigure{}
\makeatother
\usepackage[demo]{graphicx} % in real document remove option "demo"

\begin{document}
\begin{figure}
\setkeys{Gin}{width=\linewidth, keepaspectratio} %  common option for "includegraphics" comand
\renewcommand\thesubfigure{\thefigure\alph{subfigure}}
\begin{minipage}{0.8\textwidth}
    \includegraphics[height=6cm]{merge-scenario}
    \caption{Merge Scenario}
    \label{fig:merge-scenario}
\end{minipage}\hfill
\begin{minipage}{0.15\textwidth}
    \begin{subfigure}{\linewidth}
\includegraphics[height=1.6cm]{case_a}
\caption{State A}
    \label{fig:case-a}
    \end{subfigure}

    \begin{subfigure}{\linewidth}
    \includegraphics[height=1.6cm]{case_b}
    \caption{State B}
    \label{fig:case-b}
    \end{subfigure}

    \begin{subfigure}{\linewidth}
    \includegraphics[height=1.6cm]{case_c}
    \caption{State C}
    \label{fig:case-c}
    \end{subfigure}
\end{minipage}
\end{figure}
\end{document}

edit:

  • Gin keys enable to define common keys (option) for the \includegraphics macro. In your case this is width of images. Added keppaspectratio modify the meaning of the width and height (and totalheight) keys such that if both are specifed then rather than distort the figure it is scaled such that neither dimension exceeds the stated dimensions.
  • for numbering of sub-figures I overlooked your demand. It can be solved as suggested @Kormylo in his comment and showed in other answer.
| improve this answer | | | | |
  • Thanks but I want subcaption 2a, 2b, 2c instead of (a), (b), (c) and possubly another caption for Fig 2 like usual subfigures. And what is the purpose of \setkeys ? – Neel Basu Jun 4 '19 at 13:20
  • This can be fixed with \captionsetup[subfigure], but will need a \restepcounter{figure} as well. – John Kormylo Jun 4 '19 at 14:47
  • @NeelBasu, sorry, i overlooked this. It can be solved as mentioned Jon Kormylo in above comment. I will correct my answer asap. – Zarko Jun 4 '19 at 15:02
  • Can you include the subfigure number in your answer ? – Neel Basu Jun 5 '19 at 17:23
  • @NeelBasu, sub figures are numbered as you require in question. Sorry, i don't understand you what more I should include in answer. Please explain. – Zarko Jun 5 '19 at 19:40
1

Like this? (You'll have to sort out the image sizes yourself.)

\documentclass{article}

% for example images
\usepackage{mwe}

\usepackage[labelformat=simple]{subcaption}

\begin{document}
\renewcommand*{\thesubfigure}{\thefigure.\arabic{subfigure}}
\makeatletter
    \renewcommand{\p@subfigure}{}
\makeatother

\begin{figure}
    \begin{minipage}{0.8\textwidth}%
        \includegraphics[width=\textwidth]{example-image}
        \caption{A figure.}
        \label{fig:merge-scenario}
    \end{minipage}%
    \begin{minipage}{0.2\textwidth}%
        \begin{subfigure}{\linewidth}%
            \includegraphics[width=\textwidth]{example-image-a}
            \caption{State A} 
            \label{fig:case-a}
        \end{subfigure}
        \begin{subfigure}{\linewidth}%
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{State B} 
            \label{fig:case-b}
        \end{subfigure}
        \begin{subfigure}{\linewidth}%
            \includegraphics[width=\linewidth]{example-image-c}
            \caption{State C} 
            \label{fig:case-c}
        \end{subfigure}
        \caption{Another figure.}
    \end{minipage}
\end{figure}

\end{document}

MWE output

| improve this answer | | | | |

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.