如何将 ltablex 放在页面顶部?

如何将 ltablex 放在页面顶部?

有人能告诉我将表格放在页面顶部的技巧吗ltablex?例如,对于表格环境,它是 [ht],但对于我使用 则不起作用ltablex

谢谢。

\documentclass{article}
\usepackage{ltablex}
\usepackage{threeparttable}
\usepackage{booktabs}

\title{Document}
\begin{document}
\maketitle

\begin{tabularx}{\textwidth}{Xc}
\toprule\toprule
Some random text & 1,75,650\\\midrule
\multicolumn{2}{l}{\textbf{Panel A1: AAA}} \\\midrule
Number of observations ... & 1,75,650\\
Delete: ... & (78,420)\\
Delete: ... & (7,104)\\
Final sample & 90,126\\
Delete: & (2,143)\\
Delete: & (8,345)\\
Final sample & 79,638\\\midrule
\multicolumn{2}{l}{\textbf{Panel A2: AAA}} \\\midrule
Number of observations & 79,638\\
Delete: & (39,540)\\
Delete: & (7,979) \\
Final sample & 32,119 \\\midrule
\multicolumn{2}{l}{\textbf{Panel B1: BBB }} \\\midrule
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Final sample & 42,884\\\midrule
\multicolumn{2}{l}{\textbf{Panel B2: BBB}} \\\midrule
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Final sample & 42,884\\\midrule\bottomrule
\end{tabularx}

\end{document}

答案1

我了解到afterpage可以使用该包来确保ltablex从下一页开始。

梅威瑟:

平均能量损失

\documentclass{article}
\usepackage{ltablex}
\usepackage{threeparttable}
\usepackage{booktabs}
\usepackage{afterpage}
\usepackage{lipsum} % dummy text

\title{Document}
\begin{document}
\maketitle
\lipsum[1] % some text
\afterpage{
\begin{tabularx}{\textwidth}{Xc}
\toprule\toprule
Some random text & 1,75,650\\\midrule
\multicolumn{2}{l}{\textbf{Panel A1: AAA}} \\\midrule
Number of observations ... & 1,75,650\\
Delete: ... & (78,420)\\
Delete: ... & (7,104)\\
Final sample & 90,126\\
Delete: & (2,143)\\
Delete: & (8,345)\\
Final sample & 79,638\\\midrule
\multicolumn{2}{l}{\textbf{Panel A2: AAA}} \\\midrule
Number of observations & 79,638\\
Delete: & (39,540)\\
Delete: & (7,979) \\
Final sample & 32,119 \\\midrule
\multicolumn{2}{l}{\textbf{Panel B1: BBB }} \\\midrule
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Final sample & 42,884\\\midrule
\multicolumn{2}{l}{\textbf{Panel B2: BBB}} \\\midrule
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Final sample & 42,884\\\midrule\bottomrule
\end{tabularx}}
\lipsum[2-10]  % more text
\end{document}

相关内容