I am using \usepackage{subfig}.

Problem arises after I use this package, the main caption look different than before.

I tried using package like \usepackage{caption} to adjust after reading some similar question.

The default setting \captionsetup{justification=justified} centers the caption and does not align right or left.

\captionsetup{justification=raggedright} makes the caption aligned to the left, but it does not adjust the text to make the text fill up the line so that the caption is also aligned to the right, like a normal paragraph.

I tried all the other options, none of them work good.

How can I make the caption aligned on both side, same like before I used subfigure package?

Update: I figured it out by myself.

\captionsetup{justification=RaggedRight} works, but I have to run the file twice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.