0

Please consider the following LaTex document:

\documentclass[a4paper,11pt]{article}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{float}
\usepackage{array}% in the preamble
% define the title
\title{Problems from Chapter 8}
\author{Robert~J.~Sherry}
\begin{document}
\maketitle
\noindent
8.64 Fit a least-squares line to the data in Table 8-31 using (a) $x$ as
the indepenent variable, (b) x as the dependent variable.
\begin{table}
\caption{Table 8-31}
\begin{tabular}{|c|c c c c c c|}
\hline
x & 3 & 5 & 6 & 8 & 9 & 11 \\
y & 2 & 3 & 4 & 6 & 5 & 8 \\
\hline
\end{tabular}
\end{table}
\end{document}

LaTex is putting the table at the bottom of the page. I do not want it there. What should I do?

Thanks Bob

Bob
  • 255
  • 2
    Welcome to TeX.SX! The table environment is a floating environment, and LaTeX has a special way of treating floating environments. See here for a rather detailed explanation of how it works. If you don't want the table to float, then don't put it in a table environment. – Adam Liter Aug 02 '15 at 22:51
  • 3
    @Bob, try to add parameter h (as "here") to table: `\begin{table}[h]. This should help. – Zarko Aug 02 '15 at 22:53
  • @Zarko That will get automatically transformed by LaTeX. If you really want a float here, then don't make it a float. – cfr Aug 02 '15 at 23:43

0 Answers0