![扩展子图标题的宽度](https://linux22.com/image/255414/%E6%89%A9%E5%B1%95%E5%AD%90%E5%9B%BE%E6%A0%87%E9%A2%98%E7%9A%84%E5%AE%BD%E5%BA%A6.png)
子图的标题与图/表的大小一致。是否可以拉伸宽度,使其不与大小一致。
\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}