# Subcaption package make all captions centered

If i include subcaption package, all captions of figures are centered. But i want to make captions justified text. What should i do?

P.S I insert image by \begin{figure} and \includegraphics and make caption by \caption.

• What should you do? How about a minimal document that replicates your current behaviour. Can you do that? It should start with \documentclass and ends with \end{document}. – Werner Oct 4 '18 at 4:13
• In the basic LaTeX document classes article, \report, and book, as well as in many document classes that are based on these basic classes, figure and table captions are centered by default unless the caption spans more than one line. Please tell us which document class you employ. – Mico Oct 4 '18 at 5:55

## 1 Answer

subcaption uses caption where the singlelinecheck setting defaults to true (is turned on). This setting centres the caption if it fits on a single line.

\documentclass{article}

\usepackage{showframe}% Just for this example
\usepackage{subcaption}

\begin{document}

\begin{figure}
\caption{Lorem ipsum dolor sit amet\ldots}
\end{figure}

\captionsetup{
singlelinecheck = false
}

\begin{figure}
\caption{Lorem ipsum dolor sit amet\ldots}
\end{figure}

\end{document}