TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Latex takes care of the number of tables by itself. Like it will automatically number the table as Table 4 etc. I want to use this number in the text.

For example, if I write "See Table 4" and later on I insert one more table above it then Table 4 becomes Table 5 but my text still says Table 4 which is inconsistent.

share|improve this question
You need to insert \label{name} after the table caption and then you can refer to the table by \ref{name} in the text. LaTeX will take care of updating the number. You will need to compile the document twice to get the referencing right. – mythealias Mar 3 '13 at 19:04
When a structural change in the document occurs that affects the numbers of sectioning headers and floats, be sure to recompile twice so that all cross-references are fully updated. For a general discussion of LaTeX cross-referencing methods see, e.g., tex.stackexchange.com/a/36312/5001. – Mico Mar 3 '13 at 19:55
up vote 5 down vote accepted

I suggest to have a look at The Not So Short Introduction to LaTex2e, in particular Section 2.8, which explains cross referencing.

In short, you need to define a label for your table, and later on reference this label to have an always updated number. It looks like this:

    Some & text
  \caption{The caption of the table}\label{table:somename}
In text, I can reference the Table~\ref{table:somename} like this.

You need to run latex twice to get the reference mechanism correct.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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