# Make Caption of Image longer than Image in Subfloat

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:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage{graphicx}
\usepackage{subfloat}
\usepackage{subfig}
\begin{document}
\begin{figure}[!htb]
\centering
\subfloat[Logo]{\includegraphics[width=1cm]{Bilder/icons/logo.png}}
\hspace{1pt}
\caption{Graphiken der Anwendung}
\label{fig:icons}
\end{figure}
\end{document}


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

-
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:

\begin{figure}
\centering
\subfloat[Logo]{\makebox[5cm][c]{\includegraphics[width=1cm]{Bilder/icons/logo.png}}}
\caption{Graphiken der Anwendung}
\label{fig:icons}
\end{figure}

-
thanks, that works – dbrettschneider Jun 20 '11 at 11:04
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
Or \makebox[\dimexpr\width+2cm\relax]{...} to increase the width by e.g. 2cm. – Martin Scharrer Jun 20 '11 at 11:28