latex - 如何在 LaTeX 中将我的桌子放在彼此下方
问题描述
我在将表 11 放在 laTex 中的表 10 下时遇到问题。对于我一直在使用的桌子[!]
,并[h]
让我的桌子在彼此下方显示,但现在一旦我到达桌 11,它就不会在桌 10 下
我试图做一些使用浮动包并放入包中的方法,但似乎没有进行任何更改。
我之前也遇到过这个问题,因为起初我正在使用[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 下方,而不是像下面显示的图像那样随机放置。先感谢您
解决方案
我建议另一种方法,如果表格应该直接相互跟随,请将它们放在相同的浮动环境中:
\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}
推荐阅读
- python - django 模型获取用户信息
- html - 将鼠标悬停在div上时如何显示复选框
- go - 如何将 url 列表添加到 gocolly 队列?
- ruby - find_by 只返回第一个值
- python - 将 Python turtle 的 exitonclick() 函数绑定到另一个键
- sql - 计算一个 SQL 列中的不同值
- python-3.x - 从 tkinter 表单返回一个值
- ios - 禁用特定时间段的通知
- android - Android MediaPlayer Streaming YouTube 音频流意外 LOUD 静态
- java - 嵌套循环中的语法和变量声明:内部声明如何优先?