TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

In my document, I usually use two following ways to work with pictures:

    \caption{ description ...}

and combination with package Subfigure:

   \subfigure[my subcaption 1 ]{
   \subfigure[my subcaption 2 ]{
   \caption{ bla bla bla bla }

I have got many warnings from compilers like this:: \label in float, but not after \caption ...

  • xelatex.exe> This is XeTeX, Version 3.1415926-2.4-0.9998 (MiKTeX 2.9 64-bit)
  • editor: Eclipse with Texlipse plugin
share|improve this question
The warning comes from the nag package but when I put your code above inside a minimal document using nag and subfigure packages I don't get such warning but "No complaints by nag" instead. So my crystal ball is foggy, can you please enlighten it with a minimal but complete document which shows the behavior described by you? – Axel Sommerfeldt Jan 6 '13 at 10:43
up vote 4 down vote accepted

the references for the subcaptions will all be wrong if your caption is below the graphic. Put the label always after or inside the caption argument.

   \subfigure[my subcaption 1 \label{my_subfig1}]{%
   \subfigure[my subcaption 2 \label{my_subfig2}]{%
   \caption{ bla bla bla bla }\label{enz:fig_ZD_NLO}
share|improve this answer
I drew from this example that is given in the documentation package Subfigure on page 3 There is: \begin{figure}% \centering \subfigure[First]{...}\goodgap \subfigure[Second Figure]{...}\\subfigure[Third]{\label{3figs-c}...}% \caption{Three subfigures.} \label{3figs} \end{figure} – jafan Jan 6 '13 at 9:35
the package subfigure is really outdated, use subfig instead – Herbert Jan 6 '13 at 9:36
All examples in the subfig package documentation have their \label in the content (and not in the caption), too. (And they work fine.) So I see it as a documented behavior that one can put the \label inside the content argument, too, and therefore I see nothing wrong in the code of the questioner. – Axel Sommerfeldt Jan 6 '13 at 10:39

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.