0

The following code is that for the first two problems enumerated as 11.) and 12.) on a page of a test. Why is LaTeX changing the order of them? (I guess the table environment is doing this.) How do I prevent it?

\documentclass[10pt]{amsart}

\usepackage{mathtools,array}
\usepackage{adjustbox}
\usepackage[skip=3pt]{caption}
\usepackage{makecell}


\begin{document}



\noindent \textbf{11.) }A student was given a piece of rope and told to cut it into two equal pieces, keep one piece, and pass the other piece to the next student. Each student was to repeat this process until every student in the class had exactly one piece of rope. Which of the following could be the fraction of the original rope that one of the students had?
\begin{tabbing}
\hspace*{3em} \= \hspace{3in} \= \kill
\> \textbf{a.) }$1/14$  \> \textbf{b.) }$1/15$ \\
\> \textbf{c.) }$1/16$  \> \textbf{d.) }$1/17$ \\
\> \textbf{e.) }$1/18$
\end{tabbing}
\vskip0.25in


\begin{table}
\centering
\caption*{Number of Premium\\Members}
\begin{tabular}{|| c !{\vrule width0.8pt} c | c | c||} \hline
    Year                &   1985    &   1986    &   1987 \\ \Xhline{0.8pt}
    Store \textit{A}    &   250     &   400     &   750 \\ \hline
    Store \textit{B}    &   500     &   1,000   &   1,250 \\ \hline
\end{tabular}
\end{table}
\vskip1.25mm

\begin{table}
\centering
\caption*{Average Number of Video\\Rentals Per Premium Member\\at Store \textit{B}}
\begin{tabular}{|| c !{\vrule width0.8pt} c | c | c||} \hline
    Year                &   1985    &   1986    &   1987 \\ \Xhline{0.8pt}
    Rentals             &   12      &   15      &   20 \\ \hline
\end{tabular}
\end{table}
\vskip1.25mm

\noindent \textbf{12.) }The first table shows the number of premium members at two video rental stores, Store \textit{A} and Store \textit{B}, for three consecutive years. The second table shows the average number of video rentals per premium member at Store \textit{B} during each of those years. Which of the following numbers best approximates the total number of video rentals by premium members at Store \textit{B} during the three years.
\begin{tabbing}
\hspace*{3em} \= \hspace{3in} \= \kill
\> \textbf{a.) }24,000    \> \textbf{b.) }46,000 \\
\> \textbf{c.) }58,000    \> \textbf{d.) }70,000 \\
\> \textbf{e.) }130,000
\end{tabbing}

\vfill


\end{document}
6
  • Try \begin{table}[ht] in both tables. However I think that here you should use tabular only. May 25 '19 at 16:32
  • What is [ht]? May 25 '19 at 16:36
  • 1
    Maybe tex.stackexchange.com/questions/8652/what-does-t-and-ht-mean shines a light on [ht]
    – albert
    May 25 '19 at 16:37
  • 1
    They tell LaTeX how to position the float (a table environment is a float) on the page. h means “here”, t means “top of the page”, b means “bottom”, and p means “in a page with floats only”. The default is tbp, which doesn't allow “here”, which is what you want. But as I said, I think the table environment is unnecessary here. May 25 '19 at 16:39
  • 1
    The only thing that the table environment does is specify that the content can be moved. If you do not want it to move, why is it in a table ? (you could just use tabular directly`) May 25 '19 at 18:06

Browse other questions tagged or ask your own question.