[Tex/LaTex] KOMA-Script: caption, subfig, and captionlabel

captionsformattingkoma-scriptsubfloats

My problem is best illustrated with an example:

\documentclass{scrreprt}

\usepackage{caption}
\captionsetup[subfigure]{font={sf,md,sl,small}}
\setkomafont{caption}{\itshape\sffamily}
\setkomafont{captionlabel}{\upshape\bfseries\sffamily}
\usepackage{subfig}

\begin{document}
\begin{figure}
 \subfloat[Test]{\hskip70pt}\hskip30pt
 \subfloat[Test 2]{\hskip70pt}
\caption{Main caption.}
\end{figure}
\end{document}

I wish for the labels (a) and (b) to render as (a) and (b) as opposed to (a) and (b). How can I go about this?

Best Answer

At least when using a KOMA-Script class together with the caption package, you also need to redefine labelfont with \captionsetup.

\documentclass{scrreprt}

\usepackage{caption}
\captionsetup[subfigure]{font={sf,md,sl,small},labelfont={sf,md,sl,small}}
\setkomafont{caption}{\itshape\sffamily}
\setkomafont{captionlabel}{\upshape\bfseries\sffamily}
\usepackage{subfig}

\begin{document}
\begin{figure}
 \subfloat[Test]{\hskip70pt}\hskip30pt
 \subfloat[Test 2]{\hskip70pt}
\caption{Main caption.}
\end{figure}
\end{document}