views:

31

answers:

1

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.

  1. 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,

  2. I change 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?

~LaTeX newbie using MikTex 2.8 on Windows 7

A: 

try using the longtable package. or you can use \begin{table}[!h]

Mica