Section 3.20 of the KOMA-script documentation ("scrguien.pdf", pp. 120-1) prescribes the syntax \setcapwidth[justification]{width}
for the formatting of a caption. [c]
is the option for centering.
Trying to produce the same output I get from the use of the caption
package with options for justification and width, I'm surprised to see that the justification is quite different: KOMA-script produces a hanging caption that is justified, rather than centered in the strict sense.
My question: is there a way to produce the same output as in the caption
example: centered and not hanging?
Examples follow, with an absurdly long caption to highlight the difference:
caption
\documentclass[12pt]{book}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage[justification=centering,width=.8\textwidth]{caption}
\begin{document}
\begin{figure}[htbp]
\begin{center}
\includegraphics{imageTest.png}
\caption{\protect\lipsum[1]}
\end{center}
\end{figure}
\end{document}
Output:
KOMA-script
\documentclass[12pt]{scrbook}
\usepackage{graphicx}
\usepackage{lipsum}
\KOMAoption{captions}{belowfigure}
\setcapwidth[c]{.8\textwidth}
\begin{document}
\begin{figure}[htbp]
\begin{center}
\includegraphics{"imageTest.png"}
\caption[short caption]{\lipsum[1]}
\end{center}
\end{figure}
\end{document}
Output: