Possible Duplicate:
Keeping tables/figures close to where they are mentioned
In my example I have two subsections. Each of them contains single table. I need each table to be displayed under the correct heading.
Now I have:
1. text of subsection C
2. text of subsection E
3. table D
4. table F
I want the order to be: 1. text of subsection C 2. table D 3. text of subsection E 4. table F
I don't care if there would be half page blank.
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\section{B}
\subsection{C}
\lipsum[1]
\begin{table}
\begin{tabular}{c}
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a
\end{tabular}
\caption{D}
\end{table}
\subsection{E}
\lipsum[2-4]
\begin{table}
\begin{tabular}{c}
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b\\
b
\end{tabular}
\caption{F}
\end{table}
\end{document}
placeinspackage and its\FloatBarriermacro. – lockstep Aug 30 '12 at 16:38\clearpagesimplier? – Ichibann Aug 30 '12 at 16:39