我正在尝试获取以下内容:
图 1:标题
(A)面板 A 字幕
左图-右表
(B)面板 B 字幕
左图-右表
(C)面板 C 字幕
左图-右表
我尝试使用 minipage 和 subfloat 的组合来实现这一点,但我真的很难处理字幕。我希望每个图及其对应的表格都有一个居中的字幕。我该怎么做?
谢谢您的帮助!
答案1
你在寻找这样的东西吗:
\documentclass[11pt]{article}
\usepackage{caption,subcaption}
\usepackage{graphicx,booktabs}
\begin{document}
\begin{figure}[tbp]
\centering
\begin{minipage}[b]{1.0\linewidth}
\centering
\subcaption{Panel A subtitle}
\label{fig:sub-a}
\includegraphics[width=0.3\textwidth]{example-image-1x1}
\qquad
\begin{tabular}[b]{@{}ll@{}}
\toprule
Foo & Bar \\\midrule
1 & 2 \\
\bottomrule
\end{tabular}
\end{minipage}
\vspace{.5ex}
\par
\begin{minipage}[b]{1.0\linewidth}
\centering
\subcaption{Panel B subtitle}
\label{fig:sub-b}
\includegraphics[width=0.3\textwidth]{example-image-1x1}
\qquad
\begin{tabular}[b]{@{}ll@{}}
\toprule
Foo & Bar \\\midrule
1 & 2 \\
\bottomrule
\end{tabular}
\end{minipage}
\caption{Title of Figure}
\label{fig:one}
\end{figure}
\end{document}
答案2
除非您希望子标题出现在图形列表中,否则您只需格式化文本即可。
\documentclass{article}
\usepackage{mwe}
\usepackage{showframe}
\begin{document}
\begin{figure}[p]
\caption{Title}
\centering
\medskip
\textbf{(A)} Panel A subtitle\par
\smallskip
\raisebox{\dimexpr 0.6\baselineskip-\height}% align tops
{\includegraphics[width=0.4\textwidth]{example-image-a}}\hfil
\begin{tabular}[t]{c}
yada yada yada\\
\hline
yada yada yada\\
yada yada yada
\end{tabular}\par
\medskip
\textbf{(B)} Panel B subtitle\par
\smallskip
\raisebox{\dimexpr -0.5\height}% align centers
{\includegraphics[width=0.4\textwidth]{example-image-b}}\hfil
\begin{tabular}{c}
yada yada yada\\
\hline
yada yada yada\\
yada yada yada
\end{tabular}\par
\medskip
\textbf{(C)} Panel C subtitle\par
\smallskip
\includegraphics[width=0.4\textwidth]{example-image-c}\hfil
\begin{tabular}[b]{c}% align bottoms
yada yada yada\\
\hline
yada yada yada\\
yada yada yada
\end{tabular}
\end{figure}
\end{document}