TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are using the below definition to get the figure numberings automatically


The output is as shown below:

Figure 1. Caption

But, we need to insert the text "(Online color)" after figure number as shown below:

Figure 1 (Online color). Caption

To achieve this I again redefining the command

\def\fnum@figure{\figurename~\thefigure (Online color)}

which again I have to reset for the next captions.

Could anyone suggest how to get this automatically?

share|improve this question
If you redefine \fnum@figure it will stay redefined unless something else changes it. What class/packages are you using? Can you please provide an example? – Thruston Feb 11 '14 at 10:31
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – Jubobs Feb 21 '14 at 11:20

This should get you started. I have defined a new environment myfigure. If you want

Figure 1 (Online color). Caption

use myfigure or else use figure.

A sample code:

\DeclareCaptionFormat{myformat}{#1 (Online color)#2#3}
    \caption[myfig1]{my caption here}

    \caption[myfig2]{my caption here}

enter image description here

Further adjustments are left as assignment. For details refer to caption manual.

share|improve this answer

Here a different solution with no need for additional packages.

Simply issue the command \onlinecap inside those figure environments where you want the modified caption.



\newcommand\onlinecap{\renewcommand\fnum@figure{\figurename~\thefigure~(Online color)}}







enter image description here

Just in case you have figures with multiple captions, you might need a command to nullify the effect of \onlinecap for a subsequent caption. In this case you might also insert between \makeatletter and \makeatother another line which defines a command \offlinecap for this purpose:

share|improve this answer
Probably also an \offlinecap command should be provided, in case a figure environment has two captions, only the first of which has the addition. – egreg Feb 11 '14 at 11:46
@egreg Thanks for the suggestion. Added in the answer. – karlkoeller Feb 11 '14 at 12:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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