Positioning table captions in LaTeX

latex

Solution

Try

\begin{table}[h]
   ...
\end{table}

That tells latex "put the table here" instead of letting it float.

I also use

\usepackage{array}

in the preamble for pretty much all my latex documents, but pr0wl informs us that it is not necessary. Thanks pr0wl!

Problem

When I try centering my table & getting a caption so that it reads something like "Table 1. This is the caption." the table appears at the top of the page no matter what I do. If I don't do the caption then I can get it in the part of the document that I want. How do I fix this problem? ``` \begin{table} \caption{This is the caption.} \begin{center} \begin{tabular}{ | l | l | l | l |} \hline ... \hline \end{tabular} \end{center} \end{table} ```

Original source

Related problems