Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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
    
Thanks..Just posted. –  Asha Sep 14 '12 at 11:05
    
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
    
@Asha: a complete MWE shows also the lines \documentclass{xxx} untill the line \end{document}. The advantage is that we can try to compile on our own system and check the resulting errors. We also can see the packages you are using and not telling us :-) –  Kurt Sep 14 '12 at 12:06
show 1 more comment

1 Answer

up vote 4 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.