About

{subcaption} is a package for typesetting captions of {subfloats}.

is a package for typesetting captions of .

Here's an example demonstrating the basic use of .

\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document} 
\begin{figure}
    \centering
        \begin{subfigure}[b]{0.4\textwidth}
        \includegraphics[width=\textwidth]{img1}
        \caption{First image}
    \end{subfigure}
\qquad
    \begin{subfigure}[b]{0.4\textwidth}
        \includegraphics[width=\textwidth]{img2}
        \caption{Second Image}
        \label{second}
    \end{subfigure}
    \caption{Some test images}
\end{figure}
\end{document}

Frequently Asked Questions

  1. What are some differences between the subfig and subcaption packages?
  2. Compatibility issue between subcaption and the CIFA document class
  3. How can I get subcaption to work with a multi-page figure?
  4. How can I reference subfigures in the main caption?
history | excerpt history