答案1
看一下这个longtabu
包,这是一个例子:
\documentclass[a4paper]{article}
\usepackage{tabu}
\usepackage{longtable}
\usepackage{booktabs}
\begin{document}
\centering \footnotesize
\begin{longtabu} to \linewidth {X[l .1] X[l .5] X[c .1] X[c .1] X[c .1]}
\toprule
\rowfont[c]{\bfseries}
Number & Requirement & Relation & Value & Unit \\
\midrule
\endhead
\bottomrule
\multicolumn{5}{c}{\textsl{Continues on the next page}}
\endfoot
\bottomrule
\endlastfoot
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
1 & asdf & asdf & asdf & asdf \\
\end{longtabu}
\end{document}
答案2
使用ltablex
包装的替代方案。
如support to columns' headers formatting is used package
makecell . for more "professional" and oppen look is used
booktabs for rules in table where i suggest to replace all rules in table body with additional space provided by
\addlinespace`。
进一步关注单元格中长文本的格式化。由于它们很窄,可以通过在新列类型的定义中使用RaggedRight
包中的命令来改进它们的格式(请参阅下面的 mwe)。ragged2e
L
\documentclass[a4paper]{article}
\usepackage[margin=20mm]{geometry}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, ltablex}
\renewcommand\theadfont{\small\bfseries}
\newcolumntype{L}{>{\RaggedRight}X}
%\keepXColumns % used in cases when contents of all X columns
% are shorter than their width which you like to preserve
\usepackage{lipsum}
\begin{document}
\begingroup
\small
\sffamily
\setlength\tabcolsep{3pt}
\begin{tabularx}{\linewidth} {@{}c >{\hsize=0.7\hsize}L l l
*{3}{>{\hsize=1.1\hsize}L}
@{}}
\toprule
\thead{Number} & \thead{Risk} & \thead{Likelihood} & \thead{Severity}
& \thead{Description} & \thead{Effect on\\Project}
& \thead{Solution}\\
\midrule
\endhead
\midrule
\multicolumn{7}{r}{\textsl{Continues on the next page}}
\endfoot
\bottomrule
\endlastfoot
1 & Poor schedule ability & Low & Hight
& \lipsum*[11] & \lipsum*[11] & \lipsum*[11] \\
\addlinespace
2 & Poor ability of using software such as Matlab
& Hight & Hight
& \lipsum*[11] & \lipsum*[11] & \lipsum*[11] \\
\addlinespace
3 & Complexity underestimated
& Low & Medium
& \lipsum*[11] & \lipsum*[11] & \lipsum*[11] \\
1 & Poor schedule ability & Low & Hight
& \lipsum*[11] & \lipsum*[11] & \lipsum*[11] \\
\addlinespace
2 & Poor ability of using software such as Matlab
& Hight & Hight
& \lipsum*[11] & \lipsum*[11] & \lipsum*[11] \\
\addlinespace
3 & Complexity underestimated
& Low & Medium
& \lipsum*[11] & \lipsum*[11] & \lipsum*[11] \\
\end{tabularx}
\endgroup
\end{document}
第一页顶部:
第一页的底部和第二页的顶部: