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\label
s. I've been stymied by that kind of thing once or twice.\label
macro always labels the last thing which increased a counter. If you put it before\caption
you 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.