6

I need to create figures and caption as follows.

enter image description here

How can I do it?

6

You can do that by the »subcaption« package from the »caption« bundle.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}
  \begin{figure}[!htb]
    \begin{subfigure}[b]{0.3\textwidth}
      \includegraphics[width=\linewidth]{example-image}
      \caption{First}
      \label{subfig-1:dummy}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.3\textwidth}
      \includegraphics[width=\linewidth]{example-image}
      \caption{Second}
      \label{subfig-2:dummy}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.3\textwidth}
      \includegraphics[width=\linewidth]{example-image}
      \caption{Third}
      \label{subfig-3:dummy}
    \end{subfigure}

    \begin{minipage}[b]{0.3\textwidth}
      \caption{The quick brown fox jumps over the lazy dog.}
      \label{fig:dummy}
    \end{minipage}
    \hfill
    \begin{subfigure}[b]{0.3\textwidth}
      \includegraphics[width=\linewidth]{example-image}
      \caption{Fourth}
      \label{subfig-4:dummy}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.3\textwidth}
      \includegraphics[width=\linewidth]{example-image}
      \caption{Fifth}
      \label{subfig-5:dummy}
    \end{subfigure}
  \end{figure}
\end{document}

The image files are available with the »mwe« package installed on your system.


enter image description here

2
  • Thanks for your reply, I am getting an error 'missing number treated as zero'. what should I do?
    – user570593
    Sep 11 '13 at 15:41
  • @user570593: Make sure that you have the latest version of the involved packages. Use the package manager of your TeX distribution to do an update if necessary. Sep 11 '13 at 16:04

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.