如何将我的表格扩展到下一页?

如何将我的表格扩展到下一页?
\documentclass[preprint,floatfix] {revtex4}
\newcommand{\rvec}{\mathrm {\mathbf {r}}}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{color, soul}
\begin{document}
\pagenumbering{gobble}
\renewcommand{\thetable}{\arabic{table}}
%\begin{center}
%\textbf{\large Supplemental Materials}
%\end{center}
\begingroup
\squeezetable
\begin{table}
\caption {\label{tab:table1} Characteristics of Sample}
\begin{ruledtabular}
\begin{tabular}{llllll}& \multicolumn{2}{c}{ Incarcerated Parent} & \multicolumn{2}{c}{Caregiver} \\
\cline{2-3} \cline{5-6}& Males & Females && Males & Females \\ \hline
Sample numbers & 28 & 10 &&2 &25 \\
Demographics \\
\hspace{2.5mm}Age & 33 & 34 &&57 &36 \\
\hspace{2.5mm}Black & 54\% & 40\% && 0\% &46\% \\
\hspace{2.5mm}White & 29\% & 60\% && 100\% & 50\% \\
\hspace{2.5mm}Single or never married & 82\% & 70\% && All Divorced & 72\% \\
\hspace{2.5mm}Family involved with CPS before 18 & 21\% & 22\% \\
Reported having problems in primary school: \\
\hspace{2.5mm}Reading & 25\% & 40\% && 0\% & 8\% \\
\hspace{2.5mm}Writing & 25\% & 20\% && 0\% & 4\% \\
\hspace{2.5mm}Math & 4\% & 30\% && 0\% & 12\% \\
Family life \\
\hspace{2.5mm}Number of children & 2.9 & 2.7 \\
\hspace{2.5mm}Number of children under 18 & 2.4 & 2.3 \\
\hspace{2.5mm}Number of children under 18 living together & 1.1 & 1.0 \\
\hspace{2.5mm}Number of children financially supporting & 2.3 & 1.9 \\
\hspace{2.5mm}Living with children under 18 before incarceration & 79\% & 80\% \\
\hspace{2.5mm}Household numbers living together & 3.5 & 4.3 && 4 & 3.8 \\
Child support \\
\hspace{2.5mm}Required to pay child support & 57\% & 20\% \\
\hspace{5.0mm}But did not pay & 25\% & 50\% \\
\hspace{5.0mm}And I paid such amount per month & \$291 & \$208 \\
\hspace{2.5mm}Whether someone else required to pay & 0\% & 30\% \\
Employment back to 6 months before incarceration \\
\hspace{2.5mm}Financial support sources: \\
\hspace{5.0mm}Jobs & 89\% & 60\% && 50\% &80\% \\
\hspace{5.0mm}Family & 21\% & 30\% && 0\% &12\% \\
\hspace{5.0mm}Friends & 4\% & 20\% && 0\% &8\%\\
\hspace{5.0mm}Government programs & 7\% & 40\% && 50\% &28\% \\
\hspace{5.0mm}Illegal income & 21\% & 30\% && 0\% &0\% \\
\hspace{2.5mm}Employed & 89\% & 40\% && 50\% &80\% \\
\hspace{5.0mm}Total work hours per week & 49.6 & 43.8 && 50.0 & 40.7 \\
\hspace{5.0mm}At least some income which came from illegal activity & 28\% & 25\% && 0\% & 0\% \\
\hspace{2.5mm}Full time & 75\% & 29\% && 50\% &80\% \\
\hspace{2.5mm}Formal pay & 68\% & 86\% && 50\% &80\% \\
\hspace{2.5mm}Regular Schedule & 75\% & 86\% && 50\% &83\% \\
\hspace{2.5mm}Monthly Income of last job & \$2,794 & \$1,665 &&\$2,000 &\$2,914 \\
Annual household income below \$25,000 & 39\% & 70\% &&50\% &30\% \\
Crime and justice involvement \\
\hspace{2.5mm}Ever arrested before 18 & 79\% & 50\% \\
\hspace{2.5mm}Ever spend time in any juvenile institution before 18 & 68\% & 50\% \\
\hspace{2.5mm}This is not first time being incarcerated & 100\% & 75\% \\
\hspace{2.5mm}Have adult family members even been incarcerated & 71\% & 63\% \\
Days per week participating in an activity with children & 5.2 & 5.9 \\
\end{tabular}
\end{ruledtabular}
\begin{tabbing}
\end{tabbing}
\end{table}
\endgroup

我还有许多台词……

答案1

与 @Mico 的回答类似,但使用了标准\hline且略有修改的列类型。与 MWE 相比,代码中的注释表明了变化:

\documentclass[preprint,floatfix] {revtex4}
\newcommand{\rvec}{\mathrm {\mathbf {r}}}
\usepackage{graphicx}
%\usepackage{subfigure}   % obsolete, use subfig or subcaption instead
\usepackage{amsmath}
\usepackage{xcolor}       % enhanced color  
\usepackage{%color,       
            soul}
