4
\documentclass[12pt,a4paper]{article}

\usepackage{amsmath}

\usepackage{xtab}       % table page breaks
\usepackage{array}      % for advanced column specification: use >{\command} for
                        % commands executed right before each column element
                        % and <{\command} for commands to be executed right after
                        % each column element

\usepackage{booktabs} % toprule, bottomrule, midrule


\begin{document}


\renewcommand{\arraystretch}{1.5}
\begin{xtabular}{>{$}l<{$} c c}

    \toprule
    \text{Model} & \text{AIC (logistic link)} & \text{AIC (linear link)} \\
    \midrule
        \{ \phi(\cdot)  ,  p(\cdot) \}         & 986   & 986 \\
        \{ \phi(\cdot)  ,  p(t) \}             & 993   & 993 \\
        \{ \phi(\cdot)  ,  p(h_2) \}           & 961   & 959 \\
        \{ \phi(\cdot)  ,  p(h_3) \}           & 948   & 948 \\
        \{ \phi(\cdot)  ,  p(h_4) \}           & 952   & 952 \\
        \{ \phi(\cdot)  ,  p(t+h_2) \}         & 969   & 977 \\
        \{ \phi(\cdot)  ,  p(t+h_3) \}         & 949   & 981 \\
        \{ \phi(\cdot)  ,  p(t+h_4) \}         & 953   & 999 \\
        \{ \phi(\cdot)  ,  p(t \times h_2) \}  & 970   & 1032 \\
        \{ \phi(\cdot)  ,  p(t \times h_3) \}  & 979   & 1131 \\
        \{ \phi(\cdot)  ,  p(t \times h_4) \}  & 993   & 1124 \\
        \{ \phi(t)  ,  p(\cdot) \}  &       & 994 \\
        \{ \phi(t)  ,  p(t) \}      &       & 996 \\
        \{ \phi(t)  ,  p(h_2) \}    & 963   & 963 \\
        \{ \phi(t)  ,  p(h_3) \}    & 952   & 952 \\
        \{ \phi(t)  ,  p(h_4) \}    & 956   & 956 \\
        \{ \phi(t)  ,  p(t+h_2) \}  & 973   & 976 \\
        \{ \phi(t)  ,  p(t+h_3) \}  & 954   & 968 \\
        \{ \phi(t)  ,  p(t+h_4) \}  & 958   & 975 \\
        \{ \phi(t)  ,  p(t \times h_2) \}  &       & 1018 \\
        \{ \phi(t)  ,  p(t \times h_3) \}  & 976   & 1165 \\
        \{ \phi(t)  ,  p(t \times h_4) \}  & 999   & 1167 \\
        \{ \phi(h_2)  ,  p(\cdot) \}  & 968   & 968 \\
        \{ \phi(h_3)  ,  p(\cdot) \}  & 972   & 972 \\
        \{ \phi(h_4)  ,  p(\cdot) \}  & 976   & 976 \\
        \{ \phi(h_2)  ,  p(t) \}      &       & 971 \\
        \{ \phi(h_3)  ,  p(t) \}      & 975   & 1055 \\
        \{ \phi(h_4)  ,  p(t) \}      & 979   & 979 \\
        \{ [\phi(h)  ,  p(h)]_2 \}           & 970   & 959 \\
        \{ [\phi(h)  ,  p(h)]_3 \}           & 951   & 951 \\
        \{ [\phi(h)  ,  p(h)]_4 \}           & 957   & 957 \\
        \{ [\phi(h)  ,  p(t+h)]_2 \}         & 967   & 972 \\
        \{ [\phi(h)  ,  p(t+h)]_3 \}         & 957   & 969 \\
        \{ [\phi(h)  ,  p(t+h)]_4 \}         & 959   & 976 \\
        \{ [\phi(h)  ,  p(t \times h)]_2 \}  & 987   & 993 \\
        \{ [\phi(h)  ,  p(t \times h)]_3 \}  & 978   & 1047 \\
        \{ [\phi(h)  ,  p(t \times h)]_4 \}  & 993   & 1063 \\
        \{ \phi(t+h_2)  ,  p(\cdot) \}       & 982   & 987 \\
        \{ \phi(t+h_3)  ,  p(\cdot) \}       & 977   & 983 \\
        \{ \phi(t+h_4)  ,  p(\cdot) \}       &       & 987 \\
        \{ \phi(t+h_2)  ,  p(t) \}           & 977   & 982 \\
        \{ \phi(t+h_3)  ,  p(t) \}           & 980   & 987 \\
        \{ \phi(t+h_4)  ,  p(t) \}           & 985   & 992 \\
        \{ [\phi(t+h)  ,  p(h)]_2 \}            & 965   & 967 \\
        \{ [\phi(t+h)  ,  p(h)]_3 \}            & 956   & 959 \\
        \{ [\phi(t+h)  ,  p(h)]_4 \}            & 962   & 966 \\
        \{ [\phi(t+h)  ,  p(t+h)]_2 \}          & 965   & 984 \\
        \{ [\phi(t+h)  ,  p(t+h)]_3 \}          & 959   & 1000 \\
        \{ [\phi(t+h)  ,  p(t+h)]_4 \}          & 965   & 1009 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_2 \}   & 981   & 1043 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_3 \}   & 987   & 1185 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_4 \}   & 994   & 1080 \\
        \{ \phi(t \times h_2)  ,   p(\cdot) \}  & 978   & 991 \\
        \{ \phi(t \times h_3)  ,   p(\cdot) \}  & 993   & 1045 \\
        \{ \phi(t \times h_4)  ,   p(\cdot) \}  & 1012  & 1023 \\
        \{ [\phi(t \times h)  ,   p(h)]_2 \}    & 970   & 974 \\
        \{ [\phi(t \times h)  ,   p(h)]_3 \}    & 1000  & 990 \\
        \{ [\phi(t \times h)  ,   p(h)]_4 \}    & 1003  & 1000 \\
    \bottomrule
    \topcaption{AIC values}

