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 "??" !
llncsclass, 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\documentclassand 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\labelcommand before the\captioncommand. 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\labelcommand before\captioncommand – user995434 Jul 01 '12 at 18:01