2

I insert a table in the document using the following code:

\begin{table}[]
\begin{tabular}{|l|l|l|ll}
\cline{1-3}
 $\textbf{N}$ &  $\textbf{Numerical Value}$  \\ \cline{1-3}
 1 & -0.252057   \\ \cline{1-3}
 3 & 0.0000319669   \\ \cline{1-3}
 7 & 2.22225*$10^{-16}$ \\ \cline{1-3}
 9 &  -7.852930072020838*$10^{-23}$  \\ \cline{1-3}
 17 &  -6.183886440905487*$10^{-52}$   \\ \cline{1-3}
 19&  8.334822280715465*$10^{-60}$  \\ \cline{1-3}
\end{tabular}
\end{table}

However, it is placed in the wrong place, no matter if I place it under the relevant subsection. See the image before and after pasting the code in. How can I make it sit where it is supposed to sit?

Thanks!

Before:

Before

After:

After

chsk
  • 3,667
vqngs
  • 231
  • 1
    table is a float environment, and so it floats. See here to understand how you can influence how it floats: https://tex.stackexchange.com/a/39020/2388 – Ulrike Fischer May 06 '21 at 14:35
  • 1
    side remark: don't use \ to end a paragraph, this will only give you warning about underful boxes. – Ulrike Fischer May 06 '21 at 14:36
  • If you absolutely don't want your tables to float, you could just remove the table environment. If you do so, be warned that you might get some ugly half empty pages, especially if a table does not fit onto the page and is therefor pushed to the beginning of the next page. – leandriis May 06 '21 at 16:49

1 Answers1

3

Use:

\begin{table}[htbp]

and not

\begin{table}[]

That fixes it.

vqngs
  • 231