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.
\inputcommand simply inserts the content of the external file at this position, nothing more. Do you have atableinside or around the\input? Please consider to add a minimal working example (MWE) that illustrates your problem. – Martin Scharrer Jul 25 '11 at 15:33latabstatcommand in Stata create a table not wrapped in atabularenvironment? If so, you can insert the tables exactly where you want them, since they won't float at all. – Alan Munn Jul 25 '11 at 16:02