[Tex/LaTex] line break in subfigure caption with proper “hang” alignment

horizontal alignmentline-breakingsubfloats

I want to insert a manual line break in the subfigures captions. I have achieved this with either \protect\\ or \newline. However, the second lines do not align properly. I want them to start at the same horizontal position as the text (not the number) of the first line.

Here is an MWE:

\documentclass[a4paper,12pt,openright,oneside,bibliography=totoc,headsepline]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[config=altsf]{subfig}
\usepackage{graphicx}
\usepackage{mwe}


\begin{document}

\begin{figure}
    \captionsetup[subfloat]{format=hang,singlelinecheck=false,justification=RaggedRight}
    \centering
    \subfloat[line break should \protect\\ be here]{\includegraphics[scale=0.5]{example-image-a}}
    \newline
    \subfloat[newline \newline there]{\includegraphics[scale=0.5]{example-image-a}}
    \caption{Test figure.}
\end{figure}

\end{document}

The output looks like this:
enter image description here

First, the second line is not aligned like the first one (seems to be centered) and second, why are the two images not aligned? How can I achieve a line break and a hanging alignment of the second line? So, for subfigure (a) the "b" of the second line should be (horizontally) where the "l" is from the first line.
An ugly workaround would be to set \hspace to an appropriate value instead of using a line break command. But I hope there is a better solution.

Best Answer

It seems that the problem is that singlelinecheck=false doesn't work if the subfig package is loaded with the option [config=altsf]. So I didn't use it:

\documentclass[a4paper,12pt,openright,oneside,bibliography=totoc,headsepline]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage
%[config=altsf]
{subfig}
\usepackage{graphicx}
\usepackage{mwe}


\begin{document}


\begin{figure}
    \captionsetup[subfloat]{margin=10pt,format=hang,singlelinecheck=false,justification=RaggedRight}
    \centering
    \subfloat[line break should \protect\\ be here]{\includegraphics[scale=0.5]{example-image-a}}

    \subfloat[newline \newline
    there]{\includegraphics[scale=0.5]{example-image-a}}
    \caption{Test figure.}
\end{figure}



\end{document}

enter image description here