0

Possible Duplicate:
Why does an environment's label have to appear after the caption?
Where to put the \label on a figure environment?

I use \documentclass{llncs}, when I reference an image labelled for example "img1" using \ref{img1} I get the number of the section instead of the number of the image ! After that I added \usepackage[compatibility=false]{caption} because I need it for another problem, and I see now that if I do \ref{img1} I get nothing else "??" !

  • 2
    Please add a minimal working example (MWE) that illustrates your problem. – doncherry Jul 01 '12 at 17:01
  • @doncherry Well the problem is simply: when I use the llncs class, the references of figures are not the number of the figure but the number of the section in which the figure is inserted. – user995434 Jul 01 '12 at 17:14
  • 1
    I realize it may be trivial, but as @doncherry commented, it is best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. Basically, it is better to show the problem rather than describe the problem. – Peter Grill Jul 01 '12 at 17:47
  • 2
    It sounds very much like you issue the \label command before the \caption command. Check for this and, if it's the case, be sure to reverse the ordering. At any rate, do post a MWE (minimum working example) so that others might have a chance to diagnose -- and, subsequently, propose a solution for -- the problem you're encountering. – Mico Jul 01 '12 at 17:47
  • @Mico you are right, thanks ! The problem is that I used \label command before \caption command – user995434 Jul 01 '12 at 18:01
  • @user995434 which is why you should have given a minimal example ... then nobody has to guess. An MWE is not to describe the problem (you did fine) it is to get a clue what might be the cause .. as often the problem sits in front of the computer so to speak – Frank Mittelbach Jul 01 '12 at 20:58

0 Answers0