我无法将表格保留在页面上,不知道如何修复。希望得到帮助。
这是我的表格:
\begin{landscape}
\begin{tabular}{|c|c|c|c|c|c|c|}
\multicolumn{7}{c}{\textbf{Data from testing}}\\
\hline
\multicolumn{2}{|c|}{Population information}&\multicolumn{3}{c|}{Anaerobic power data}&\multicolumn{2}{c|}{Anaerobic endurance data}\\
\hline
\multirow{2}{*}{Participant number, age, and weight}&\multirow{2}{*}{Status}&\multicolumn{2}{c|}{Power clean}&\multirow{2}{*}{Broad jump (m)}&\multirow{2}{*}{500m row (minutes:seconds)}&Air bike 50 cal (seconds)\\
\cline{3-4}
&&kg&\%bw&&&\\
\hline
\multicolumn{7}{|c|}{Trained sprinter}\\
\hline
1. Male, 24, 72 kg.&National level sprinter - 100m&130&1.8&2.1&1:34&7\\
\hline
2. Male, 22, 75 kg.&National level sprinter - 200m&105&1.4&2.2&1:32&7\\
\hline
3. Male, 25, 78 kg.&National level sprinter - 400m&90&1.2&1.9&1:2&7\\
\hline
4. Male, 24, 74 kg.&Recreational sprinter&85&1.1&1.7&1:38&7\\
\hline
5. Male, 23, 68 kg.&Recreational sprinter&70&1.0&1.9&1:41&7\\
\hline
\multicolumn{7}{|c|}{Untrained sprinter}\\
\hline
6. Female, 27, 47 kg.&Recreational Olympic weightlifter&50&1.1&1.6&6&7\\
\hline
7. Male, 25, 82 kg.&Recreational jogging and gym&55&0.67&1.7&6&7\\
\hline
8. Male, 32, 77 kg.&Daily walks&35&0.45&1.3&6&7\\
\hline
9. Male, 26, 86 kg.&Inactive&30&0.35&1.2&6&7\\
\hline
10. Female, 33, 74 kg.&Inactive&20 (empty bar)&0.27&0.7&6&7\\
\hline
\hline
\multicolumn{7}{|c|}{Statistical values - trained}\\
\hline
mean&2&3&4&5&6&7\\
\hline
standard deviation&2&3&4&5&6&7\\
\hline
\end{tabular}
答案1
您可以使用p
-type columns(或X
-type 和 tabularx)。或者只是将长单元格内容拆分成多行。此外,我建议使用 来booktabs
美化您的表格;使用 caption 添加标题。
\documentclass{report}
\usepackage{multirow}
\usepackage{pdflscape}
\usepackage{booktabs}
\begin{document}
\begin{landscape}
\begin{tabular}{|c|c|c|c|c|c|c|}
\multicolumn{7}{c}{\textbf{Data from testing}}\\
\hline
\multicolumn{2}{|c|}{Population information}&\multicolumn{3}{c|}{Anaerobic power data}&\multicolumn{2}{c|}{Anaerobic endurance data}\\
\hline
% \multirow{2}{*}{Participant number, age, and weight}&\multirow{2}{*}{Status}&\multicolumn{2}{c|}{Power clean}&\multirow{2}{*}{Broad jump (m)}&\multicolumn{1}{m{2cm}|}{{500m row\par(minutes:seconds)}}&Air bike 50 cal (seconds)\\
Participant number&\multirow{2}{*}{Status}&\multicolumn{2}{c|}{Power clean}&Broad jump&500m row&Air bike 50 cal \\
\cline{3-4}
age, and weight&&kg&\%bw&(m)&(minutes:seconds)&(seconds)\\
\hline
\multicolumn{7}{|c|}{Trained sprinter}\\
\hline
1. Male, 24, 72 kg.&National level sprinter - 100m&130&1.8&2.1&1:34&7\\
\hline
2. Male, 22, 75 kg.&National level sprinter - 200m&105&1.4&2.2&1:32&7\\
\hline
3. Male, 25, 78 kg.&National level sprinter - 400m&90&1.2&1.9&1:2&7\\
\hline
4. Male, 24, 74 kg.&Recreational sprinter&85&1.1&1.7&1:38&7\\
\hline
5. Male, 23, 68 kg.&Recreational sprinter&70&1.0&1.9&1:41&7\\
\hline
\multicolumn{7}{|c|}{Untrained sprinter}\\
\hline
6. Female, 27, 47 kg.&Recreational Olympic weightlifter&50&1.1&1.6&6&7\\
\hline
7. Male, 25, 82 kg.&Recreational jogging and gym&55&0.67&1.7&6&7\\
\hline
8. Male, 32, 77 kg.&Daily walks&35&0.45&1.3&6&7\\
\hline
9. Male, 26, 86 kg.&Inactive&30&0.35&1.2&6&7\\
\hline
10. Female, 33, 74 kg.&Inactive&20 (empty bar)&0.27&0.7&6&7\\
\hline
\hline
\multicolumn{7}{|c|}{Statistical values - trained}\\
\hline
mean&2&3&4&5&6&7\\
\hline
standard deviation&2&3&4&5&6&7\\
\hline
\end{tabular}
\end{landscape}
\begin{landscape}
\begin{table}
\caption{Data from testing}
\begin{tabular}{@{}*{7}{c}@{}}
\toprule
\multicolumn{2}{c}{Population information} & \multicolumn{3}{c}{Anaerobic power data} & \multicolumn{2}{c}{Anaerobic endurance data}\\
Participant number&\multirow{2}{*}{Status}&\multicolumn{2}{c}{Power clean}&Broad jump&500m row&Air bike 50 cal \\
% \cline{3-4}
age, and weight&&kg&\%bw&(m)&(minutes:seconds)&(seconds)\\
\midrule
\multicolumn{7}{c}{Trained sprinter}\\
1. Male, 24, 72 kg.&National level sprinter - 100m&130&1.8&2.1&1:34&7\\
2. Male, 22, 75 kg.&National level sprinter - 200m&105&1.4&2.2&1:32&7\\
3. Male, 25, 78 kg.&National level sprinter - 400m&90&1.2&1.9&1:2&7\\
4. Male, 24, 74 kg.&Recreational sprinter&85&1.1&1.7&1:38&7\\
5. Male, 23, 68 kg.&Recreational sprinter&70&1.0&1.9&1:41&7\\
\midrule
\multicolumn{7}{c}{Untrained sprinter}\\
6. Female, 27, 47 kg.&Recreational Olympic weightlifter&50&1.1&1.6&6&7\\
7. Male, 25, 82 kg.&Recreational jogging and gym&55&0.67&1.7&6&7\\
8. Male, 32, 77 kg.&Daily walks&35&0.45&1.3&6&7\\
9. Male, 26, 86 kg.&Inactive&30&0.35&1.2&6&7\\
10. Female, 33, 74 kg.&Inactive&20 (empty bar)&0.27&0.7&6&7\\
\midrule
\multicolumn{7}{c}{Statistical values - trained}\\
mean&2&3&4&5&6&7\\
standard deviation&2&3&4&5&6&7\\
\bottomrule
\end{tabular}
\end{table}
\end{landscape}
\end{document}
答案2
我建议使用makecell
&geometry
包(如果不使用边注,后者的边距会更合适)。我使用以下包对表格中的垂直间距进行了一些改进cellspace
:
\documentclass{article}
\usepackage{geometry}
\usepackage{multirow, array}
\usepackage{lscape}
\usepackage{makecell}
\usepackage{cellspace}
\setlength{\cellspacetoplimit}{4pt}
\setlength{\cellspacebottomlimit}{4pt}
\begin{document}
\begin{landscape}
\centering
\begin{tabular}{|*{7}{Sc|}}
\multicolumn{7}{Sc}{\textbf{Data from testing}}\\
\hline
\multicolumn{2}{|Sc|}{Population information}&\multicolumn{3}{Sc|}{Anaerobic power data}&\multicolumn{2}{Sc|}{Anaerobic endurance data}\\
\hline
\multirowcell{2}{Participant number,\\ age and weight}&\multirow{2}{*}{Status}&\multicolumn{2}{c|}{Power clean}&\multirowcell{2}{Broad jump \\ (m)}&\multirowcell{2}{500m row\\ (minutes:seconds)}& \makecell{Air bike \\ 50 cal \\(seconds)}\\
\cline{3-4}
&&kg&\%bw&&&\\
\hline
\multicolumn{7}{|Sc|}{Trained sprinter}\\
\hline
1. Male, 24, 72 kg.& \makecell{National level sprinter\\– 100m} &130&1.8&2.1&1:34&7\\
\hline
2. Male, 22, 75 kg.& \makecell{National level sprinter\\– 200m}&105&1.4&2.2&1:32&7\\
\hline
3. Male, 25, 78 kg.&\makecell{National level sprinter\\– 400m}&90&1.2&1.9&1:2&7\\
\hline
4. Male, 24, 74 kg.& Recreational sprinter &85&1.1&1.7&1:38&7\\
\hline
5. Male, 23, 68 kg.& Recreational sprinter &70&1.0&1.9&1:41&7\\
\hline
\multicolumn{7}{|Sc|}{Untrained sprinter}\\
\hline
6. Female, 27, 47 kg.& \makecell{Recreational\\ Olympic weightlifter}&50&1.1&1.6&6&7\\
\hline
7. Male, 25, 82 kg.& \makecell{Recreational\\ jogging and gym}&55&0.67&1.7&6&7\\
\hline
8. Male, 32, 77 kg.& Daily walks &35&0.45&1.3&6&7\\
\hline
9. Male, 26, 86 kg.& Inactive &30&0.35&1.2&6&7\\
\hline
10. Female, 33, 74 kg.& Inactive & 20 (empty bar)&0.27&0.7&6&7\\
\hline
\hline
\multicolumn{7}{|Sc|}{Statistical values - trained}\\
\hline
mean&2&3&4&5&6&7\\
\hline
standard deviation&2&3&4&5&6&7\\
\hline
\end{tabular}
\end{landscape}
\end{document}