如何在LaTeX中将我的桌子放在彼此之下

问题描述 投票:0回答:1

我有问题使表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的正下方,而不是将它放在某个随机的地方,就像下面显示的图像一样。先感谢您

enter image description here

latex
1个回答
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}
© www.soinside.com 2019 - 2024. All rights reserved.