1

I'm trying to get a table in to a section I want but it wont play ball, The first table shows above the allowed paragraph and the second table in the allowed paragraph, how can I fix it?

I use the \usepackage{float} package.

Thanks

\paragraph{Allowed}
\begin{table}[h!]
\begin{tabular}{lll}
Rule & Who & Controlled \\
 &  &  \\
 &  &  \\
 &  &  \\
 &  &  \\
 &  & 
\end{tabular}
\end{table}
\paragraph{Not allowed}
\begin{table}[h!]
\begin{tabular}{lll}
Rule & Who & Controlled \\
 &  &  \\
 &  &  \\
 &  &  \\
 &  &  \\
 &  & 
\end{tabular}
\end{table}
Ausghostdog
  • 71
  • 1
  • 3

1 Answers1

5

In such a case do not use a floating object. Use instead

\usepackage{caption}
...

\noindent
\begin{minipage}{\linewidth}
\centering
\captionof{table}{A table, what else?}
\begin{tabular}{lll}
Rule & Who & Controlled \\
 &  &  \\
 &  &  \\
 &  &  \\
 &  &  \\
 &  & 
\end{tabular}
\end{minipage}

...
  • I'd mention also \usepackage{caption-of}, that can be handy for the cases where \usepackage{caption} can't be employed (some classes are incompatible with it). – egreg May 21 '14 at 09:27