Minipage, multiline caption centering

No matter what I do, I can't seem to center the bottom line of these minipage captions. Along with the several variations in the code below, I have also tried \usepackage[justification=centering]{caption}. Advice? Thanks!

\begin{figure}[H]
\centering
\minipage{0.14\textwidth}
\includegraphics[width = \linewidth]{five3}
\caption*{\scriptsize ($d.d.d.d, c.d.c.d, \newline b.d.d.b.d.d, \newline a.d.a.d.c.b.c.d$) \newline $c=a+b$ \newline $d=c+b$}
\endminipage\hfill

\minipage{0.14\textwidth} \centering
\includegraphics[width=\linewidth]{four3}\caption*{\scriptsize ($d.d.d.d, \newline d.c.c.c, \newline b.c.b.c.b.d.d, \newline a.d.a.d.b.c.b.c.d$) \newline $c=a+b$ \newline $d=c+b$ \centering}
\endminipage\hfill
\endminipage
\end{figure}

-
A minimal working example to work with would be nice. –  Svend Tveskæg Aug 28 '13 at 23:07

Why not just place the content of the \caption in a tabular (or array, depending on your preference)?

\documentclass{article}
\usepackage{caption,graphicx}% http://ctan.org/pkg/{caption,graphicx}
\begin{document}

\begin{figure}[ht]
\centering
\minipage{.5\linewidth}
\centering
\includegraphics[width = 100pt]{example-image-a}
\caption*{\scriptsize $\array{c}(d.d.d.d, c.d.c.d, \\ b.d.d.b.d.d, \\ a.d.a.d.c.b.c.d) \\ c = a+b \\ d = c+b \endarray$}
\endminipage
\end{figure}

\end{document}

-
Perhaps also \array{@{}c@{}}...? –  Gonzalo Medina Aug 28 '13 at 23:37

The combination of \centering and \newline does not give the desired output, as one can see from this simple document:

\documentclass{article}

\begin{document}
\noindent\parbox{\textwidth}{\centering
First line\newline Second line}
\par\bigskip
\noindent\parbox{\textwidth}{\centering
First line\\ Second line}
\end{document}


So don't use \newline inside your caption but \\ instead:


\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}

\begin{document}
\begin{figure}[H]
\centering
\captionsetup{justification=centering,font=scriptsize}
\minipage{0.14\textwidth}
\includegraphics[width = \linewidth]{five3}
\caption*{($d.d.d.d, c.d.c.d,$ \\  $b.d.d.b.d.d,$ \\ $a.d.a.d.c.b.c.d$) \\ $c=a+b$ \\ $d=c+b$}
\endminipage\hfill

\minipage{0.14\textwidth} \centering
\includegraphics[width=\linewidth]{four3}
\caption*{($d.d.d.d,$ \\ $d.c.c.c,$ \\  $b.c.b.c.b.d.d,$ \\ $a.d.a.d.b.c.b.c.d$) \\ $c=a+b$ \\ $d=c+b$}
\endminipage\hfill
\end{figure}
\end{document}


-

You need neither figure nor \caption*.

\documentclass{article}
\usepackage[demo]{graphicx} % demo is just for the example
\usepackage{lipsum}

\begin{document}
\lipsum[1]

\begin{center}
\includegraphics[width = .14\columnwidth]{five3}\\[\abovecaptionskip]
\scriptsize
($d.d.d.d,$\\
$c.d.c.d,$
$b.d.d.b.d.d,$\\
$a.d.a.d.c.b.c.d$)\\
$c=a+b$\\
$d=c+b$
\end{center}

\lipsum[2]

\end{document}


-