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

Table does not show up at the same position it was inserted in the TeX file. I got the understanding through bit of reading on this forum that they are floats and they pick the best place on the current or next page.

Because of this the text written below the table in TeX file ends up showing on the previous page. Is there any way to make the table appear in the same place as it was put in the TeX file.

In my case I created a table and below that I wrote "as shown in the above table..." but when I created the PDF it appeared on the previous page and there was no table there. One workaround is refer to the table # but I was wondering if there is any better way. I am using \begin{table}[!ht]

share|improve this question
From my experience, floats seldom pick the right location – puk Aug 10 '15 at 7:04
up vote 60 down vote accepted

Suppressing floating is often not the best option. But it may be done, for example using the float package:


Often choosing further placement options would be sufficient, such as


Or set a barrier which may not be crossed by floats:

share|improve this answer
I had to combine these solutions, as well as write \FloatBarrier\clearpage. Also \usepackage{dblfloatfix} for some two-column floats that were moving around. This is for an older version of LaTeX, modern version seems to be fine without all the fuss. – Joe Corneli Apr 29 at 11:41

To avoid discrepancies between phrases like "as shown in the above table" and the actual table position, one may either supress floating of tables or employ the varioref package for "intelligent" cross-referencing. Here's an example using varioref.




(Content of first table)
\caption{A table}


For the first topic see the \vpageref[above table][table ]{tab:first}.

OR: For the first topic see table~\vref{tab:first}.

(Content of second table)
\caption{Another table}

For the second topic see the \vpageref[above table][table ]{tab:second}.

OR: For the first topic see table~\vref{tab:second}.

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.