2

Is the LaTeX package caption compatible with KOMA-Script classes like scrreprt?

(I did not find anything about that in the KOMA-Script manual, but as KOMA-Script redefines a lot for the floats and captions, I wonder if there might be problems.)

4

See section 5.4 of the caption manual for an overview of the interplay between KOMA-script and caption. Quoting the "Side effects":

The optional argument of \setcapwidth is not supported and will be ignored if used in conjunction with the caption package. Furthermore the KOMA-Script options tablecaptionabove & tablecaptionbelow and the commands \captionabove & \captionbelow are stronger than the position= setting offered by the caption package.

|improve this answer|||||
  • 4
    Please note that the version 3.1 of the caption package is not adapted to the new features of KOMA-Script3 yet. So currently using \DeclareCaptionType is not recommended since it does not integrate the new floating environments into the new KOMA-Script features, better use \DeclareNewTOC instead. Futhermore \captionaboveof and \captionbelowof are not supported by the caption package yet, and the caption package is not aware of the tocbasic package yet. (This will change in version 3.2 of the caption package.) – user2574 Jul 3 '11 at 9:31
  • 4
    BTW: As a general rule one can say: If there is a solution offered by KOMA-Script, and a one offered by the caption package, better use the KOMA-Script one. – user2574 Jul 3 '11 at 9:34
-1

At the start of figure or table, KOMA redefines \caption to be either \captionabove or \captionbelow. This forces them to use the caption package \caption.

\documentclass{scrartcl}
\usepackage{caption}

\makeatletter
\let\x@caption\caption% original (caption package) \caption
\renewcommand{\captionabove}{\captionsetup{position=above}\x@caption}%
\renewcommand{\captionbelow}{\captionsetup{position=below}\x@caption}%
\makeatother

\begin{document}
\listoffigures

\begin{figure}
\captionsetup{singlelinecheck=false}
\caption{should be left justified}
\end{figure}
\end{document}

demo

|improve this answer|||||
  • You absolutely wrong. First of all memoir is not a KOMA-Script class. Furthermore, all KOMA-Script classes have and use \captionabove and \captionbelow and you can configure them using option captions. And you do not need to redefine \captionabove or \captionbelow. – Schweinebacke Jul 25 '17 at 7:12
  • @Schweinebacke - Ah, that explains why it doesn't work with memoir. – John Kormylo Jul 25 '17 at 13:19

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.