\end{xtabular}


\end{document}

If you look at the output on page 2 and 3, the column width are smaller than its on page 1. I mean the talbes on page 2 and 3 are treated as if they are separate ones with its "heading".

Is there a way to improve this?

And why it breaks at those points? It is apparent we are fit more rows onto the first and second pages.

And where is the topcaption????

Thanks!

2 Answers2

4

For this longtable is enough.

\documentclass[12pt,a4paper]{article}
\usepackage[showframe]{geometry}
\usepackage{amsmath}

\usepackage{longtable}       % table page breaks
\usepackage{array}      % for advanced column specification: use >{\command} for
                        % commands executed right before each column element
                        % and <{\command} for commands to be executed right after
                        % each column element

\usepackage{booktabs} % toprule, bottomrule, midrule


\begin{document}


\renewcommand{\arraystretch}{1.5}

\begin{longtable}{>{$}l<{$} c c}
  \caption{AIC values}
\\\toprule \text{Model} & \text{AIC (logistic link)} & \text{AIC (linear link)} \\
    \midrule
    \endfirsthead
\\\toprule \text{Model} & \text{AIC (logistic link)} & \text{AIC (linear link)} \\
    \midrule
    \endhead
\midrule\multicolumn{3}{r}{{Continued on next page}} \\ \bottomrule
\endfoot
\bottomrule
\endlastfoot
        \{ \phi(\cdot)  ,  p(\cdot) \}         & 986   & 986 \\
        \{ \phi(\cdot)  ,  p(t) \}             & 993   & 993 \\
        \{ \phi(\cdot)  ,  p(h_2) \}           & 961   & 959 \\
        \{ \phi(\cdot)  ,  p(h_3) \}           & 948   & 948 \\
        \{ \phi(\cdot)  ,  p(h_4) \}           & 952   & 952 \\
        \{ \phi(\cdot)  ,  p(t+h_2) \}         & 969   & 977 \\
        \{ \phi(\cdot)  ,  p(t+h_3) \}         & 949   & 981 \\
        \{ \phi(\cdot)  ,  p(t+h_4) \}         & 953   & 999 \\
        \{ \phi(\cdot)  ,  p(t \times h_2) \}  & 970   & 1032 \\
        \{ \phi(\cdot)  ,  p(t \times h_3) \}  & 979   & 1131 \\
        \{ \phi(\cdot)  ,  p(t \times h_4) \}  & 993   & 1124 \\
        \{ \phi(t)  ,  p(\cdot) \}  &       & 994 \\
        \{ \phi(t)  ,  p(t) \}      &       & 996 \\
        \{ \phi(t)  ,  p(h_2) \}    & 963   & 963 \\
        \{ \phi(t)  ,  p(h_3) \}    & 952   & 952 \\
        \{ \phi(t)  ,  p(h_4) \}    & 956   & 956 \\
        \{ \phi(t)  ,  p(t+h_2) \}  & 973   & 976 \\
        \{ \phi(t)  ,  p(t+h_3) \}  & 954   & 968 \\
        \{ \phi(t)  ,  p(t+h_4) \}  & 958   & 975 \\
        \{ \phi(t)  ,  p(t \times h_2) \}  &       & 1018 \\
        \{ \phi(t)  ,  p(t \times h_3) \}  & 976   & 1165 \\
        \{ \phi(t)  ,  p(t \times h_4) \}  & 999   & 1167 \\
        \{ \phi(h_2)  ,  p(\cdot) \}  & 968   & 968 \\
        \{ \phi(h_3)  ,  p(\cdot) \}  & 972   & 972 \\
        \{ \phi(h_4)  ,  p(\cdot) \}  & 976   & 976 \\
        \{ \phi(h_2)  ,  p(t) \}      &       & 971 \\
        \{ \phi(h_3)  ,  p(t) \}      & 975   & 1055 \\
        \{ \phi(h_4)  ,  p(t) \}      & 979   & 979 \\
        \{ [\phi(h)  ,  p(h)]_2 \}           & 970   & 959 \\
        \{ [\phi(h)  ,  p(h)]_3 \}           & 951   & 951 \\
        \{ [\phi(h)  ,  p(h)]_4 \}           & 957   & 957 \\
        \{ [\phi(h)  ,  p(t+h)]_2 \}         & 967   & 972 \\
        \{ [\phi(h)  ,  p(t+h)]_3 \}         & 957   & 969 \\
        \{ [\phi(h)  ,  p(t+h)]_4 \}         & 959   & 976 \\
        \{ [\phi(h)  ,  p(t \times h)]_2 \}  & 987   & 993 \\
        \{ [\phi(h)  ,  p(t \times h)]_3 \}  & 978   & 1047 \\
        \{ [\phi(h)  ,  p(t \times h)]_4 \}  & 993   & 1063 \\
        \{ \phi(t+h_2)  ,  p(\cdot) \}       & 982   & 987 \\
        \{ \phi(t+h_3)  ,  p(\cdot) \}       & 977   & 983 \\
        \{ \phi(t+h_4)  ,  p(\cdot) \}       &       & 987 \\
        \{ \phi(t+h_2)  ,  p(t) \}           & 977   & 982 \\
        \{ \phi(t+h_3)  ,  p(t) \}           & 980   & 987 \\
        \{ \phi(t+h_4)  ,  p(t) \}           & 985   & 992 \\
        \{ [\phi(t+h)  ,  p(h)]_2 \}            & 965   & 967 \\
        \{ [\phi(t+h)  ,  p(h)]_3 \}            & 956   & 959 \\
        \{ [\phi(t+h)  ,  p(h)]_4 \}            & 962   & 966 \\
        \{ [\phi(t+h)  ,  p(t+h)]_2 \}          & 965   & 984 \\
        \{ [\phi(t+h)  ,  p(t+h)]_3 \}          & 959   & 1000 \\
        \{ [\phi(t+h)  ,  p(t+h)]_4 \}          & 965   & 1009 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_2 \}   & 981   & 1043 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_3 \}   & 987   & 1185 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_4 \}   & 994   & 1080 \\
        \{ \phi(t \times h_2)  ,   p(\cdot) \}  & 978   & 991 \\
        \{ \phi(t \times h_3)  ,   p(\cdot) \}  & 993   & 1045 \\
        \{ \phi(t \times h_4)  ,   p(\cdot) \}  & 1012  & 1023 \\
        \{ [\phi(t \times h)  ,   p(h)]_2 \}    & 970   & 974 \\
        \{ [\phi(t \times h)  ,   p(h)]_3 \}    & 1000  & 990 \\
        \{ [\phi(t \times h)  ,   p(h)]_4 \}    & 1003  & 1000 \\
    %\bottomrule
