[Tex/LaTex] Centering two line caption in memoir

captionshorizontal alignmentline-breaking

I'm struggling to center my two line captions. I'm using memoir and I want the second line to be the reference to where I got the figure from. I'm using the following code for the figure:

\begin{figure}[h!]
\centering
\includegraphics[width = 16cm]{figs/123.pdf}
\caption{The Figure 123 \newline {\footnotesize \textit{Adapted from \cite{DuToit123}}} }
  \label{fig:123}
\end{figure} 

I also included the following:

\captionnamefont{\small \sc}
\captionstyle[\centering]{\centering}

But it does not want to center both lines (I've added a screen shot of the output).

Output

Best Answer

memoir accommodates the use of the caption package. Then you can split out your regular \caption and some referencing scheme (say) \figuresource using \caption*:

enter image description here

\documentclass{memoir}

\usepackage{graphicx,caption}

\newcommand{\figuresource}[1]{%
  \par\vspace*{-\abovecaptionskip}
  \caption*{\footnotesize\itshape #1}}

\captionsetup{
  labelfont={small,sc},
  textfont=small,
  justification=centering}

\begin{document}

\begin{figure}
  \centering
  \includegraphics[width=15em]{example-image}
  \caption{The Figure 123}
  \figuresource{Adapted from ABC}
\end{figure}

\end{document}
Related Question