[Tex/LaTex] Caption package: bold numbering indents caption text – how to avoid that

boldcaptionsindentation

I ran across this problem and fail to find an answer even after thorough searching:

I use

\usepackage[bf]{caption}  

in my LaTeX document, as I want the "Figure 1"-Part of the caption to appear bold. Unfortunately, the following caption is indented starting on the second line, so that the "Figure 1" part is alone:

Figure 1: blabla, bla-  
          blablabla
          blabal
          blablabla

I'd prefer sth like this (the other variant looks really stupid for narrow floats and wastes space):

Figure 1: blabla, bla-
blablabla blabla blabla

Has anyone found a solution for this?

Best Answer

The package caption provides different styles via option. To set one of the predefined styles use format=.

Here an example

\documentclass{scrartcl}
\usepackage[bf]{caption} 
\def\exampletext{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a,
magna.
}
\begin{document}
\begin{figure}[!ht]
\centering
\rule{7cm}{1cm}
\caption{\exampletext}
\end{figure}

\begin{figure}[!ht]
\captionsetup{format=plain}
\centering
\rule{7cm}{1cm}
\caption{\exampletext}
\end{figure}

\begin{figure}[!ht]
\captionsetup{format=hang}
\centering
\rule{7cm}{1cm}
\caption{\exampletext}
\end{figure}
\end{document}

enter image description here