\end{longtable}


\end{document}

enter image description here

In your example, since you used the l and c specifiers, the columns width are adjusted to the width of widest entries. In first page you have broad headers whereas in second and third pages no headers, so they are narrower. I have added headers in them too.

  • If I change \begin{xtabular}{>{$}l<{$} c c} to \begin{xtabular}{>{$}l<{$} |c| c}, I noticed that the vertical line actually goes above the first row (outside the table). That looks like a problem. But using xtabs (see below) works without any problem. – Chen Stats Yu Aug 03 '14 at 05:54
  • \endfirsthead % \ will actually solve the problem I commented above. Everything is now perfect! So both longtable and xtab can be used for my purpose. – Chen Stats Yu Aug 03 '14 at 05:58
2

The xtabular environment overestimates each line, by adding at least 10% more space to its computation than a normal line. This is in an attempt to compensate for higher rows.

When it has decided that a new chunk must be produced, xtabular closes a table and opens a new one, so the column widths from the previous chunk are not preserved. This is a feature of the package.

The first problem, that is, leaving unoccupied space at the bottom of the page, can be cured by using \xentrystretch; the second one, lest of specifying only fixed width columns, is not solvable.

The \topcaption should be typed before the table.

\documentclass[12pt,a4paper]{article}

\usepackage{showframe} % to show a page frame
\usepackage{amsmath}
\usepackage{xtab}
\usepackage{array}
\usepackage{booktabs}
\usepackage{caption} % better caption spacing

