I have little icons (48x48) and I want to display them using subfloat. To prevent that images from being pixelated I set the width to 1cm. But now the caption has also a length of 1cm and looks terrible. Here is my code:

    \caption{Graphiken der Anwendung}

Is there a way to make the caption longer than the 1cm image?

  • 1
    It would be good if you could turn the code sample into a full, compilable document (i.e. starting from \documentclass). That will make it easier for people to try out the code. – Jake Jun 20 '11 at 10:49
  • Why are you using \hspace{1pt}? – Martin Scharrer Jun 20 '11 at 10:49
  • After a short look in the subfig manual (I assume you are using this package), I found a reference to: \captionsetup[subfigure]{width=<some length>}. Give it a try. Another possibility for short captions would be to use \mbox{Logo} to avoid a line break. However, this only allows for single line sub-captions and might cause other issues. – Martin Scharrer Jun 20 '11 at 10:56
  • changed the code, \hspace is for the next row of images, I'll try the \mbox – dbrettschneider Jun 20 '11 at 11:02

You could just increase the official width of the subfloat by putting the image in a larger but invisible box:

    \caption{Graphiken der Anwendung}
  • 3
    It's possible also to say \makebox[1.2\width]{...} that will enlarge the box by the 20%. – egreg Jun 20 '11 at 11:08
  • 1
    Or \makebox[\dimexpr\width+2cm\relax]{...} to increase the width by e.g. 2cm. – Martin Scharrer Jun 20 '11 at 11:28

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.