0

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.

Petter
  • 1

1 Answers1

3

Use the float package, and change the [htbp] to [H] Then the tables will not float at all (unless they fall at the bottom of the page, in which case they will have to go to the top of the next page).

Peter Flynn
  • 2,870