# [texhax] Labels in table environment

Philip G. Ratcliffe philip.ratcliffe at uninsubria.it
Fri Jun 25 14:42:06 CEST 2004

>     Is there any special trick for correctly putting labels into a table
> environment? I am trying
> \begin{table}
> \caption{..........}
> \begin{tabular}
> .................
> ................
> \end{tabular}
> \label{tab:xyz}
> \end{table}

That looks ok to me.

> I tried putting the label inside the caption, and that did not
> help. (Note:
> That was the fix for figures.) The tables are labelled correctly,
> but when
> I try to use the labels they do not reflect the correct numbering.  I can
> supply an example. I am using the amsbook package.

The only important, or rather vital, rule for ALL floats (figures and
tables) is to place the \label command AFTER the \caption command (as this
is what trips the counter).  Inside the \caption argument is also fine.

So, check that ALL of your floats are set out this way.

Cordialmente,  Philip G. Ratcliffe