扩展子图标题的宽度

扩展子图标题的宽度

子图的标题与图/表的大小一致。是否可以拉伸宽度,使其不与大小一致。

\documentclass[11pt,a4paper]{report}
\usepackage{
subfigure,
}

\begin{document}
\begin{figure}[htb]
\small
\centering
\subfigure[\label{fig:sub1}This is the first subfigure.]
{
\centering
\small
\begin{tabular}{l}
First sub figure
\end{tabular}
}
\\
\centering
\small
\subfigure[\label{fig:sub2} Second subfigure.]
{
\centering
\small
\begin{tabular}{l c*{2}{p{0.2cm}}}
$a$& 1 & 1  \\
$b$  & 2& 2 \\
\end{tabular} 
}
\\
\centering
\small
\subfigure[\label{fig:sub3} Third subfigure.]
{
\centering
\small
\begin{tabular}{l c*{2}{p{0.2cm}}}
$a$& 1 & 1  \\
$b$  & 2& 2 \\
\end{tabular}
}
\caption{\label{figure} This figure has 3 subfigures.} 
\end{figure}
\end{document}

该图有 3 个子图。

答案1

您可以将对象放置在具有规定宽度的框中。在下面的代码中,我已将subfigure(已过时的包)更改为 ,subfig并将\subfigure其更改为\subfloat

另请关注虚假空间这可能会潜入输出,这是由于未受保护的行尾导致的。也无需在参数\small\centering中添加\subfloat

\documentclass[11pt,a4paper]{report}
\usepackage{subfig}

\begin{document}
\begin{figure}[htb]
\small
\centering
\subfloat[\label{fig:sub1}This is the first subfigure.]
{%
\makebox[.4\textwidth]{\begin{tabular}{l}
First sub figure
\end{tabular}}%
}
\\
\subfloat[\label{fig:sub2}Second subfigure.]
{%
\makebox[.4\textwidth]{\begin{tabular}{l c*{2}{p{0.2cm}}}
$a$& 1 & 1  \\
$b$  & 2& 2 \\
\end{tabular}}%
}
\\
\subfloat[\label{fig:sub3}Third subfigure.]
{%
\makebox[.4\textwidth]{\begin{tabular}{l c*{2}{p{0.2cm}}}
$a$& 1 & 1  \\
$b$  & 2& 2 \\
\end{tabular}}%
}
\caption{\label{figure} This figure has 3 subfigures.} 
\end{figure}
\end{document}

在此处输入图片描述

相关内容