\begin{document}

\begin{center}
\renewcommand{\arraystretch}{1.5}
\xentrystretch{-0.1} % reduce the overshoot

\topcaption{AIC values}

\begin{xtabular}{>{$}l<{$} c c}

    \toprule
    \text{Model} & \text{AIC (logistic link)} & \text{AIC (linear link)} \\
    \midrule
        \{ \phi(\cdot)  ,  p(\cdot) \}         & 986   & 986 \\
        \{ \phi(\cdot)  ,  p(t) \}             & 993   & 993 \\
        \{ \phi(\cdot)  ,  p(h_2) \}           & 961   & 959 \\
        \{ \phi(\cdot)  ,  p(h_3) \}           & 948   & 948 \\
        \{ \phi(\cdot)  ,  p(h_4) \}           & 952   & 952 \\
        \{ \phi(\cdot)  ,  p(t+h_2) \}         & 969   & 977 \\
        \{ \phi(\cdot)  ,  p(t+h_3) \}         & 949   & 981 \\
        \{ \phi(\cdot)  ,  p(t+h_4) \}         & 953   & 999 \\
        \{ \phi(\cdot)  ,  p(t \times h_2) \}  & 970   & 1032 \\
        \{ \phi(\cdot)  ,  p(t \times h_3) \}  & 979   & 1131 \\
        \{ \phi(\cdot)  ,  p(t \times h_4) \}  & 993   & 1124 \\
        \{ \phi(t)  ,  p(\cdot) \}  &       & 994 \\
        \{ \phi(t)  ,  p(t) \}      &       & 996 \\
        \{ \phi(t)  ,  p(h_2) \}    & 963   & 963 \\
        \{ \phi(t)  ,  p(h_3) \}    & 952   & 952 \\
        \{ \phi(t)  ,  p(h_4) \}    & 956   & 956 \\
        \{ \phi(t)  ,  p(t+h_2) \}  & 973   & 976 \\
        \{ \phi(t)  ,  p(t+h_3) \}  & 954   & 968 \\
        \{ \phi(t)  ,  p(t+h_4) \}  & 958   & 975 \\
        \{ \phi(t)  ,  p(t \times h_2) \}  &       & 1018 \\
        \{ \phi(t)  ,  p(t \times h_3) \}  & 976   & 1165 \\
        \{ \phi(t)  ,  p(t \times h_4) \}  & 999   & 1167 \\
        \{ \phi(h_2)  ,  p(\cdot) \}  & 968   & 968 \\
        \{ \phi(h_3)  ,  p(\cdot) \}  & 972   & 972 \\
        \{ \phi(h_4)  ,  p(\cdot) \}  & 976   & 976 \\
        \{ \phi(h_2)  ,  p(t) \}      &       & 971 \\
        \{ \phi(h_3)  ,  p(t) \}      & 975   & 1055 \\
        \{ \phi(h_4)  ,  p(t) \}      & 979   & 979 \\
        \{ [\phi(h)  ,  p(h)]_2 \}           & 970   & 959 \\
        \{ [\phi(h)  ,  p(h)]_3 \}           & 951   & 951 \\
        \{ [\phi(h)  ,  p(h)]_4 \}           & 957   & 957 \\
        \{ [\phi(h)  ,  p(t+h)]_2 \}         & 967   & 972 \\
        \{ [\phi(h)  ,  p(t+h)]_3 \}         & 957   & 969 \\
        \{ [\phi(h)  ,  p(t+h)]_4 \}         & 959   & 976 \\
        \{ [\phi(h)  ,  p(t \times h)]_2 \}  & 987   & 993 \\
        \{ [\phi(h)  ,  p(t \times h)]_3 \}  & 978   & 1047 \\
        \{ [\phi(h)  ,  p(t \times h)]_4 \}  & 993   & 1063 \\
        \{ \phi(t+h_2)  ,  p(\cdot) \}       & 982   & 987 \\
        \{ \phi(t+h_3)  ,  p(\cdot) \}       & 977   & 983 \\
        \{ \phi(t+h_4)  ,  p(\cdot) \}       &       & 987 \\
        \{ \phi(t+h_2)  ,  p(t) \}           & 977   & 982 \\
        \{ \phi(t+h_3)  ,  p(t) \}           & 980   & 987 \\
        \{ \phi(t+h_4)  ,  p(t) \}           & 985   & 992 \\
        \{ [\phi(t+h)  ,  p(h)]_2 \}            & 965   & 967 \\
        \{ [\phi(t+h)  ,  p(h)]_3 \}            & 956   & 959 \\
        \{ [\phi(t+h)  ,  p(h)]_4 \}            & 962   & 966 \\
        \{ [\phi(t+h)  ,  p(t+h)]_2 \}          & 965   & 984 \\
        \{ [\phi(t+h)  ,  p(t+h)]_3 \}          & 959   & 1000 \\
        \{ [\phi(t+h)  ,  p(t+h)]_4 \}          & 965   & 1009 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_2 \}   & 981   & 1043 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_3 \}   & 987   & 1185 \\
        \{ [\phi(t+h)  ,  p(t \times h)]_4 \}   & 994   & 1080 \\
        \{ \phi(t \times h_2)  ,   p(\cdot) \}  & 978   & 991 \\
        \{ \phi(t \times h_3)  ,   p(\cdot) \}  & 993   & 1045 \\
        \{ \phi(t \times h_4)  ,   p(\cdot) \}  & 1012  & 1023 \\
        \{ [\phi(t \times h)  ,   p(h)]_2 \}    & 970   & 974 \\
        \{ [\phi(t \times h)  ,   p(h)]_3 \}    & 1000  & 990 \\
        \{ [\phi(t \times h)  ,   p(h)]_4 \}    & 1003  & 1000 \\
    \bottomrule

