[Tex/LaTex] Help with subfigure

graphicssubfloats

Hi I would like to use \subfigure in order to have the a figure with 6 subfigures ordered as follows:

enter image description here

where (a1) (a2) … (c1) (c2) should be the figure name not the caption! (I forgot the brackets in the exampe!)
Thank you so much!

Best Answer

The subfigure package is deprecated; you should use either the subfig or the subcaption package.

Here's a solution based on the capabilities of the subcaption package. Each subfigure environment is assigned a width of 0.3\textwidth to have some whitespace between adjacent subfigures.

enter image description here

\documentclass{article}
\usepackage{subcaption}
\usepackage[demo]{graphicx} % omit 'demo' option in real file
\begin{document}

\begin{figure}

\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\linewidth]{subfiga1}
\caption*{a1}
\end{subfigure}
\hspace*{\fill} % note: no blank line
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\linewidth]{subfigb1}
\caption*{b1}
\end{subfigure}
\hspace*{\fill} % note: no blank line
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\linewidth]{subfigc1}
\caption*{c1}
\end{subfigure}

\bigskip
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\linewidth]{subfiga2}
\caption*{a2}
\end{subfigure}
\hspace*{\fill} % note: no blank line
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\linewidth]{subfigb2}
\caption*{b2}
\end{subfigure}
\hspace*{\fill} % note: no blank line
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\linewidth]{subfigc2}
\caption*{c2}
\end{subfigure}

%%\caption{Overall caption}
\end{figure}
\end{document}
Related Question