我有一张这种格式的长表格,从第一页中间开始。但是当我填充表格时,它会移动到第二页,而不是从第一页继续。我该怎么做?
\begin{tabular}{p{0.4\linewidth}p{0.6\linewidth}}
% \toprule
\multicolumn{1}{l}{\textbf{Requirements}} &
\multicolumn{1}{l}{\textbf{My Qualifications}} \\
% \midrule
Education & 4 years experience.\\
Modeling & Have modeled.\\
% \bottomrule
\end{tabular}
答案1
如果希望表格包含分页符,请使用longtable
( \usepackage{longtable}
),然后将其替换tabular
为。另外,请注意不要让(或) 环境longtable
的宽度超出文本块的宽度。longtable
tabular
\documentclass{article}
\usepackage{longtable,calc,booktabs}
\begin{document}
\begin{longtable}{@{} p{0.4\linewidth-\tabcolsep} p{0.6\linewidth-\tabcolsep} @{}}
\toprule
\textbf{Requirements} & \textbf{My Qualifications} \\
\midrule
\endfirsthead
\bottomrule
\endlastfoot
Education & 4 years experience.\\
Modeling & Have modeled.\\
\end{longtable}
\end{document}
答案2
由于您明确希望表格能够覆盖整个行宽,因此我认为最好的办法是加载包,该包将带来以下\tablex
功能:longtable
tabularx
\documentclass{article}
\usepackage{ltablex,booktabs}
\keepXColumns
\begin{document}
\begin{tabularx}{\linewidth}{@{}>{\hsize=0.8\hsize}X>{\hsize=1.2\hsize}X}@{}}
\toprule
\textbf{Requirements} & \textbf{My Qualifications} \\
\midrule
\endfirsthead
\bottomrule
\endlastfoot
Education & 4 years experience.\\
Modeling & Have modeled.\\
\end{tabularx}
\end{document}