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}
You can also try \usepackage{float} which gives you the extra positioning command H , which is really forces LaTeX to put the figure right where you specified. If you do use float, make sure to declare your labels after your captions. In terms of making your figures apear "here", H > h! > h .
Figure captions are generally placed below the figures, while table captions must be placed above the tables. This is because we generally read tables from the top down, and therefore want to see the caption at the top. Figures are not always read top down.
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!
You can also try \usepackage{float}
which gives you the extra positioning command H
, which is really forces LaTeX to put the figure right where you specified. If you do use float, make sure to declare your labels after your captions.
In terms of making your figures apear "here", H
>h!
>h
. But H!
does nothing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With