# How to bind figure (table) to a section? [duplicate]

I have the following problem: when I compile a document with text enclosed within a \begin{table}...\end{table} statement it compiles fine but sometimes the Table moves into the previous section.

Can I prevent tabular from moving floating environment within the document?

-

## marked as duplicate by Martin Scharrer♦Jun 10 '11 at 10:37

This is a frequently asked question and I closed it as duplicate to connect it to other previously asked and answered questions. This makes it easier for other people to also find the alternative solutions given there. It's OK to keep Thorsten's answer accepted as it is now. – Martin Scharrer Jun 10 '11 at 10:39

You can use the float package:
\usepackage{float}

Alternatively there's also the placeins package that provides \FloatBarrier