5

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?

1 Answer 1

7

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}
3
  • Both \setkomafont do not have an effect here. It only has an effect as long as you don't overwrite the KOMA settings with \captionsetup.
    – user2574
    Feb 5, 2012 at 19:52
  • In the example, \setkomafont effects the main caption.
    – lockstep
    Feb 5, 2012 at 19:57
  • Upps, (of course) you are right, I didn't read the [subfigure] part.
    – user2574
    Feb 6, 2012 at 7:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .