表从第二页开始(并在底部截断)

时间:2014-12-23 09:41:49

标签: latex

我是新手,现在有一个程序生成乳胶代码,如下所示,用于编译成PDF表格。但是,编译的表从第二页开始,第一页留空,并且表的底部有一些文本重叠。有关解决这两个问题的建议吗?

\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{booktabs}
%-------------------------------------
\begin{document}    
\begin{center}
\footnotesize
\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}
\begin{tabularx} {11cm} {@{} l Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y@{}} \\
\toprule
 & \multicolumn{3}{c}{\textbf{Local Hukou}} \\
\cmidrule(l{.75em}){2-4} 
&\textbf{yes}&\textbf{No}&\textbf{Total} \\
\midrule
\textbf{Education}&&& \\
Not College graduates&1,530&759&2,289\\
College graduates&858&316&1,174\\
\textbf{Total}&2,388&1,075&3,463\\
& & &  \\
Not College graduates&66.8\%&33.2\%&100.0\% \\
College graduates&73.1\%&26.9\%&100.0\% \\
\textbf{Total}&69.0\%&31.0\%&100.0\% \\
& & &  \\
Not College graduates&64.10\%&70.60\%&66.10\% \\
College graduates&35.90\%&29.40\%&33.90\% \\
\textbf{Total}&100.0\%&100.0\%&100.0\% \\
\midrule
\textbf{Marriage}&&& \\
No&299&70&369 \\
Yes&1,975&964&2,939\\
\textbf{Total}&2,274&1,034&3,308\\
& & &  \\
No&81.0\%&19.0\%&100.0\% \\
Yes&67.2\%&32.8\%&100.0\% \\
\textbf{Total}&68.7\%&31.3\%&100.0\% \\
& & &  \\
No&13.1\%&6.8\%&11.2\% \\
Yes&86.9\%&93.2\%&88.8\% \\
\textbf{Total}&100.0\%&100.0\%&100.0\% \\

\midrule
\textbf{Employ Status}&&& \\
have a job&2,040&935&2,975\\
No job&348&140&488\\
\textbf{Total}&2,388&1,075&3,463\\
& & &  \\
have a job&68.6\%&31.4\%&100.0\% \\
No job&71.3\%&28.7\%&100.0\% \\
\textbf{Total}&69.0\%&31.0\%&100.0\% \\
& & &  \\
have a job&85.4\%&87.0\%&85.9\% \\
No job&14.6\%&13.0\%&14.1\% \\
\textbf{Total}&100.0\%&100.0\%&100.0\% \\
\midrule
\textbf{Works character}&&& \\
Not be employed&746&332&1,078 \\
Be employed&1,642&743&2,385\\
\textbf{Total}&2,388&1,075&3,463\\
& & &  \\
Not be employed&69.2\%&30.8\%&100.0\% \\
Be employed&68.8\%&31.2\%&100.0\% \\
\textbf{Total}&69.0\%&31.0\%&100.0\% \\
& & &  \\
Not be employed&31.2\%&30.9\%&31.1\% \\
Be employed&68.8\%&69.1\%&68.9\% \\
\textbf{Total}&100.0\%&100.0\%&100.0\% \\
\midrule
\textbf{Employer's character}&&& \\
other job&1,991&950&2,941\\
state sectors job&397&125&522\\
\textbf{Total}&2,388&1,075&3,463 \\
& & &  \\
other job&67.7\%&32.3\%&100.0\% \\
state sectors job&76.1\%&23.9\%&100.0\% \\
 \textbf{Total}&69.0\%&31.0\%&100.0\% \\
& & &  \\
other job&83.4\%&88.4\%&84.9\% \\
state sectors job&16.6\%&11.6\%&15.1% \\
\textbf{Total}&100.0\%&100.0\%&100.0\% \\
\bottomrule
\addlinespace[.75ex]
\end{tabularx}
\par
\scriptsize{\emph{Source: }CHFS}
\normalsize
\end{center}

\end{document}

1 个答案:

答案 0 :(得分:0)

当我浏览这个时,有一个关于跨越多个页面的tabularx个表的答案,它是\usepackage{ltablex}。然后,您的tabularx可以在表格线之间进行分页。

如果您在序言中添加此行,您会发现您的文档现在是2页,表格从第1页开始,然后转到第2页。

最后一行的问题是您错过了\

state sectors job&16.6\%&11.6\%&15.1% \\

应该是

state sectors job&16.6\%&11.6\%&15.1\% \\