0

I have in the LaTeX source file:

\usepackage{subcaption}

\captionsetup{compatibility=false}

\begin{figure}

  \begin{subfigure}{0.50\textwidth}

  \includegraphics[width=0.95\linewidth]{RegressionFixedObservedN4451.png}

  \caption{Based on the observed data sets}

  \label{fig:RegressionFixedObservedN4451}

\end{subfigure}%

\caption{Regression plot for the fixed condition of the ACT (N = 445). The
 x-axis represents the natural logarithm of the absolute value of the minimum
 residual score belonging to the sequence of 14 consecutive bars with the
 smallest MSE. The y-axis represents the smallest MSE. The top line is the
 line $y = 2x + \ln{10}$. The bottom line is the line $y = 2x-\ln{10}$. The
 line exactly in between is the line $y=2x$.}

\label{fig:observedfixedcondion}

\end{figure} 

and the caption is centered. But I want the caption NOT centered. How should I do this?

  • It would be very helpful to have a complete, compileable example document, i.e. with all used packages (are you loading the caption package as well?). Also, which caption are you referring to: the main caption or the one in the subfigure or both? – Martin Scharrer Jan 7 at 12:08
  • When I compile your code none of the captions are centered. The subcaption is just indented a little (which makes it looks almost as being centered under the image, but this depends on the image width) and the main caption is justified. Please explain a little better what you require. – Martin Scharrer Jan 7 at 12:14
0

Please provide a full MWE. By the way, this question has been answered several times on stackexchange: Align Caption to the left

I don't know what caption you are referring to, but this should do the trick:

\captionsetup{justification=raggedright,singlelinecheck=false}
  • 2
    If this question was asked before, why not leave a link in the comments? And mark as duplicate? – Johannes_B Jan 7 at 12:14
  • @Johannes_B thank you for the comment. I added a link but I am not able to close the topic and mark it as a duplicate, – Felix Phl Jan 7 at 12:17
  • The command \captionsetup{justification=raggedright,singlelinecheck=false} really did help. Therefore, Felix, thank you very much. But what to do if I want to have the caption 'raggedleft' as well? – Ad van der Ven Jan 7 at 12:47
  • @AdvanderVen glad I could help, but next time please try the search bar first :-) you can mark your question as answered as well. You can use captionsetup in every figure environment, where you want your caption to be adjusted. – Felix Phl Jan 7 at 12:54
  • Hi Felix, Your last sentence was of great help again. However, what I want is the spacing of words and letters within a line so that the margins of all the full lines in a column (a caption) are the same. This is now the case on the left but not on the right. How can I do this so that it is also the case on the right. – Ad van der Ven Jan 7 at 14:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.