因此,对于我其中一门课程的作业,我们应该以表格的形式提供一些数据。因此,我想要做的是将表格放在一定数量的小节下,但是当我这样做时:
\section*{Test Results}
Below are the results for each tester.
\subsection*{Tester 1}
\begin{table}[H]
\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|}
\hline
Safari&Print&Set Homepage&Zoom\\
\hline
Time(Seconds)&40&32&20\\
\hline
Errors&Couldn't find the print button&Clicked the wrong menu button&N/A\\
\hline
Likeability(1 to 10)&6&7&8\\
\hline
\end{tabular}
\vspace{-2em}
\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|}
\hline
Opera&Print&Set Homepage&Zoom\\
\hline
Time(Seconds)&37&226 (3 mins. 46 secs.)&17\\
\hline
Errors&Couldn't find the print button/No Confirmation of print&Opened Chrome to learn how to set an Opera Page/Difficult to find preferences&Mis-clicked on Zoom button.\\
\hline
Likeability(1 to 10)&6&0&7\\
\hline
\end{tabular}
\end{table}
\subsection*{Tester 2}
\begin{table}[]
\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|}
\hline
Safari&Print&Set Homepage&Zoom\\
\hline
Time(Seconds)&8&22&32\\
\hline
Errors&N/A&Found it difficult to change home page in settings.&Had a hard time finding zoom button.\\
\hline
Likeability(1 to 10)&8&7&5\\
\hline
\end{tabular}
\end{table}
\begin{table}
\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|}
\hline
Opera&Print&Set Homepage&Zoom\\
\hline
Time(Seconds)&5&338 (5 mins. 38 secs.)&8\\
\hline
Errors&N/A&Couldn't find out how to make a home page/Googled the results, looked in various places to learn how to set the web page.&N/A\\
\hline
Likeability(1 to 10)&6&0&7\\
\hline
\end{tabular}
\end{table}
我的文档生成了以下小节前我的表格。有什么办法可以获取其各自子部分下的数据吗?
答案1
结合使用 (a)[h!]
作为位置说明符和 (b) 插入到\clearpage
第二条指令之前\subsection*
即可完成此操作。顺便说一句,由于您有四 tabular
环境,你应该提供四(不是三个)table
环境。更好的是,因为表格本来就不应该浮动,所以不要使用任何 table
环境。