I have three figures that I want to place next to each other. That is fine. In addition, however, each subfigure has a caption on its own and the crucial thing with these is that I have to have two lines for each of them generated by a linebreak. I managed that using \newline, but now the subcaption always starts on the left edge of the subfigures and is not centered any more (which does not look nice).
What can I do to resolve my problem?
\documentclass{scrartcl}
\usepackage{graphix,subcaption}
\begin{document}
\begin{figure}[t]
\centering
\begin{subfigure}{0.31\textwidth}
\includegraphics[width=\textwidth]{image1}
\caption{\centering Nice image1.\newline Another line.}
\label{fig:NiceImage1}
\end{subfigure}
\begin{subfigure}{0.31\textwidth}
\includegraphics[width=\textwidth]{image1}
\caption{\centering Nice image 2.\newline Another line.}
\label{fig:NiceImage2}
\end{subfigure}
\begin{subfigure}{0.31\textwidth}
\includegraphics[width=\textwidth]{image1}
\caption{\centering Nice image 2.\newline Another line.}
\label{fig:NiceImage3}
\end{subfigure}

\centeringinside eachsubfigure? – cmhughes Apr 30 '13 at 14:11subfigureenvironment,\centeringwon't have any effect. Besides,\centeringdoesn't affect the caption which is the problem here. – Gonzalo Medina Apr 30 '13 at 15:06