7

The caption of the subfigure follows the size of the figure/table. Is it possible to stretch the width so that it does not follow the size.

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

This figure has 3 subfigures.

David Carlisle
  • 757,742
Asha
  • 73
  • 1
  • 4
  • Welcome to TeX.SX! Would you please add a minimal document showing what you're doing? There are at least two distinct methods for dealing with subfigures and it's important to know which one you're using. – egreg Sep 14 '12 at 11:03
  • This snippet doesn't show subfigures; please, edit your question, inserting a minimal working example (MWE) (click on the link for more information about a MWE). – egreg Sep 14 '12 at 11:08
  • Just did. Let me know if anything else is needed. It is my first time. So sorry for that. – Asha Sep 14 '12 at 11:27
  • I am so sorry I missed it. I would do it now. Had a bad day. – Asha Sep 14 '12 at 12:14

1 Answers1

10

You can place the objects in a box having a prescribed width. In the code below, I've changed subfigure (which is an obsolete package) with subfig and \subfigure with \subfloat.

Watch also for spurious spaces that can sneak in the output, caused by unprotected end-of-lines. There's also no need to add \small\centering inside the \subfloat arguments.

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

enter image description here

egreg
  • 1,121,712
  • Dear Egreg and Kurt, So sorry for messing up the question. Thank you so much for teaching me. Egreg : Thank you so much for helping me. Regards, Asha – Asha Sep 14 '12 at 12:51