TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the subfig packge, the command \captionsetup[subfigure]{width=<length>} can set the width of all subcaptions within a figure.

How can the width of just a single subcaption in a figure be set?

share|improve this question
up vote 2 down vote accepted

Using grouping should do it:

\subfloat[<caption>}{ .... }
\subfloat[<caption>}{ .... }
share|improve this answer
Is this grouping something that can be done in all of LaTeX or does it come with subfig? – Tyson Williams Jul 21 '11 at 14:02
It can be done with everything in (La)TeX. Note that \begin{..} and \end{..} already add group, so any LaTeX environment would do as well. Also some settings like counters are done global so grouping won't effect them. – Martin Scharrer Jul 21 '11 at 14:04
And what if I want the subfloat to be centered above the caption? – Tyson Williams Jul 21 '11 at 14:06
Try justification=centering,singlelinecheck=false,position=top as options. – Martin Scharrer Jul 21 '11 at 14:12
This justifies the text but does nothing to the subfloat. – Tyson Williams Jul 21 '11 at 14:25

Your Answer


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.