如何在子图旁边插入主标题?

如何在子图旁边插入主标题?

我在 处插入了 3 个子图width=0.5\textwidth,留下了一些空白。我想在这个空间中插入主标题。我该怎么做?我正在subcaption为此使用包,但我读到floatrow在这种情况下可能会更灵活一些。欢迎使用任一(或任何其他)包的解决方案。

\documentclass[10pt, a4paper]{report}
\usepackage[paperheight=5.5in, paperwidth=6.267in, top=0in, bottom=0in, left=0in, right=0in]{geometry}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{uarial}
\renewcommand{\familydefault}{\sfdefault}



\usepackage{graphicx} 
\usepackage[bf]{caption}
\usepackage[singlelinecheck=false, aboveskip=-3pt]{subcaption}
\renewcommand\thesubfigure{\Alph{subfigure}} 


\begin{document}
\pagenumbering{gobble}
\setcounter{figure}{6}
\begin{figure}
        \captionsetup[subfigure]{labelformat=simple}
        %\captionsetup{font={onehalfspacing},skip=-10pt}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
                \label{fig2d}
        \end{subfigure}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
        \end{subfigure}\vspace{-10pt}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
                \label{fig2d}
        \end{subfigure}\vspace{-15pt}
        \caption{Figure caption describes subfigures A, B and C}
\end{figure}

\end{document}

例子

编辑:抱歉,我没说清楚,我指的空白处是 [子图 B 下方和子图 C 旁边]。也就是说,当我有奇数个子图时,我不希望主标题位于整个图下方,而是将其插入到最后一个子图的右侧,以更有效地利用空间。我很快就会上传一个图来说明这一点。

如果我插入一个额外的子图(但只有图例而没有实际的图形),我会得到接近我想要的结果:

\begin{subfigure}[t]{0.49\textwidth}
                %\caption{}              
                \vspace{50 pt}        
                \caption{Figure caption describes subfigures A, B and C; this is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legendthis is a very long legend}
        \end{subfigure}

问题在于图例有子图编号,而我需要的是主图编号。我怀疑可能有办法定义一种新的标题子类型,也许可以,subcaption.sty但我不确定如何定义! 示例2

答案1

这对我来说已经足够了,尽管我确信会有更好的方法来实现这一点。(我不确定这里的礼仪,既然我已经知道该怎么做了,我应该删除我的问题吗?还是将其留给更好的答案/其他用户?)

\documentclass[10pt, a4paper]{report}
\usepackage[paperheight=7.5in, paperwidth=6.267in, top=0in, bottom=0in, left=0in, right=0in]{geometry}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{uarial}
\renewcommand{\familydefault}{\sfdefault}



\usepackage{graphicx} 
\usepackage[bf]{caption}
\usepackage[singlelinecheck=false, aboveskip=-3pt]{subcaption}
\renewcommand\thesubfigure{\Alph{subfigure}} 

\newcommand{\fillcaption}[1]{ %new command with the argument being the text of the caption
\textbf{Figure \arabic{figure}:} #1 %Makes main figure number, concatenates it to legend
\addtocounter {figure} {1} %increments main figure count
} 
%\newcommand{\bfillcaption}[2]{\fillcaption{\textbf{#1} #2}} %bolds first sentence of fillcaption
\begin{document}
\pagenumbering{gobble}
\setcounter{figure}{6}
\begin{figure}
        \captionsetup[subfigure]{labelformat=simple}
        %\captionsetup{font={onehalfspacing},skip=-10pt}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
                \label{fig2d}
        \end{subfigure}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
        \end{subfigure}\vspace{-10pt}
        \begin{subfigure}[t]{0.5\textwidth}
                \caption{}              
                \includegraphics[width=\textwidth]{dummy.png}
                \label{fig2d}
        \end{subfigure}
        \begin{subfigure}[t]{0.49\textwidth}
                \vspace{10 pt}        
                \fillcaption{Figure legend here} {A. This describes subfigure (A). B. This describes subfigure (B). C. This describes subfigure (C).  }
        \end{subfigure}
        %\caption{Figure caption describes subfigures A, B and C}
\end{figure}

\end{document}

例子

答案2

谢谢 srao,我对你的代码做了一些改进,使其更简单,也更易于阅读。我添加了 makebox 命令,使图形可以扩展到大于页面宽度,但实际上并不需要。

\documentclass[a4paper]{report}
\usepackage{subcaption}
\usepackage{todonotes}

\newcommand{\fillcaption}[1]{ %new command with the argument being the text of the caption
\addtocounter {figure} {1} %increments main figure count
\vspace{0pt}
Figure \arabic{figure}: #1 %Makes main figure number, concatenates it to legend
}

\begin{document}
\begin{figure}
\makebox[\textwidth][c]
{
    \begin{tabular}{p{0.7\linewidth} p{0.7\linewidth}}
        \fillcaption{Lorem ipsum dolor sit amet, consectetur adipiscing elit.}&
        \vspace{0pt}
        \subcaptionbox{About a}{\missingfigure{}}\\
        \subcaptionbox{About b}{\missingfigure{}}&
        \subcaptionbox{About c}{\missingfigure{}}
    \end{tabular}
}
\end{figure}
\end{document}

相关内容