I wanna place up my table directly into text. But it places in random places, not exactly where I type the table code like this:
\begin{table}[h!]
\centering
\begin{tabular}{|c|c|c|}
...
\label{tab:my_label}
\end{table}
Also, it isn't placed directly after the text block, for example:
My first plain text block and data description table My second plain text
And table is everywhere but not right after the first text block.
PLease help me
[!ht]
it will appear where is inserted, of course if there is sufficient place. If it is not, It will move to the top of the next page. Using[H]
(which destroy floating mechanism), defined in thefloat
package, will insert table immediately after insertion point. However, you should be aware, that in case, that on page is not sufficient space, it also will move to the top of the next page, but will left empty space on the previous. So , be very careful, what you doing.\begin{tabular}
never moves, it only moves because you wrapped it in\begin{table}
the only function of which is to specify it can move. (You could use[H]
as in the accepted answer but using[H]
is a bit odd, you are adding\begin{table}
which you don't need then adding[H]
which disables he only function of thtable
environment.