3

HI I want to do the following in Latex. How can I do it?

enter image description here

1
  • 10
    Your question leaves all the effort to our community, even typing the essentials of a TeX document such as \documentclass{}...\begin{document} etc. You can improve your question by adding a minimal working example (MWE) that users can copy/paste onto their systems to work on.
    – cfr
    Commented Jun 20, 2014 at 21:51

2 Answers 2

6

Using floatrow and subcaption:

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

\begin{document}

\floatsetup[subfigure]{capbesideposition={left,center}}

\begin{figure}
\ffigbox
{%
  \begin{subfloatrow}[3]
  \fcapside[\FBwidth]{\caption{}\label{fig:sub1}}{\includegraphics[width=3cm]{example-image-a}}%
  \fcapside[\FBwidth]{}{\includegraphics[width=3cm]{example-image-a}}
  \fcapside[\FBwidth]{}{\includegraphics[width=3cm]{example-image-a}}
  \end{subfloatrow}\vskip10pt%
  \begin{subfloatrow}[3]
  \fcapside[\FBwidth]{\caption{}\label{fig:sub2}}{\includegraphics[width=3cm]{example-image-b}}
  \fcapside[\FBwidth]{}{\includegraphics[width=3cm]{example-image-b}}
  \fcapside[\FBwidth]{}{\includegraphics[width=3cm]{example-image-b}}
  \end{subfloatrow}%
}
{\caption{A test figure with six subfigures in two rows}\label{fig:test}}
\end{figure}

\end{document}

enter image description here

2
  • Hi Thank you very much. I am using subfig package. How can I make it compartible with it?
    – user570593
    Commented Jun 20, 2014 at 22:33
  • @user570593 You're welcome! If you are already loading subfig, then simply delete the line \usepackage{subcaption} from my code. Commented Jun 20, 2014 at 22:53
2

An approach without subfloat packages but with enuitem. The example show that items can be referenced as well.

MWE

\documentclass{article}
\usepackage{graphicx,enumitem}

\newenvironment{figrow}%
{%
\centering\addtocounter{figure}{1}% if caption at bottom
\begin{enumerate}[%
itemsep=2pt,parsep=0em,
label={(\alph*)},
ref={\thefigure.(\alph*)}
]}%
{\end{enumerate}\addtocounter{figure}{-1}}

\begin{document}

The range of figure rows is from \ref{rowone} to \ref{rowfour}

\begin{figure}

\begin{figrow}
\item \label{rowone} \raisebox{-0.5\height}{
\includegraphics[width=.3\linewidth]{example-image-a} 
\includegraphics[width=.3\linewidth]{example-image-b}
\includegraphics[width=.3\linewidth]{example-image-c}}
\item \label{rowtwo}  \raisebox{-0.5\height}{
\includegraphics[width=.3\linewidth]{example-image-a}  
\includegraphics[width=.3\linewidth]{example-image-b}  
\includegraphics[width=.3\linewidth]{example-image-c}}
\end{figrow}
\caption{A test figure with six subfigures \ref{rowone} and \ref{rowtwo}}
\end{figure}

\begin{figure}
\begin{figrow}
\item \label{rowthree} \raisebox{-0.5\height}{
\includegraphics[width=.3\linewidth]{example-image-a} 
\includegraphics[width=.3\linewidth]{example-image-b}
\includegraphics[width=.3\linewidth]{example-image-c}}
\item \label{rowfour}  \raisebox{-0.5\height}{
\includegraphics[width=.3\linewidth]{example-image-a}  
\includegraphics[width=.3\linewidth]{example-image-b}  
\includegraphics[width=.3\linewidth]{example-image-c}}
\end{figrow}
\caption{A test figure with six subfigures}
\end{figure}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .