我有一张很长的表格,大小为一页。问题是,如果我的整个文本即将跳转到下一页,我希望这张表格被分成几部分,这样表格的一部分在前一页,另一部分在下一页。这应该是动态发生的,这样每次我在前面的文本中更改某些内容时,我也必须调整表格的断点。目前,我遇到的问题是,我的文本在页面中间的某个地方之前停止了一页,然后有一半空白页,然后在下一页,我的表格开始。
我的表格如下:
\begin{table}[H]
\begin{center}
\begin{tabular}[H]{ | l |l | l | l |l|}
\hline
$D$ & $\text{C}$ & $\text{ A } $ & $\text{ B } \mathscr{E}_{n_2(i)}$ & $\text{ E } $\\ \hline
4 & 1 & -39.2857 & -39.2857 & -39.2857 \\
4 & 2 & -28.2894 & -28.2894 & -28.2894 \\
4 & 3 & -18.2143& -18.2143 & -18.2143 \\
4 & 4 & -9.2106 & -9.2105 & -9.2106 \\ \hline
5 & 0 & -44.0681 & -44.0681 & -44.0681 \\
5 & 1 & -32.6119 & -32.6119 & -32.6119 \\
5 & 2 & -22.0150 & -22.0150 & -22.0150 \\
5 & 3 & -12.3881 & -12.3881 & -12.3881 \\
5 & 4 & -3.9169 & -3.9169 & -3.9161\\ \hline
6 & 1 & -48.8587 & -48.8587 & -48.8587 \\
6 & 2 & -36.9628 & -36.9628 & -36.9628 \\
6 & 3 & -25.8760 & -25.8760 & -25.8760 \\
6 & 4 & -15.6840 & -15.6840 & -15.6840 \\
6 & 5 & -6.5153 & -6.5154 & -6.5153\\
6 & 6 & 1.3968 & 1.4012 & 1.3968\\ \hline
7 & 0 & -53.6566 & -53.6566 & -53.6566\\
7 & 1 & -41.3386 & -41.3386 & -41.3386 \\
7 & 2 & -29.7877 & -29.7877 & -29.7877 \\
7 & 3 & -19.0729 & -19.0729 & -19.0729 \\
7 & 4 & -9.2903 & -9.2903 & -9.2903 \\
7 & 5 & -0.5885 & -0.5885 & -0.5887\\
7 & 6 & 6.7346 & 6.7346 & 6.7540\\ \hline
8 & 1 & -58.4610 & -58.4610 &-58.4610 \\
8 & 2 & -45.7363 & -45.7363 & -45.7363 \\
8 & 3 & -33.7433 & -33.7433 & -33.7433 \\
8 & 4 & -22.5385 & -22.5385 & -22.5385 \\
8 & 5 & -12.1974 & -12.1974 & -12.1974 \\
8 & 6 & -2.8272 & -2.8272 & -2.8272 \\
8 & 7 & 5.4017 & 5.4004 & 5.4017\\
8 & 8 & 12.1020 & 12.1687 & 12.1020\\
\hline
\end{tabular}
\end{center}
\end{table}
答案1
使用longtable
\documentclass{article}
\usepackage{lipsum}
\usepackage{mathrsfs,amsmath}
\usepackage{longtable}
\begin{document}
\lipsum[1-2]
\begin{longtable}{ | l |l | l | l |l|}
\hline
$D$ & $\text{C}$ & $\text{ A } $ & $\text{ B } \mathscr{E}_{n_2(i)}$ & $\text{ E } $\\ \hline
\endfirsthead
%
\multicolumn{5}{l}%
{{\bfseries \tablename\ \thetable\ Continued from previous page}} \\
\hline
%
$D$ & $\text{C}$ & $\text{ A } $ & $\text{ B } \mathscr{E}_{n_2(i)}$ & $\text{ E } $\\ \hline
\endhead
%
\hline \multicolumn{5}{|r|}{{Continued on next page}} \\ \hline
\endfoot
%
\hline
\multicolumn{5}{|r|}{{Concluded}} \\ \hline
\endlastfoot
4 & 1 & -39.2857 & -39.2857 & -39.2857 \\
4 & 2 & -28.2894 & -28.2894 & -28.2894 \\
4 & 3 & -18.2143& -18.2143 & -18.2143 \\
4 & 4 & -9.2106 & -9.2105 & -9.2106 \\ \hline
5 & 0 & -44.0681 & -44.0681 & -44.0681 \\
5 & 1 & -32.6119 & -32.6119 & -32.6119 \\
5 & 2 & -22.0150 & -22.0150 & -22.0150 \\
5 & 3 & -12.3881 & -12.3881 & -12.3881 \\
5 & 4 & -3.9169 & -3.9169 & -3.9161\\ \hline
6 & 1 & -48.8587 & -48.8587 & -48.8587 \\
6 & 2 & -36.9628 & -36.9628 & -36.9628 \\
6 & 3 & -25.8760 & -25.8760 & -25.8760 \\
6 & 4 & -15.6840 & -15.6840 & -15.6840 \\
6 & 5 & -6.5153 & -6.5154 & -6.5153\\
6 & 6 & 1.3968 & 1.4012 & 1.3968\\ \hline
7 & 0 & -53.6566 & -53.6566 & -53.6566\\
7 & 1 & -41.3386 & -41.3386 & -41.3386 \\
7 & 2 & -29.7877 & -29.7877 & -29.7877 \\
7 & 3 & -19.0729 & -19.0729 & -19.0729 \\
7 & 4 & -9.2903 & -9.2903 & -9.2903 \\
7 & 5 & -0.5885 & -0.5885 & -0.5887\\
7 & 6 & 6.7346 & 6.7346 & 6.7540\\ \hline
8 & 1 & -58.4610 & -58.4610 &-58.4610 \\
8 & 2 & -45.7363 & -45.7363 & -45.7363 \\
8 & 3 & -33.7433 & -33.7433 & -33.7433 \\
8 & 4 & -22.5385 & -22.5385 & -22.5385 \\
8 & 5 & -12.1974 & -12.1974 & -12.1974 \\
8 & 6 & -2.8272 & -2.8272 & -2.8272 \\
8 & 7 & 5.4017 & 5.4004 & 5.4017\\
8 & 8 & 12.1020 & 12.1687 & 12.1020\\
\hline
\end{longtable}
\end{document}