将很长的表格拆分到一页上然后继续到下一页

将很长的表格拆分到一页上然后继续到下一页

我想将一个很窄、很长的表格分割在一个页面上,然后等该页面写满后,再在该页面上继续该表格。

我查看了发布的解决方案这里这里,但无法获得正确的输出。我正在提取保存到文本文件中的测量生成的数据,因此filecontents

请帮助我(如果可能的话)将表格放在一页上的多列上,然后继续下一页。

这是我目前拥有的代码:

\documentclass{book}
\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry}
\usepackage{pgfplotstable, booktabs}
\pgfplotsset{compat=newest}
\usepackage{longtable}
\usepackage{amsmath}
\usepackage{array}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}

\usepackage{filecontents}
\begin{filecontents}{verylong.txt}
c   G(c)GTOT    GhatGTOT    MODELPERFORM
0.10106383  1   0.971896956 0.971896956
0.095744681 1   0.974238876 0.974238876
0.090425532 1   0.974238876 0.974238876
0.085106383 1   0.974238876 0.974238876
0.079787234 1   0.974238876 0.974238876
0.074468085 1   0.976580796 0.976580796
0.069148936 1   0.978922717 0.978922717
0.063829787 1   0.978922717 0.978922717
0.058510638 1   0.981264637 0.981264637
0.053191489 1   0.981264637 0.981264637
0.04787234  1   0.981264637 0.981264637
0.042553191 1   0.990632319 0.990632319
0.037234043 1   0.990632319 0.990632319
0.031914894 1   0.992974239 0.992974239
0.026595745 1   0.992974239 0.992974239
0.021276596 1   0.992974239 0.992974239
0.015957447 1   1   1
0.010638298 1   1   1
0.005319149 1   1   1
0   1   1   1
0.893617021 0.629976581 0.585480094 0.92936803
0.888297872 0.644028103 0.592505855 0.92
0.882978723 0.658079625 0.613583138 0.932384342
0.877659574 0.672131148 0.62295082  0.926829268
0.872340426 0.683840749 0.634660422 0.928082192
0.867021277 0.695550351 0.641686183 0.922558923
0.861702128 0.707259953 0.641686183 0.907284768
0.856382979 0.718969555 0.644028103 0.895765472
0.85106383  0.730679157 0.655737705 0.897435897
0.845744681 0.742388759 0.669789227 0.902208202
0.840425532 0.754098361 0.669789227 0.888198758
0.835106383 0.763466042 0.669789227 0.877300613
0.829787234 0.772833724 0.683840749 0.884848485
0.824468085 0.782201405 0.68852459  0.880239521
0.819148936 0.791569087 0.700234192 0.884615385
0.813829787 0.800936768 0.711943794 0.888888889
0.808510638 0.81030445  0.716627635 0.884393064
0.803191489 0.817330211 0.723653396 0.885386819
0.10106383  1   0.971896956 0.971896956
0.095744681 1   0.974238876 0.974238876
0.090425532 1   0.974238876 0.974238876
0.085106383 1   0.974238876 0.974238876
0.079787234 1   0.974238876 0.974238876
0.074468085 1   0.976580796 0.976580796
0.069148936 1   0.978922717 0.978922717
0.063829787 1   0.978922717 0.978922717
0.058510638 1   0.981264637 0.981264637
0.053191489 1   0.981264637 0.981264637
0.04787234  1   0.981264637 0.981264637
0.042553191 1   0.990632319 0.990632319
0.037234043 1   0.990632319 0.990632319
0.031914894 1   0.992974239 0.992974239
0.026595745 1   0.992974239 0.992974239
0.021276596 1   0.992974239 0.992974239
0.015957447 1   1   1
0.010638298 1   1   1
0.005319149 1   1   1
0   1   1   1
0.638297872 0.948477752 0.880562061 0.928395062
0.632978723 0.950819672 0.880562061 0.926108374
0.627659574 0.953161593 0.880562061 0.923832924
0.622340426 0.955503513 0.880562061 0.921568627
0.617021277 0.957845433 0.880562061 0.919315403
0.611702128 0.960187354 0.880562061 0.917073171
0.606382979 0.962529274 0.880562061 0.914841849
0.10106383  1   0.971896956 0.971896956
0.095744681 1   0.974238876 0.974238876
0.090425532 1   0.974238876 0.974238876
0.085106383 1   0.974238876 0.974238876
0.079787234 1   0.974238876 0.974238876
0.074468085 1   0.976580796 0.976580796
0.069148936 1   0.978922717 0.978922717
0.063829787 1   0.978922717 0.978922717
0.058510638 1   0.981264637 0.981264637
0.053191489 1   0.981264637 0.981264637
0.04787234  1   0.981264637 0.981264637
0.042553191 1   0.990632319 0.990632319
0.037234043 1   0.990632319 0.990632319
0.031914894 1   0.992974239 0.992974239
0.026595745 1   0.992974239 0.992974239
0.021276596 1   0.992974239 0.992974239
0.015957447 1   1   1
0.010638298 1   1   1
0.005319149 1   1   1
0   1   1   1
0.521276596 1   0.915690867 0.915690867
0.515957447 1   0.915690867 0.915690867
0.510638298 1   0.915690867 0.915690867
0.505319149 1   0.915690867 0.915690867
0.5 1   0.915690867 0.915690867
0.494680851 1   0.918032787 0.918032787
0.489361702 1   0.918032787 0.918032787
0.484042553 1   0.920374707 0.920374707
0.478723404 1   0.920374707 0.920374707
0.473404255 1   0.920374707 0.920374707
0.468085106 1   0.920374707 0.920374707
0.462765957 1   0.922716628 0.922716628
0.457446809 1   0.922716628 0.922716628
0.45212766  1   0.925058548 0.925058548
0.446808511 1   0.925058548 0.925058548
0.441489362 1   0.925058548 0.925058548
0.436170213 1   0.925058548 0.925058548
0.10106383  1   0.971896956 0.971896956
0.095744681 1   0.974238876 0.974238876
0.090425532 1   0.974238876 0.974238876
0.085106383 1   0.974238876 0.974238876
0.079787234 1   0.974238876 0.974238876
0.074468085 1   0.976580796 0.976580796
0.069148936 1   0.978922717 0.978922717
0.063829787 1   0.978922717 0.978922717
0.058510638 1   0.981264637 0.981264637
0.053191489 1   0.981264637 0.981264637
0.04787234  1   0.981264637 0.981264637
0.042553191 1   0.990632319 0.990632319
0.037234043 1   0.990632319 0.990632319
0.031914894 1   0.992974239 0.992974239
0.026595745 1   0.992974239 0.992974239
0.021276596 1   0.992974239 0.992974239
0.015957447 1   1   1
0.010638298 1   1   1
0.005319149 1   1   1
0   1   1   1
0.367021277 1   0.948477752 0.948477752
0.361702128 1   0.948477752 0.948477752
0.356382979 1   0.950819672 0.950819672
0.35106383  1   0.950819672 0.950819672
0.345744681 1   0.950819672 0.950819672
0.340425532 1   0.950819672 0.950819672
0.335106383 1   0.950819672 0.950819672
0.329787234 1   0.950819672 0.950819672
0.324468085 1   0.950819672 0.950819672
0.319148936 1   0.950819672 0.950819672
0.313829787 1   0.950819672 0.950819672
0.10106383  1   0.971896956 0.971896956
0.095744681 1   0.974238876 0.974238876
0.090425532 1   0.974238876 0.974238876
0.085106383 1   0.974238876 0.974238876
0.079787234 1   0.974238876 0.974238876
0.074468085 1   0.976580796 0.976580796
0.069148936 1   0.978922717 0.978922717
0.063829787 1   0.978922717 0.978922717
0.058510638 1   0.981264637 0.981264637
0.053191489 1   0.981264637 0.981264637
0.04787234  1   0.981264637 0.981264637
0.042553191 1   0.990632319 0.990632319
0.037234043 1   0.990632319 0.990632319
0.031914894 1   0.992974239 0.992974239
0.026595745 1   0.992974239 0.992974239
0.021276596 1   0.992974239 0.992974239
0.015957447 1   1   1
0.010638298 1   1   1
0.005319149 1   1   1
0   1   1   1
0.10106383  1   0.971896956 0.971896956
0.095744681 1   0.974238876 0.974238876
0.090425532 1   0.974238876 0.974238876
0.085106383 1   0.974238876 0.974238876
0.079787234 1   0.974238876 0.974238876
0.074468085 1   0.976580796 0.976580796
0.069148936 1   0.978922717 0.978922717
0.063829787 1   0.978922717 0.978922717
0.058510638 1   0.981264637 0.981264637
0.053191489 1   0.981264637 0.981264637
0.04787234  1   0.981264637 0.981264637
0.042553191 1   0.990632319 0.990632319
0.037234043 1   0.990632319 0.990632319
0.031914894 1   0.992974239 0.992974239
0.026595745 1   0.992974239 0.992974239
0.021276596 1   0.992974239 0.992974239
0.015957447 1   1   1
0.010638298 1   1   1
0.005319149 1   1   1
0   1   1   1
0.10106383  1   0.971896956 0.971896956
0.095744681 1   0.974238876 0.974238876
0.090425532 1   0.974238876 0.974238876
0.085106383 1   0.974238876 0.974238876
0.079787234 1   0.974238876 0.974238876
0.074468085 1   0.976580796 0.976580796
0.069148936 1   0.978922717 0.978922717
0.063829787 1   0.978922717 0.978922717
0.058510638 1   0.981264637 0.981264637
0.053191489 1   0.981264637 0.981264637
0.04787234  1   0.981264637 0.981264637
0.042553191 1   0.990632319 0.990632319
0.037234043 1   0.990632319 0.990632319
0.031914894 1   0.992974239 0.992974239
0.026595745 1   0.992974239 0.992974239
0.021276596 1   0.992974239 0.992974239
0.015957447 1   1   1
0.010638298 1   1   1
0.005319149 1   1   1
0   1   1   1
\end{filecontents}


\begin{document}


%%% Code from Dr. Christian ------ for not using headers.----------------------
\pgfkeysifdefined{/pgfplots/table/output empty row/.@cmd}{
    % upcoming releases offer this more convenient option:
    \pgfplotstableset{
        empty header/.style={
          every head row/.style={output empty row},
          outfile=pgfplotstable.example1.out.tex,
        }
    }
}{
    % versions up to and including 1.5.1 need this:
    \pgfplotstableset{
        empty header/.style={
            typeset cell/.append code={%
                \ifnum\pgfplotstablerow=-1 %
                    \pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
                \fi
            }
        }
    }
}

\noindent
{\scriptsize
\pgfplotstabletypeset[col sep=space,empty header,
columns={c,G(c)GTOT,GhatGTOT,MODELPERFORM},      % display specified columns
begin table=\begin{longtable},
end table=\end{longtable},
columns/c/.style={column type={c},dec sep align,precision=4,fixed,fixed zerofill},
columns/G(c)GTOT/.style={column type={c},dec sep align,precision=4,fixed,fixed zerofill},
columns/GhatGTOT/.style={column type={c},dec sep align,precision=4,fixed,fixed zerofill},
columns/MODELPERFORM/.style={column type={c},dec sep align,precision=4,fixed,fixed zerofill},
every head row/.append style={before row={%
    \caption{This is a Table with Data}%
    \label{tab:DataTable}\\\toprule
    \multicolumn{2}{c}{\emph{c}} & \multicolumn{2}{c}{$\dfrac{G(c)}{G_{TOT}}$} & \multicolumn{2}{c}{$\dfrac{\hat{G}(c)}{G_{TOT}}$} & \multicolumn{2}{c}{$\phi(c)$} \\[7pt] \toprule
    \endfirsthead
    %
    \multicolumn{8}{c}%
    {{\bfseries Table \thetable\ \textit{(Continued)}}} \\
    \toprule
    %
    \multicolumn{2}{c}{\emph{c}} & \multicolumn{2}{c}{$\dfrac{G(c)}{G_{TOT}}$} & \multicolumn{2}{c}{$\dfrac{\hat{G}(c)}{G_{TOT}}$} & \multicolumn{2}{c}{$\phi(c)$} \\[7pt] \toprule
    \endhead
    %
    \midrule \multicolumn{8}{r}{{Continued on next page}} \\ \bottomrule
    \endfoot
    %
    \midrule
    \multicolumn{8}{r}{{End of Table}} \\ \bottomrule
    \endlastfoot
    }},
]{verylong.txt}

\end{document} 

答案1

我认为您应该改用supertabular而不是longtable

这个包应该可以满足你的需要。

这是代码

                \documentclass{book}
                \usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry}
                \usepackage{pgfplotstable, booktabs}
                \pgfplotsset{compat=newest}
                \usepackage{supertabular}
                \usepackage{amsmath}
                \usepackage{array}
                \usepackage{fancyhdr}
                \pagestyle{fancy}
                \fancyhf{}

                \usepackage{filecontents}
                \begin{filecontents}{verylong.txt}
                c   G(c)GTOT    GhatGTOT    MODELPERFORM
                0.10106383  1   0.971896956 0.971896956
                0.095744681 1   0.974238876 0.974238876
                0.090425532 1   0.974238876 0.974238876
                0.085106383 1   0.974238876 0.974238876
                0.079787234 1   0.974238876 0.974238876
                0.074468085 1   0.976580796 0.976580796
                0.069148936 1   0.978922717 0.978922717
                0.063829787 1   0.978922717 0.978922717
                0.058510638 1   0.981264637 0.981264637
                0.053191489 1   0.981264637 0.981264637
                0.04787234  1   0.981264637 0.981264637
                0.042553191 1   0.990632319 0.990632319
                0.037234043 1   0.990632319 0.990632319
                0.031914894 1   0.992974239 0.992974239
                0.026595745 1   0.992974239 0.992974239
                0.021276596 1   0.992974239 0.992974239
                0.015957447 1   1   1
                0.010638298 1   1   1
                0.005319149 1   1   1
                0   1   1   1
                0.893617021 0.629976581 0.585480094 0.92936803
                0.888297872 0.644028103 0.592505855 0.92
                0.882978723 0.658079625 0.613583138 0.932384342
                0.877659574 0.672131148 0.62295082  0.926829268
                0.872340426 0.683840749 0.634660422 0.928082192
                0.867021277 0.695550351 0.641686183 0.922558923
                0.861702128 0.707259953 0.641686183 0.907284768
                0.856382979 0.718969555 0.644028103 0.895765472
                0.85106383  0.730679157 0.655737705 0.897435897
                0.845744681 0.742388759 0.669789227 0.902208202
                0.840425532 0.754098361 0.669789227 0.888198758
                0.835106383 0.763466042 0.669789227 0.877300613
                0.829787234 0.772833724 0.683840749 0.884848485
                0.824468085 0.782201405 0.68852459  0.880239521
                0.819148936 0.791569087 0.700234192 0.884615385
                0.813829787 0.800936768 0.711943794 0.888888889
                0.808510638 0.81030445  0.716627635 0.884393064
                0.803191489 0.817330211 0.723653396 0.885386819
                0.10106383  1   0.971896956 0.971896956
                0.095744681 1   0.974238876 0.974238876
                0.090425532 1   0.974238876 0.974238876
                0.085106383 1   0.974238876 0.974238876
                0.079787234 1   0.974238876 0.974238876
                0.074468085 1   0.976580796 0.976580796
                0.069148936 1   0.978922717 0.978922717
                0.063829787 1   0.978922717 0.978922717
                0.058510638 1   0.981264637 0.981264637
                0.053191489 1   0.981264637 0.981264637
                0.04787234  1   0.981264637 0.981264637
                0.042553191 1   0.990632319 0.990632319
                0.037234043 1   0.990632319 0.990632319
                0.031914894 1   0.992974239 0.992974239
                0.026595745 1   0.992974239 0.992974239
                0.021276596 1   0.992974239 0.992974239
                0.015957447 1   1   1
                0.010638298 1   1   1
                0.005319149 1   1   1
                0   1   1   1
                0.638297872 0.948477752 0.880562061 0.928395062
                0.632978723 0.950819672 0.880562061 0.926108374
                0.627659574 0.953161593 0.880562061 0.923832924
                0.622340426 0.955503513 0.880562061 0.921568627
                0.617021277 0.957845433 0.880562061 0.919315403
                0.611702128 0.960187354 0.880562061 0.917073171
                0.606382979 0.962529274 0.880562061 0.914841849
                0.10106383  1   0.971896956 0.971896956
                0.095744681 1   0.974238876 0.974238876
                0.090425532 1   0.974238876 0.974238876
                0.085106383 1   0.974238876 0.974238876
                0.079787234 1   0.974238876 0.974238876
                0.074468085 1   0.976580796 0.976580796
                0.069148936 1   0.978922717 0.978922717
                0.063829787 1   0.978922717 0.978922717
                0.058510638 1   0.981264637 0.981264637
                0.053191489 1   0.981264637 0.981264637
                0.04787234  1   0.981264637 0.981264637
                0.042553191 1   0.990632319 0.990632319
                0.037234043 1   0.990632319 0.990632319
                0.031914894 1   0.992974239 0.992974239
                0.026595745 1   0.992974239 0.992974239
                0.021276596 1   0.992974239 0.992974239
                0.015957447 1   1   1
                0.010638298 1   1   1
                0.005319149 1   1   1
                0   1   1   1
                0.521276596 1   0.915690867 0.915690867
                0.515957447 1   0.915690867 0.915690867
                0.510638298 1   0.915690867 0.915690867
                0.505319149 1   0.915690867 0.915690867
                0.5 1   0.915690867 0.915690867
                0.494680851 1   0.918032787 0.918032787
                0.489361702 1   0.918032787 0.918032787
                0.484042553 1   0.920374707 0.920374707
                0.478723404 1   0.920374707 0.920374707
                0.473404255 1   0.920374707 0.920374707
                0.468085106 1   0.920374707 0.920374707
                0.462765957 1   0.922716628 0.922716628
                0.457446809 1   0.922716628 0.922716628
                0.45212766  1   0.925058548 0.925058548
                0.446808511 1   0.925058548 0.925058548
                0.441489362 1   0.925058548 0.925058548
                0.436170213 1   0.925058548 0.925058548
                0.10106383  1   0.971896956 0.971896956
                0.095744681 1   0.974238876 0.974238876
                0.090425532 1   0.974238876 0.974238876
                0.085106383 1   0.974238876 0.974238876
                0.079787234 1   0.974238876 0.974238876
                0.074468085 1   0.976580796 0.976580796
                0.069148936 1   0.978922717 0.978922717
                0.063829787 1   0.978922717 0.978922717
                0.058510638 1   0.981264637 0.981264637
                0.053191489 1   0.981264637 0.981264637
                0.04787234  1   0.981264637 0.981264637
                0.042553191 1   0.990632319 0.990632319
                0.037234043 1   0.990632319 0.990632319
                0.031914894 1   0.992974239 0.992974239
                0.026595745 1   0.992974239 0.992974239
                0.021276596 1   0.992974239 0.992974239
                0.015957447 1   1   1
                0.010638298 1   1   1
                0.005319149 1   1   1
                0   1   1   1
                0.367021277 1   0.948477752 0.948477752
                0.361702128 1   0.948477752 0.948477752
                0.356382979 1   0.950819672 0.950819672
                0.35106383  1   0.950819672 0.950819672
                0.345744681 1   0.950819672 0.950819672
                0.340425532 1   0.950819672 0.950819672
                0.335106383 1   0.950819672 0.950819672
                0.329787234 1   0.950819672 0.950819672
                0.324468085 1   0.950819672 0.950819672
                0.319148936 1   0.950819672 0.950819672
                0.313829787 1   0.950819672 0.950819672
                0.10106383  1   0.971896956 0.971896956
                0.095744681 1   0.974238876 0.974238876
                0.090425532 1   0.974238876 0.974238876
                0.085106383 1   0.974238876 0.974238876
                0.079787234 1   0.974238876 0.974238876
                0.074468085 1   0.976580796 0.976580796
                0.069148936 1   0.978922717 0.978922717
                0.063829787 1   0.978922717 0.978922717
                0.058510638 1   0.981264637 0.981264637
                0.053191489 1   0.981264637 0.981264637
                0.04787234  1   0.981264637 0.981264637
                0.042553191 1   0.990632319 0.990632319
                0.037234043 1   0.990632319 0.990632319
                0.031914894 1   0.992974239 0.992974239
                0.026595745 1   0.992974239 0.992974239
                0.021276596 1   0.992974239 0.992974239
                0.015957447 1   1   1
                0.010638298 1   1   1
                0.005319149 1   1   1
                0   1   1   1
                0.10106383  1   0.971896956 0.971896956
                0.095744681 1   0.974238876 0.974238876
                0.090425532 1   0.974238876 0.974238876
                0.085106383 1   0.974238876 0.974238876
                0.079787234 1   0.974238876 0.974238876
                0.074468085 1   0.976580796 0.976580796
                0.069148936 1   0.978922717 0.978922717
                0.063829787 1   0.978922717 0.978922717
                0.058510638 1   0.981264637 0.981264637
                0.053191489 1   0.981264637 0.981264637
                0.04787234  1   0.981264637 0.981264637
                0.042553191 1   0.990632319 0.990632319
                0.037234043 1   0.990632319 0.990632319
                0.031914894 1   0.992974239 0.992974239
                0.026595745 1   0.992974239 0.992974239
                0.021276596 1   0.992974239 0.992974239
                0.015957447 1   1   1
                0.010638298 1   1   1
                0.005319149 1   1   1
                0   1   1   1
                0.10106383  1   0.971896956 0.971896956
                0.095744681 1   0.974238876 0.974238876
                0.090425532 1   0.974238876 0.974238876
                0.085106383 1   0.974238876 0.974238876
                0.079787234 1   0.974238876 0.974238876
                0.074468085 1   0.976580796 0.976580796
                0.069148936 1   0.978922717 0.978922717
                0.063829787 1   0.978922717 0.978922717
                0.058510638 1   0.981264637 0.981264637
                0.053191489 1   0.981264637 0.981264637
                0.04787234  1   0.981264637 0.981264637
                0.042553191 1   0.990632319 0.990632319
                0.037234043 1   0.990632319 0.990632319
                0.031914894 1   0.992974239 0.992974239
                0.026595745 1   0.992974239 0.992974239
                0.021276596 1   0.992974239 0.992974239
                0.015957447 1   1   1
                0.010638298 1   1   1
                0.005319149 1   1   1
                0   1   1   1
                \end{filecontents}


                \begin{document}
                \twocolumn

                %%% Code from Dr. Christian ------ for not using headers.----------------------
                \pgfkeysifdefined{/pgfplots/table/output empty row/.@cmd}{
                    % upcoming releases offer this more convenient option:
                    \pgfplotstableset{
                        empty header/.style={
                          every head row/.style={output empty row},
                          outfile=pgfplotstable.example1.out.tex,
                        }
                    }
                }{
                    % versions up to and including 1.5.1 need this:
                    \pgfplotstableset{
                        empty header/.style={
                            typeset cell/.append code={%
                                \ifnum\pgfplotstablerow=-1 %
                                    \pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
                                \fi
                            }
                        }
                    }
                }

                \noindent
                {\scriptsize
                % define tab first header
                \tablefirsthead{\multicolumn{2}{c}{\emph{c}} & \multicolumn{2}{c}{$\dfrac{G(c)}{G_{TOT}}$} & \multicolumn{2}{c}{$\dfrac{\hat{G}(c)}{G_{TOT}}$} & \multicolumn{2}{c}{$\phi(c)$} \\[7pt] \toprule\\}
                %define subsequent headers
                \tablehead{\multicolumn{8}{c}%
                    {{\bfseries Table \thetable\ \textit{(Continued)}}}\\
                    \toprule
                    %
                    \multicolumn{2}{c}{\emph{c}} & \multicolumn{2}{c}{$\dfrac{G(c)}{G_{TOT}}$} & \multicolumn{2}{c}{$\dfrac{\hat{G}(c)}{G_{TOT}}$} & \multicolumn{2}{c}{$\phi(c)$} \\[7pt] \toprule\\}
                %define tails
                \tabletail{ \midrule \multicolumn{8}{r}{{Continued on next column}} \\ \bottomrule\\}
                %define last tail
                \tablelasttail{\midrule\multicolumn{8}{r}{{End of Table}} \\ \bottomrule\\}
                %define caption
                \tablecaption{This is a Table with Data}
                \pgfplotstabletypeset[col sep=space,empty header,
                columns={c,G(c)GTOT,GhatGTOT,MODELPERFORM},      % display specified columns
                begin table=\begin{supertabular},
                end table=\end{supertabular},
                columns/c/.style={column type={c},dec sep align,precision=4,fixed,fixed zerofill},
                columns/G(c)GTOT/.style={column type={c},dec sep align,precision=4,fixed,fixed zerofill},
                columns/GhatGTOT/.style={column type={c},dec sep align,precision=4,fixed,fixed zerofill},
                columns/MODELPERFORM/.style={column type={c},dec sep align,precision=4,fixed,fixed zerofill},
                every head row/.append style={before row={%
                    \label{tab:DataTable}
                    }},
                ]{verylong.txt}
                \onecolumn %restores one-column output
                \end{document} 

这是我得到的输出,第 1 页:

在此处输入图片描述

第 2 页:

在此处输入图片描述

关键点

  • 替换\usepackage{longtable}\usepackage{supertabular}
  • \twocolumn在文档中提供命令,以启用双列组合
  • 在此之前\pgfplotstabletypeset你应该使用:
    • \tablefirsthead定义表格的第一个标题。
    • \tablehead定义其他标题
    • \tabletail定义表格的页脚(不是最后一个)
    • \tablelasttail定义最后一个页脚
    • \tablecaption提供表格标题。
  • \onecolumn请记住通过在表格末尾提供来切换回单列组合。

所有这些都记录在supertabular文档中

相关内容