# How to fix the location of tables when they're imported with \input? [duplicate]

Possible Duplicate:
Keeping tables/figures close to where they are mentioned

I'm using MiKTeX and TexMaker 2.2.2. Using the latabstat command in Stata I create small tex files of some tables.

They look like:

\begin{table}[htbp]\centering
\begin{tabular}
(table content)
\end{tabular}
\end{table}

When I compile my main document

\begin{document}
\input{tablefromstata}
\end{document}

The tables float around - and I want to fix them.

Since the files contain the table command, putting table outside (in the main document), like

\begin{table}
\input{tablefromstata}
\end{table}

gives error messages.

I tried the floating option [H] after the input string input{}[h] but it seems not to work on input{}. Does anybody know how I can determine the exact location of tables imported using \input?

Thanks!

UPDATE: Problem solved. Anyone with the same problem, just type [h] after the caption command in stata.

-