\end{xtabular}

\end{center}

\end{document}

enter image description here

A more complete example, where the different column widths are somewhat masked by repeating the header (one could also add a phantom width based on the widest entry in the first column).

\documentclass[12pt,a4paper]{article}
\usepackage{showframe}
\usepackage{amsmath}
\usepackage{xtab}
\usepackage{array}
\usepackage{booktabs,caption}


\begin{document}


\begin{center}
\renewcommand{\arraystretch}{1.5}
\xentrystretch{-0.12}

\topcaption{AIC values}
\tablehead{%
  \toprule
  \text{Model} & \text{AIC (logistic link)} & \text{AIC (linear link)} \\
  \midrule
}
\tabletail{%
  \midrule[\heavyrulewidth]
  \multicolumn{3}{r}{\footnotesize\itshape Continues}\\
}
\tablelasttail{\bottomrule}

\begin{xtabular}{>{$}l<{$} c c}

\{ \phi(\cdot),p(\cdot) \}         & 986   & 986 \\
\{ \phi(\cdot),p(t) \}             & 993   & 993 \\
\{ \phi(\cdot),p(h_2) \}           & 961   & 959 \\
\{ \phi(\cdot),p(h_3) \}           & 948   & 948 \\
\{ \phi(\cdot),p(h_4) \}           & 952   & 952 \\
\{ \phi(\cdot),p(t+h_2) \}         & 969   & 977 \\
\{ \phi(\cdot),p(t+h_3) \}         & 949   & 981 \\
\{ \phi(\cdot),p(t+h_4) \}         & 953   & 999 \\
\{ \phi(\cdot),p(t \times h_2) \}  & 970   & 1032 \\
\{ \phi(\cdot),p(t \times h_3) \}  & 979   & 1131 \\
\{ \phi(\cdot),p(t \times h_4) \}  & 993   & 1124 \\
\{ \phi(t),p(\cdot) \}             &       & 994 \\
\{ \phi(t),p(t) \}                 &       & 996 \\
\{ \phi(t),p(h_2) \}               & 963   & 963 \\
\{ \phi(t),p(h_3) \}               & 952   & 952 \\
\{ \phi(t),p(h_4) \}               & 956   & 956 \\
\{ \phi(t),p(t+h_2) \}             & 973   & 976 \\
\{ \phi(t),p(t+h_3) \}             & 954   & 968 \\
\{ \phi(t),p(t+h_4) \}             & 958   & 975 \\
\{ \phi(t),p(t \times h_2) \}      &       & 1018 \\
\{ \phi(t),p(t \times h_3) \}      & 976   & 1165 \\
\{ \phi(t),p(t \times h_4) \}      & 999   & 1167 \\
\{ \phi(h_2),p(\cdot) \}           & 968   & 968 \\
\{ \phi(h_3),p(\cdot) \}           & 972   & 972 \\
\{ \phi(h_4),p(\cdot) \}           & 976   & 976 \\
\{ \phi(h_2),p(t) \}               &       & 971 \\
\{ \phi(h_3),p(t) \}               & 975   & 1055 \\
\{ \phi(h_4),p(t) \}               & 979   & 979 \\
\{ [\phi(h),p(h)]_2 \}             & 970   & 959 \\
\{ [\phi(h),p(h)]_3 \}             & 951   & 951 \\
\{ [\phi(h),p(h)]_4 \}             & 957   & 957 \\
\{ [\phi(h),p(t+h)]_2 \}           & 967   & 972 \\
\{ [\phi(h),p(t+h)]_3 \}           & 957   & 969 \\
\{ [\phi(h),p(t+h)]_4 \}           & 959   & 976 \\
\{ [\phi(h),p(t \times h)]_2 \}    & 987   & 993 \\
\{ [\phi(h),p(t \times h)]_3 \}    & 978   & 1047 \\
\{ [\phi(h),p(t \times h)]_4 \}    & 993   & 1063 \\
\{ \phi(t+h_2),p(\cdot) \}         & 982   & 987 \\
\{ \phi(t+h_3),p(\cdot) \}         & 977   & 983 \\
\{ \phi(t+h_4),p(\cdot) \}         &       & 987 \\
\{ \phi(t+h_2),p(t) \}             & 977   & 982 \\
\{ \phi(t+h_3),p(t) \}             & 980   & 987 \\
\{ \phi(t+h_4),p(t) \}             & 985   & 992 \\
\{ [\phi(t+h),p(h)]_2 \}           & 965   & 967 \\
\{ [\phi(t+h),p(h)]_3 \}           & 956   & 959 \\
\{ [\phi(t+h),p(h)]_4 \}           & 962   & 966 \\
\{ [\phi(t+h),p(t+h)]_2 \}         & 965   & 984 \\
\{ [\phi(t+h),p(t+h)]_3 \}         & 959   & 1000 \\
\{ [\phi(t+h),p(t+h)]_4 \}         & 965   & 1009 \\
\{ [\phi(t+h),p(t \times h)]_2 \}  & 981   & 1043 \\
\{ [\phi(t+h),p(t \times h)]_3 \}  & 987   & 1185 \\
\{ [\phi(t+h),p(t \times h)]_4 \}  & 994   & 1080 \\
\{ \phi(t \times h_2),p(\cdot) \}  & 978   & 991 \\
\{ \phi(t \times h_3),p(\cdot) \}  & 993   & 1045 \\
\{ \phi(t \times h_4), p(\cdot) \  & 1012  & 1023 \\
\{ [\phi(t \times h), p(h)]_2 \}   & 970   & 974 \\
\{ [\phi(t \times h), p(h)]_3 \}   & 1000  & 990 \\
\{ [\phi(t \times h), p(h)]_4 \}   & 1003  & 1000 \\

\end{xtabular}

\end{center}

\end{document}

enter image description here

Still unsatisfying, with respect to longtable.

egreg
  • 1,121,712
  • Thanks! I tried longtable but i got an error. But now it's working. And your solution is good enough as well. – Chen Stats Yu Aug 02 '14 at 16:14
  • @ChenStatsYu I added my answer just to provide some hints on how to improve xtab output, but I recommend longtable. – egreg Aug 02 '14 at 16:52
  • Thanks, egreg. I noticed that xtab has no problem changing the table from "c c" to "c|c" , but longtable can't. the vertical line actually goes outside the first row. I tried it with the longtable answer given above. – Chen Stats Yu Aug 03 '14 at 05:51