使用 subfigure 包可以实现以下布局吗?

使用 subfigure 包可以实现以下布局吗?

是否可以使用该subfigure包(以及我不知道的任何其他包/命令)实现以下布局:

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

每张图片都应有一个副标题。

答案1

subfigure是一个过时的软件包。一个选择可能是使用floatrowsubfig;根据您的图形的实际大小,您可能需要调整一些长度:

\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}

在此处输入图片描述

答案2

已编辑,以便此方法支持子图的超链接。

只需将 替换\rules\includegraphics并输入您自己的标题即可。可以使用可选参数(例如[5pt])将、和\stackunder的定义中的改为 来更改子图和子标题之间的间隙。\capfigabc

\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}

在此处输入图片描述

答案3

您可以将它与captionsubcaption包一起使用:

\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}

在此处输入图片描述

相关内容