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?


Using grouping should do it:

\subfloat[<caption>}{ .... }
\subfloat[<caption>}{ .... }
| 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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