我在将表11设置为laTex中的表10时遇到问题。对于我的表,我一直使用[!]
和[h]
来使我的表在彼此之间显示,但是现在进入表11后,它就不会在表10之下
我试图做一些使用float包并放置在包中的方法,但是似乎没有做任何更改。
我之前也遇到过这个问题,因为起初我正在使用[h]
并且所有表都在互相作用下,但是随后它停止工作,所以我使用了[!]
但现在不起作用了
这是表10
\begin{table}[!]
\begin{tabular}{|l|l|}
\hline
Test\# & 10
\\ \hline
Content & \begin{tabular}[c]{@{}l@{}}Testing emails to be registered
when signing up\\ to be a lender.\end{tabular} \\ \hline
Input & Signing up and lending out a product.
\\ \hline
Pass Criteria & Signing up with the ability to lend out products.
\\ \hline
\end{tabular}
\end{table}
表11相同,但不会进入表10下,而是laTex将其放置在随机位置
\begin{table}[!]
\begin{tabular}{|l|l|}
\hline
Test\# & 11
\\ \hline
Content & \begin{tabular}[c]{@{}l@{}}Testing the billing information
input to see \\ if it works.\end{tabular} \\
\hline
Input & \begin{tabular}[c]{@{}l@{}}The user rents out a product
and check if\\ billing information is appearing correctly.\end{tabular} \\
\hline
Pass Criteria & \begin{tabular}[c]{@{}l@{}}Billing information appears
when checkout is\\ completed.\end{tabular}
\\ \hline
\end{tabular}
\end{table}
有什么办法可以将表11正确地放置在表10的正下方,而不是将其放置在随机的位置,如下面的图像所示。预先谢谢
答案 0 :(得分:1)
我建议采用另一种方法,如果这些表应该直接相互遵循,请将它们放在相同的浮动环境中:
\documentclass{article}
\usepackage{float}
\begin{document}
\begin{table}[htbp]
\begin{tabular}{|l|l|}
\hline
Test\# & 10
\\ \hline
Content & \begin{tabular}[c]{@{}l@{}}Testing emails to be registered
when signing up\\ to be a lender.\end{tabular} \\ \hline
Input & Signing up and lending out a product.
\\ \hline
Pass Criteria & Signing up with the ability to lend out products.
\\ \hline
\end{tabular}
\bigskip
\begin{tabular}{|l|l|}
\hline
Test\# & 11
\\ \hline
Content & \begin{tabular}[c]{@{}l@{}}Testing the billing information
input to see \\ if it works.\end{tabular} \\
\hline
Input & \begin{tabular}[c]{@{}l@{}}The user rents out a product
and check if\\ billing information is appearing correctly.\end{tabular} \\
\hline
Pass Criteria & \begin{tabular}[c]{@{}l@{}}Billing information appears
when checkout is\\ completed.\end{tabular}
\\ \hline
\end{tabular}
\end{table}
\end{document}