1

I have a question about paragraph text colour and caption text colour.

I want to change the text colour of a part of my paper which has many figures but when I use \color command, it only changes the colour of the normal text not the text in the caption of the figures.

Do you have any idea how I can change the text colour of the captions without adding \color command to them one by one (I want to modify the colour of a part of my paper, so changing the document default colour is not an option).

3

You can use caption package

% in the preambule
\usepackage{caption}
\usepackage{color}

% in the document
\captionsetup{font={color=green}}

To change captions only in figures and revert styles back to normal:

% in the document
\captionsetup[figure]{font={color=green}}

%\begin{figure}
% figure stuff
%\end{figure}

\clearcaptionsetup{figure}
|improve this answer|||||
  • You mean I should change the caption colour to green at the beginning of the part which I want to modify and then at the end return it back to black using \captionsetup command again. – ehsan Feb 3 '16 at 11:19
  • You can use \clearcaptionsetup to revert changes, this requires the setup to be scoped, though. I've update the answer. – Dmitry Feb 3 '16 at 12:32

Your Answer

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

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