Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Why does an environment’s label have to appear after the caption?

For convenience of readers, Table~\ref{table_abbreviation} lists the abbreviations and their full meaning, as used in this report.

\begin{table}[ht]
\label{table_abbreviation}
\caption{Abbreviations used in this paper}
\centering
\begin{tabular}{l l}
\hline
Abbreviations & Full definition \\
\hline
P2P & Peer-to-peer  \\ 
DDM & Distributed Data Mining  \\
[1ex]
\hline
\end{tabular}
\end{table}

The above is a latex code portion from a document I am writing. I am expecting ~\ref{table_abbreviation} to give the same number as shown next to the caption of table. However, while the caption says "Table 1", in the content it is referred as 1.3. Perhaps, the numbering would be clear if I give the whole code, but I was under the impression, the numbering will be consistent no matter where they are used.

share|improve this question

marked as duplicate by egreg, lockstep, Kurt, Stefan Kottwitz Nov 2 '12 at 13:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

1 Answer

up vote 2 down vote accepted

you need \label after \caption.

(this was the type example of question that i wanted to nail with www.tex.ac.uk:/faq ...)

share|improve this answer
    
Yes, that did the job :). Do you have an explanation for the issue caused as described in the question? Thanks. –  Shamim Hafiz Nov 2 '12 at 12:00
1  
@ShamimHafiz -- your question about the ordering of the \label and \caption is answered in this question: Why does an environment's label have to appear after the caption?. –  barbara beeton Nov 2 '12 at 12:24
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.