3

I put three figures in a row. One figure is independent one and with a caption underneath; the other two figures are sub-figures. Please see the picture below.

image

I tried to combine minipage with subfigure, but it didn't work. Can you please help me?

4
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
 \begin{minipage}[b]{.4\textwidth}
  \centering
  \includegraphics[width=1.5in]{example-image-a}
  \caption{This is first figure}
  \end{minipage}%
  \hfill
  \begin{minipage}[b]{.5\textwidth}
  \subcaptionbox{}{\includegraphics[width = 1in]{example-image-b}}
  \subcaptionbox{}{\includegraphics[width = 1in]{example-image}}  
  \caption{caption}
  \end{minipage} 
\end{figure}
\end{document}

enter image description here

And an option using subfig:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}

\begin{document}

\begin{figure}
\begin{minipage}[b]{.4\linewidth}
\centering
\includegraphics[width=4cm]{example-image-a}
\caption{A figure}
\end{minipage}%
\begin{minipage}[b]{.6\linewidth}
\centering
\subfloat[subfigure]{\includegraphics[width=3cm]{example-image-b}}\quad
\subfloat[subfigure]{\includegraphics[width=3cm]{example-image-c}}
\caption{Another figure}
\end{minipage}
\end{figure}

\end{document}

enter image description here

  • Thank you. But I tried to run this code, it cannot find subcaption.sty – minmin Aug 23 '13 at 23:28
  • @HarishKumar I added another option to your answer, using subfig. I hope you don't mind (it's the first time I do this, so please excuse me if I was too intruding, but a separate answer seemed superfluous). If you don't like the edit, please feel free to roll it back. – Gonzalo Medina Aug 23 '13 at 23:56
  • @minmin please see the updated answer for a solution using subfig. – Gonzalo Medina Aug 23 '13 at 23:56
  • @GonzaloMedina: You are always welcome. Please feel free to edit/modify my answers always :-). You are very kind. – user11232 Aug 23 '13 at 23:58
  • @minmin You're welcome! The hard work was done by Harish. If you consider the answer solved your problem, don't forget that you can mark it as accepted by clicking the checkmark to its left; in case of doubt please see How do you accept an answer?. – Gonzalo Medina Aug 25 '13 at 16:31

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.