I wrote a long table with a label in a tex file and \input it into my main tex file. The reference in the main tex file to the table, however, does not show the numbering of the table but the one of the next table that are written directly in the main tex file. All long tables that are written directly in the main tex file have correct references. How to fix my problem? Must the label be defined in the same tex file as its reference?
The label is \label{tab:yy}, and the reference is \ref{tab:yy}, and every table has a distinct label.
\label's. Also for duplicate\labels. I've been stymied by that kind of thing once or twice. – dmckee --- ex-moderator kitten Mar 19 '10 at 16:01\labelmacro always labels the last thing which increased a counter. If you put it before\captionyou are labeling usually the last sectioning command. This makes perfectly sense and is not a stupidity. This fact is also usually mentioned in many beginner texts about LaTeX. – Martin Scharrer May 07 '12 at 21:43meta, nobody actually reads the faq now, despite my nearly 20 years of development work on it. :-( – wasteofspace Jul 09 '13 at 10:34