15

Is it possible to achieve the following layout with the subfigure package (and any other package/command I don't know about):

############# ##############
#           # #            #
#  pic1     # #            #
#           # #      pic2  #
#           # #            #
############# #            #
              #            #
############# #            #
#           # #            #
#   pic3    # #            #
#           # #            #
#           # #            #
############# ############## 

Each picture should have a subcaption.

Mensch
  • 65,388
JHK
  • 315

3 Answers3

15

subfigure is an obsolete package. One option cold be to use floatrow and subfig; depending on the actual size of your figures, you might need to adjust some lengths:

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

\begin{document}

As can be seen in Figure~\ref{fig:test}, we have the three subfigures~\ref{sfig:testa}, \ref{sfig:testb}, and \ref{sfig:testc}.
\begin{figure}
\ffigbox[7.8cm]{%
\begin{subfloatrow}
  \hsize0.7\hsize
  \vbox to 6.35cm{
  \ffigbox[\FBwidth]
    {\caption{small subfigure A}\label{sfig:testa}}
    {\includegraphics[width=3cm,height=3cm]{example-image-a}}\vss
  \ffigbox[\FBwidth]
    {\caption{small subfigure B}\label{sfig:testb}}
    {\includegraphics[width=3cm,height=2cm]{example-image-b}}
  }
\end{subfloatrow}\hspace*{\columnsep}
\begin{subfloatrow}
  \ffigbox[\FBwidth][]
    {\caption{A large subfigure}\label{sfig:testc}}
    {\includegraphics[width=3cm,height=6cm]{example-image-c}}
\end{subfloatrow}
}{\caption{three subfigures}\label{fig:test}}
\end{figure}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128
9

EDITED so that this approach supports hyperlinking of subfigures.

Just replace the \rules with \includegraphics and put in your own captions. The gap between subfigure and subcaption can be changed with an optional argument (e.g., [5pt]) to \stackunder in the definitions of \capfiga, b, and c.

\documentclass{article}
\usepackage{hyperref}
\usepackage{stackengine}
\usepackage{subcaption}
\begin{document}
\begin{figure}
  \centering
  \def\figa{\rule{1in}{1.1in}}
  \def\figb{\rule{2in}{3.4in}}
  \def\figc{\rule{1in}{0.9in}}
  \def\capa{subfig a caption}
  \def\capb{subfig b caption}
  \def\capc{subfig c caption which may be longer}
  \savestack{\capfiga}{\subcaptionbox{\capa\label{fg:a}}{\figa}}
  \savestack{\capfigb}{\subcaptionbox{\capb\label{fg:b}}{\figb}}
  \savestack{\capfigc}{\subcaptionbox{\capc\label{fg:c}}{\figc}}
  \def\hgap{3ex}
  \stackon%
    [\heightof{\figb}-\heightof{\figc}-\heightof{\capfiga}-\depthof{\capfiga}]%
    {\capfigc}{\capfiga}\hspace{\hgap}\capfigb%
  \caption{This is my figure\label{fg:}}
\end{figure}
\clearpage
In figure \ref{fg:}, \ref{fg:a}, \ref{fg:b} and \ref{fg:c}...
\end{document}

enter image description here

7

You can use it with the caption and subcaption packages:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption,subcaption}
\usepackage{calc}
\usepackage{lipsum}
\usepackage{hyperref}

\newlength\heightfiga\newlength\heightcapa
\newlength\heightfigb\newlength\heightcapb
\newlength\heightfigc\newlength\heightcapc
\newlength\heightfig

\begin{document}
\lipsum[1]

Look at that figure~\ref{fig}!

\lipsum[2]

And now look at figure~\ref{subfig2} in particular.

\lipsum[3]

\begin{figure}[b]
%Definition of lengths
\setlength\heightfiga{1.5cm}
\setlength\heightfigb{2.0cm}
\setlength\heightcapa{1\baselineskip}
\setlength\heightcapb{2\baselineskip}
%Do not change
\setlength\heightcapc{\heightcapa}
\setlength\heightfigc{\heightfiga+\heightfigb+\heightcapa}
\setlength\heightfig{\heightfigc+\heightcapc}

\begin{minipage}[b][\heightfig][t]{0.49\linewidth}\centering
\includegraphics[height=\heightfiga]{./graphics/dummy.eps}
\parbox[b][\heightcapa][t]{1\linewidth}{\subcaption{A caption}\label{subfig1}}
\includegraphics[height=\heightfigb]{./graphics/dummy.eps}
\parbox[b][\heightcapb][t]{1\linewidth}{\subcaption{Yet another caption}\label{subfig2}}

\end{minipage}\hfill
\begin{minipage}[b][\heightfig][t]{0.49\linewidth}
\centering
\includegraphics[height=\heightfigc]{./graphics/dummy.eps}
\parbox[b][\heightcapc][t]{1.\linewidth}{\subcaption{Still a caption}\label{subfig3}}
\end{minipage}%
\caption{This is a figure}
\label{fig}
\end{figure}

\end{document}

enter image description here