I am inserting a table in to a file that already has some text in it. This is at the end of a section and right before the beginning of another.
First I added the following code (sample, the real table is a real long one)
\begin{tabular}{|c|c|c|c}
a&b&c&d\\
\hline
c&d&e&f\\
\hline
\end{tabular}
Everything is fine. However I realise I need a caption to the table. So, then I changed the code to:
\begin{table}
\caption {title}
\begin{tabular}{|c|c|c|c}
a&b&c&d\\
\hline
c&d&e&f\\
开发者_如何学编程 \hline
\end{tabular}
\end{table}
Now the table jumps into the next section and starts 3-4 lines after the next section.
What am I doing wrong here?
try using the longtable
package. or you can use \begin{table}[!h]
精彩评论