\usepackage{longtable}
\usepackage{xparse}
\NewExpandableDocumentCommand\mcc{O{1}m}
    {\multicolumn{#1}{l}{#2}}


\begin{document}
\pagenumbering{gobble}
\renewcommand{\thetable}{\arabic{table}}

\begingroup
\def\hs{\hspace{2.5mm}} % shortness for horizontal spaces in table
\squeezetable
\begin{longtable}% replace table and tabular
    {l @{\qquad} p{5em}p{3.4em} c p{6em}p{4em}} % modified column types
\caption {Characteristics of Sample}
\label{tab:table1}                                      \\
    \hline
%\begin{ruledtabular}     % not used
%\begin{tabular}{llllll}  % replaced by longtable
    & \mcc[2]{Incarcerated Parent} 
                        && \mcc[2]{Caregiver}            \\
    \cline{2-3} \cline{5-6}
    & Males & Females   && Males & Females               \\    
    \hline
\endfirsthead
\caption[]{Characteristics of Sample (cont.)}           \\
    \hline
    & \mcc[2]{Incarcerated Parent}
                        && \mcc[2]{Caregiver}            \\
    \cline{2-3} \cline{5-6}
    & Males & Females   && Males & Females               \\
    \hline
\endhead
    \hline
    \mcc[4]{\scriptsize (continue on the next page)}    \\
\endfoot
    \hline
\endlastfoot
% table body
Sample numbers  & 28    & 10        && 2        & 25    \\
Demographics    &&&&&                                   \\
\hs Age         & 33    & 34        && 57       & 36    \\
\hs Black       & 54\%  & 40\%      && 0\%      & 46\%  \\
\hs White       & 29\%  & 60\%      && 100\%    & 50\%  \\
\hs Single or never married  
                & 82\%  & 70\%      && All Divorced    
                                                & 72\%  \\
\hs Family involved with CPS before 18   
                & 21\%  & 22\%      &&          &       \\
Reported having problems in primary school:  &&&&&      \\
\hs Reading     & 25\%  & 40\%      && 0\%      & 8\%   \\
\hs Writing     & 25\%  & 20\%      && 0\%      & 4\%   \\
\hs Math        & 4\%   & 30\%      && 0\%      & 12\%  \\
 Family life    &&&&&                                   \\
\hs Number of children  
                & 2.9   & 2.7       &&          &       \\
\hs Number of children under 18   
                &  2.4  & 2.3       &&          &       \\
\hs Number of children under 18 living together  
                & 1.1   & 1.0       &&          &       \\
\hs Number of children financially supporting   
                & 2.3   & 1.9       &&          &       \\
\hs Living with children under 18 before incarceration   
                & 79\%  &  80\%     &&          &       \\
\hs Household numbers living together  
                & 3.5   & 4.3       && 4        & 3.8   \\
 Child support                                  &&&&&   \\
\hs Required to pay child support   
                & 57\%   & 20\%     &&          &       \\
\hs\hs But did not pay   
                & 25\%   & 50\%     &&          &       \\

\hs\hs And I paid such amount per month  
                & \$291   & \$208   &&          &       \\
\hs Whether someone else required to pay  
                & 0\%    & 30\%     &&          &       \\
Employment back to 6 months before incarceration&&&&&   \\
\hs Financial support sources:                  &&&&&   \\
\hs\hs Jobs     & 89\%  & 60\%      && 50\%     & 80\%  \\
\hs\hs Family   & 21\%  & 30\%      && 0\%      & 12\%  \\
\hs\hs Friends  & 4\%   &  20\%     && 0\%      & 8\%   \\
\hs\hs Government programs 
                & 7\%   & 40\%      && 50\%     & 28\%  \\
\hs\hs Illegal income 
                & 21\%  & 30\%      && 0\%      & 0\%   \\
\hs Employed    & 89\%  & 40\%      && 50\%     & 80\%  \\
\hs\hs Total work hours per week  
                & 49.6  & 43.8      && 50.0     & 40.7  \\
\hs\hs At least some income which came from illegal activity  
                & 28\%  & 25\%      && 0\%      & 0\%   \\
\hs Full time   & 75\%  & 29\%      && 50\%     & 80\%  \\
\hs Formal pay  & 68\%  & 86\%      && 50\%     & 80\%  \\
\hs Regular Schedule  
                & 75\%  & 86\%      && 50\%     & 83\%      \\
\hs Monthly Income of last job  
                & \$2,794 & \$1,665 &&\$2,000   & \$2,914   \\
Annual household income below \$25,000 
                & 39\%  & 70\%      && 50\%     & 30\%  \\
Crime and justice involvement \\
\hs Ever arrested before 18 
                & 79\%  & 50\%      &&          &       \\
\hs Ever spend time in any juvenile institution before 18 
                & 68\%  & 50\%      &&          &       \\
\hs This is not first time being incarcerated 
                & 100\% & 75\%      &&          &       \\
\hs Have adult family members even been incarcerated 
                & 71\%  & 63\%      &&          &       \\
Days per week participating in an activity with children 
                & 5.2   & 5.9       &&          &       \\
\end{longtable}
\endgroup
\end{document}

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

答案2

我建议您替换table/tabular环境对。LaTeX 知道如何分页环境longtable。以下屏幕截图显示了进行此切换的结果(以及采用booktabs包的线条绘制宏而不是\hline\cline)。

在此处输入图片描述

\documentclass[preprint]{revtex4} 
\renewcommand{\thetable}{\arabic{table}}
\usepackage{longtable,booktabs}
%% Activate booktabs parameters (see https://tex.stackexchange.com/a/222700/5001):
\AtBeginDocument{% 
    \heavyrulewidth=.08em
    \lightrulewidth=.05em
    \cmidrulewidth=.03em
    \belowrulesep=.65ex
    \belowbottomsep=0pt
    \aboverulesep=.4ex
    \abovetopsep=0pt
    \cmidrulesep=\doublerulesep
    \cmidrulekern=.5em
    \defaultaddspace=.5em
}

\begin{document}
\pagenumbering{gobble}

\begin{longtable}{@{}lcccc@{}}
\caption{Characteristics of Sample} \label{tab:table1}  \\
\toprule
& \multicolumn{2}{c}{Incarcerated Parent} 
& \multicolumn{2}{c@{}}{Caregiver} \\ 
\cmidrule(lr){2-3} \cmidrule(l){4-5} 
& Males & Females & Males & Females \\    
\midrule
\endfirsthead

\multicolumn{5}{@{}l}{Table \ref{tab:table1}, cont'd from previous page}\\
\addlinespace
\toprule
& \multicolumn{2}{c}{Incarcerated Parent} 
& \multicolumn{2}{c@{}}{Caregiver} \\ 
\cmidrule(lr){2-3} \cmidrule(l){4-5} 
& Males & Females & Males & Females \\    
\midrule
\endhead


\midrule
\multicolumn{5}{r@{}}{\footnotesize\em Cont'd on next page}
\endfoot

\bottomrule
\endlastfoot

Sample numbers & 28 & 10 & 2 &25 \\   
Demographics \\
\quad Age   &    33 &   34 & 57  &36 \\         
\quad Black &  54\% & 40\% & 0\% &46\% \\
\quad White &  29\% & 60\% & 100\% & 50\%\\
\quad Single or never married  &  82\%  & 70\% & All Div.    & 72\% \\    
\quad Family involved with CPS before 18 & 21\% & 22\% \\
Reported having problems in primary school \\
\quad Reading   & 25\% & 40\% & 0\% & 8\% \\
\quad Writing   & 25\% & 20\% & 0\% & 4\% \\
\quad Math      & 4\%  & 30\% & 0\% & 12\% \\
Family life \\
\quad Number of children            & 2.9 & 2.7\\
\quad Number of children under 18   & 2.4 & 2.3\\
\quad Number of children under 18 living together & 1.1 & 1.0 \\
\quad Number of children financially supporting   & 2.3 & 1.9 \\
\quad Living with children under 18 before incarceration & 79\%  & 80\% \\
\quad Household numbers living together & 3.5 & 4.3\\
Child support \\ 
\quad Required to pay child support  & 57\% & 20\% \\
\qquad But did not pay            & 25\%   & 50\% \\
\qquad And I paid such amount per month & \$291 & \$208 \\ 
\quad Whether someone else required to pay  & 0\%  & 30\% \\
Employment back to 6 months before incarceration \\
\quad Financial support sources: \\
\qquad  Jobs & 89\% & 60\% & 50\% &80\% \\ 
\qquad  Family & 21\% & 30\% & 0\% &12\% \\
\qquad  Friends & 4\% &  20\% & 0\% &8\%\\
\qquad  Government programs & 7\% & 40\% & 50\% &28\% \\
\qquad  Illegal income & 21\% & 30\% & 0\% &0\% \\
\quad Employed  & 89\% & 40\% & 50\% &80\%  \\
\qquad Total work hours per week  & 49.6 & 43.8 & 50.0 & 40.7 \\ 
\qquad At least some income which came from illegal activity  & 28\%  & 25\% & 0\%  & 0\% \\ 
\quad Full time  & 75\% & 29\% & 50\% &80\%      \\
\quad Formal pay  & 68\% & 86\% & 50\% &80\%      \\
\quad Regular Schedule  & 75\% & 86\% & 50\% &83\%     \\
\quad Monthly Income of last job  & \$2,794 & \$1,665 & \$2,000 &\$2,914  \\
Annual household income below \$25,000 & 39\% & 70\% & 50\% &30\%  \\
Crime and justice involvement \\
\quad Ever arrested before 18 & 79\% & 50\% \\ 
\quad Ever spend time in any juvenile institution before 18 & 68\% & 50\% \\
\quad This is not first time being incarcerated & 100\% & 75\% \\ 
\quad Have adult family members even been incarcerated & 71\% & 63\% \\  
Days per week participating in an activity with children & 5.2 & 5.9 \\  
\end{longtable}

\end{document}

相关内容