我想知道怎样才能水平拆分表格而不恢复到景观页面。我没有找到有关此问题的任何信息。
在我的特殊情况下(代码如下),我想将 V6 中的表格拆分为两个部分放在同一页上或以纵向格式放在两页上。
包裹长桌,超表格式, 和浮点型无法帮助我做到这一点。有什么想法吗?
\documentclass[11pt,a4paper]{article}
\usepackage[table]{xcolor}
\begin{document}
\begin{center}
\begin{table}[h!]
\begin{tabular}{lccccccccccccccc}
& V1 & V2 & V3 & V4 & V5 & V6 & V7 & V8 & V9 & V10 & V11 & V12 & V13 & V14 & V15 \\ \hline
V1&$1.000$&$0.782$&$0.721$&$0.871$&$0.671$&$0.889$&$0.494$&$0.595$&$0.859$&$0.764$&$0.824$&$0.649$&$0.778$&$0.801$&$0.774$\tabularnewline
V2&$0.782$&$1.000$&$0.689$&$0.769$&$0.717$&$0.856$&$0.648$&$0.687$&$0.831$&$0.767$&$0.835$&$0.620$&$0.710$&$0.780$&$0.689$\tabularnewline
V3&$0.721$&$0.689$&$1.000$&$0.720$&$0.558$&$0.757$&$0.348$&$0.397$&$0.673$&$0.674$&$0.575$&$0.470$&$0.492$&$0.712$&$0.574$\tabularnewline
V4&$0.871$&$0.769$&$0.720$&$1.000$&$0.656$&$0.831$&$0.442$&$0.532$&$0.797$&$0.714$&$0.724$&$0.689$&$0.731$&$0.812$&$0.771$\tabularnewline
V5&$0.671$&$0.717$&$0.558$&$0.656$&$1.000$&$0.698$&$0.513$&$0.500$&$0.660$&$0.631$&$0.617$&$0.656$&$0.833$&$0.693$&$0.569$\tabularnewline
V6&$0.889$&$0.856$&$0.757$&$0.831$&$0.698$&$1.000$&$0.568$&$0.613$&$0.838$&$0.763$&$0.833$&$0.640$&$0.734$&$0.756$&$0.653$\tabularnewline
V7&$0.494$&$0.648$&$0.348$&$0.442$&$0.513$&$0.568$&$1.000$&$0.725$&$0.549$&$0.561$&$0.540$&$0.354$&$0.504$&$0.557$&$0.445$\tabularnewline
V8&$0.595$&$0.687$&$0.397$&$0.532$&$0.500$&$0.613$&$0.725$&$1.000$&$0.556$&$0.604$&$0.617$&$0.347$&$0.554$&$0.585$&$0.596$\tabularnewline
V9&$0.859$&$0.831$&$0.673$&$0.797$&$0.660$&$0.838$&$0.549$&$0.556$&$1.000$&$0.820$&$0.827$&$0.761$&$0.764$&$0.698$&$0.568$\tabularnewline
V10&$0.764$&$0.767$&$0.674$&$0.714$&$0.631$&$0.763$&$0.561$&$0.604$&$0.820$&$1.000$&$0.744$&$0.675$&$0.703$&$0.749$&$0.646$\tabularnewline
V11&$0.824$&$0.835$&$0.575$&$0.724$&$0.617$&$0.833$&$0.540$&$0.617$&$0.827$&$0.744
V12&$0.649$&$0.620$&$0.470$&$0.689$&$0.656$&$0.640$&$0.354$&$0.347$&$0.761$&$0.675$&$0.660$&$1.000$&$0.791$&$0.527$&$0.462$\tabularnewline
V13&$0.778$&$0.710$&$0.492$&$0.731$&$0.833$&$0.734$&$0.504$&$0.554$&$0.764$&$0.703$&$0.707$&$0.791$&$1.000$&$0.675$&$0.609$\tabularnewline
V14&$0.801$&$0.780$&$0.712$&$0.812$&$0.693$&$0.756$&$0.557$&$0.585$&$0.698$&$0.749$&$0.739$&$0.527$&$0.675$&$1.000$&$0.814$\tabularnewline
V15&$0.774$&$0.689$&$0.574$&$0.771$&$0.569$&$0.653$&$0.445$&$0.596$&$0.568$&$0.646$&$0.653$&$0.462$&$0.609$&$0.814$&$1.000$\tabularnewline \hline
\end{tabular}
\end{table}
\end{center}
\end{document}
答案1
我提出了另一种解决方案:将字体大小更改为\footnotesize
并减小\tabcolsep
以使其适合文本宽度,并使用交替行颜色和增加cellspace
包中的行垂直间距来提高其可读性。
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[showframe, nomarginpar]{geometry}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{fourier}
\usepackage{amsmath}
\usepackage{cellspace}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{6pt}
\usepackage[table, x11names]{xcolor}
\begin{document}
\begin{table}[!h]
\centering\footnotesize\arrayrulecolor{IndianRed3}
\setlength\tabcolsep{3.pt}
\noindent
\rowcolors{2}{}{Firebrick3!15!}
\begin{tabularx}{\linewidth}{Sl*{15}{>{\centering\arraybackslash $}X <{$}}}
\toprule
& \text{V1} & \text{V2} & \text{V3} & \text{V4} & \text{V5} & \text{V6} & \text{V7} & \text{V8} & \text{V9} & \text{V10} & \text{V11} & \text{V12} & \text{V13} & \text{V14} & \text{V15} \\
\midrule
V1& 1.000 & 0.782 & 0.721 & 0.871 & 0.671 & 0.889 & 0.494 & 0.595 & 0.859 & 0.764 & 0.824 & 0.649 & 0.778 & 0.801 & 0.774 \\
V2 & 0.782 & 1.000 & 0.689 & 0.769 & 0.717 & 0.856 & 0.648 & 0.687 & 0.831 & 0.767 & 0.835 & 0.620 & 0.710 & 0.780 & 0.689 \\
V3 & 0.721 & 0.689 & 1.000 & 0.720 & 0.558 & 0.757 & 0.348 & 0.397 & 0.673 & 0.674 & 0.575 & 0.470 & 0.492 & 0.712 & 0.574 \\
V4 & 0.871 & 0.769 & 0.720 & 1.000 & 0.656 & 0.831 & 0.442 & 0.532 & 0.797 & 0.714 & 0.724 & 0.689 & 0.731 & 0.812 & 0.771 \\
V5 & 0.671 & 0.717 & 0.558 & 0.656 & 1.000 & 0.698 & 0.513 & 0.500 & 0.660 & 0.631 & 0.617 & 0.656 & 0.833 & 0.693 & 0.569 \\
V6 & 0.889 & 0.856 & 0.757 & 0.831 & 0.698 & 1.000 & 0.568 & 0.613 & 0.838 & 0.763 & 0.833 & 0.640 & 0.734 & 0.756 & 0.653 \\
V7 & 0.494 & 0.648 & 0.348 & 0.442 & 0.513 & 0.568 & 1.000 & 0.725 & 0.549 & 0.561 & 0.540 & 0.354 & 0.504 & 0.557 & 0.445 \\
V8 & 0.595 & 0.687 & 0.397 & 0.532 & 0.500 & 0.613 & 0.725 & 1.000 & 0.556 & 0.604 & 0.617 & 0.347 & 0.554 & 0.585 & 0.596 \\
V9 & 0.859 & 0.831 & 0.673 & 0.797 & 0.660 & 0.838 & 0.549 & 0.556 & 1.000 & 0.820 & 0.827 & 0.761 & 0.764 & 0.698 & 0.568 \\
V10 & 0.764 & 0.767 & 0.674 & 0.714 & 0.631 & 0.763 & 0.561 & 0.604 & 0.820 & 1.000 & 0.744 & 0.675 & 0.703 & 0.749 & 0.646 \\
V11 & 0.824 & 0.835 & 0.575 & 0.724 & 0.617 & 0.833 & 0.540 & 0.617 & 0.827 & 0.744 & & & & & \\
V12 & 0.649 & 0.620 & 0.470 & 0.689 & 0.656 & 0.640 & 0.354 & 0.347 & 0.761 & 0.675 & 0.660 & 1.000 & 0.791 & 0.527 & 0.462 \\
V13 & 0.778 & 0.710 & 0.492 & 0.731 & 0.833 & 0.734 & 0.504 & 0.554 & 0.764 & 0.703 & 0.707 & 0.791 & 1.000 & 0.675 & 0.609 \\
V14 & 0.801 & 0.780 & 0.712 & 0.812 & 0.693 & 0.756 & 0.557 & 0.585 & 0.698 & 0.749 & 0.739 & 0.527 & 0.675 & 1.000 & 0.814 \\
V15 & 0.774 & 0.689 & 0.574 & 0.771 & 0.569 & 0.653 & 0.445 & 0.596 & 0.568 & 0.646 & 0.653 & 0.462 & 0.609 & 0.814 & 1.000 \\ \bottomrule
\end{tabularx}
\end{table}
\end{document}