LaTeX工作台定位 [英] LaTeX table positioning

查看:148
本文介绍了LaTeX工作台定位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个LaTeX文档,其中包含一个段落,后面是4个表,再后面是第二个段落.我希望4个表格出现在两个段落之间,从我阅读表示我应该在启动表环境(例如\begin{table}[h])之后使用[h]选项.

I have a LaTeX document that contains a paragraph followed by 4 tables followed by a second paragraph. I want the 4 tables to appear between the two paragraphs which from what I've read means I should use the [h] option after beginning the table environment (e.g. \begin{table}[h]).

使用此方法,前两个表按预期出现在第1段之后,但是随后显示第2段,而后两个表出现在下一页上.如何使表格出现在正确的位置?

Using this the first two tables appear after paragraph 1 as expected, however paragraph 2 is then displayed with the last two tables appearing on the following page. How can I get the tables to appear in the correct location?

我尝试了多种方法来纠正位置,例如使用[h!],但这似乎没有任何效果.在表格之后使用\clearpage确实具有使表格出现在第二段之前的预期效果,但是当我希望第二段开始时,它会将最后两个表格留在自己的页面上,并带有空白负载.紧随桌子之后.

I've tried various things to correct the positioning such as using [h!] however this doesn't seem to have any effect. Using \clearpage after the tables does have the desired effect of making the tables appear before the second paragraph but it then leaves the last two tables on their own page with loads of white-space, when I would prefer to have the second paragraph begin immediately after the tables.

Paragraph 1...

\begin{table}[h]
    table1...
\end{table}

\begin{table}[h]
   table2...
\end{table}[h]
...

Paragraph 2...

推荐答案

做完一些谷歌搜索之后,我遇到了 float 软件包,该软件包使您可以防止LaTeX重新定位表.

After doing some more googling I came across the float package which lets you prevent LaTeX from repositioning the tables.

在序言中:

\usepackage{float}
\restylefloat{table}

然后,对于每个表格,您都可以使用H放置选项(例如\begin{table}[H])来确保它不会被重新放置.

Then for each table you can use the H placement option (e.g. \begin{table}[H]) to make sure it doesn't get repositioned.

这篇关于LaTeX工作台定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