I want to change the font of Figure, and the caption text.

I tried caption package. But \usepackage[labelfont=bf,font=it]{caption} raises an error Command \caption@ContinuedFloat already defined..

Then I just define my quick-and-dirty \myCaption: \newcommand{\myCaption}[1]{\textbf{\caption{\textnormal{\textit{#1}}}}}.

But I notice that the figure numbering (via \ref) is sort like section numbering rather than the number after Figure.

EDIT add an example, it raises the error ! LaTeX Error: Command \caption@ContinuedFloat already defined


%%%%%% other packages in my doc %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{amssymb, amstext, amsmath}
\usepackage{pgfplots} % only 4 figure caroleError


% for landscape figure



% end

%% for this minimum example:
% expand \figure to multi pages




    \caption{many figures}

  • 1
    Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – jub0bs Aug 22 '13 at 11:38

I'm only aware of a single situation causing the error Command \caption@ContinuedFloat already defined:


This is happening here: The subfig package is loaded with option caption=false which means "No, I really don't want to use the caption package". Afterwards the caption package is loaded, causing the error since the subfig package has already defined some commands which are necessary for sub-figure support without caption package.

The solution is simple: Please decide if you want to use the caption package, yes or no. (And especially not "no and yes", as stated in my example document.)

And now to Part 2, the "section numbering rather than the number after Figure" problem:

\label must be placed within the same group as \caption, so {\caption{...}}\label{...} fails. But this is what you do inside your definition of \myCaption, the \caption command is typeset inside \textbf{...} while the \label is not. Therefore \ref is doomed to fail here, giving you the reference to the last labeling command (e.g. \section) instead.

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.