![如何让横向表格很好地适应页面?](https://linux22.com/image/354043/%E5%A6%82%E4%BD%95%E8%AE%A9%E6%A8%AA%E5%90%91%E8%A1%A8%E6%A0%BC%E5%BE%88%E5%A5%BD%E5%9C%B0%E9%80%82%E5%BA%94%E9%A1%B5%E9%9D%A2%EF%BC%9F.png)
我有以下表格。问题是无论我怎么尝试,我都无法让它看起来很漂亮,适合页面。有人能帮我尝试一下吗?
\documentclass{article}
\usepackage{pgfplots}
\usepackage{lscape}
\usepackage{graphicx}
\usepackage{float}
\usepackage{booktabs}
\begin{document}
\begin{landscape}
\begin{table}[H]
\caption{Ranking Countries Based on CVaR 95 of GMR}
\centering
\begin{tabular}{llllllllllll}
\toprule
\multicolumn{3}{l}{100\% Stocks} & \multicolumn{3}{l}{DLCM} & \multicolumn{3}{l}{DLCT} & \multicolumn{3}{l}{LC}\\
MBB & MFB & SB & MBB & MFB & SB & MBB & MFB & SB & MBB & MFB & SB\\ \midrule
Canada & South Africa & Australia & Canada & South Africa & Australia & Canada & South Africa & Australia & Canada & South Africa & Australia \\
Australia & Australia & Canada & South Africa & Canada & Canada & Sweden & Canada & Canada & Australia & Canada & Canada \\
South Africa & Canada & Sweden & Sweden & USA & Sweden & Australia & Australia & Sweden & South Africa & Australia & Sweden \\
Sweden & USA & South Africa & Australia & Australia & South Africa & South Africa & USA & South Africa & Sweden & USA & South Africa \\
USA & Sweden & World & USA & Sweden & World & Denmark & Sweden & World & USA & Sweden & World \\
Denmark & World & Denmark & Denmark & World & Denmark & USA & World & Denmark & Denmark & World & Denmark \\
World & Denmark & USA & World & Denmark & USA & World & Denmark & USA & World & UK & USA \\
UK & UK & Netherlands & UK & UK & Netherlands & UK & UK & Netherlands & UK & Denmark & Netherlands \\
Netherlands & Switzerland & UK & Netherlands & Netherlands & UK & Netherlands & Switzerland & UK & Netherlands & Switzerland & UK \\
Ireland & Netherlands & Switzerland & Switzerland & Switzerland & Switzerland & Switzerland & Netherlands & Switzerland & Ireland & Netherlands & Switzerland \\
Switzerland & Ireland & Ireland & Ireland & Ireland & Ireland & Ireland & Ireland & Ireland & Switzerland & Ireland & Ireland \\
Norway & Norway & Norway & Norway & Norway & Norway & Norway & Norway & Norway & Norway & Norway & Spain \\
Belgium & Spain & Spain & Belgium & Spain & Spain & Belgium & Spain & Spain & Belgium & Spain & Norway \\
France & France & France & Spain & France & France & Spain & France & France & France & France & France \\
Spain & Italy & Belgium & France & Italy & Belgium & France & Italy & Belgium & Spain & Italy & Belgium \\
Italy & Japan & Italy & Italy & Belgium & Italy & Italy & Belgium & Italy & Italy & Japan & Italy \\
Germany & Belgium & Japan & Germany & Japan & Japan & Germany & Japan & Japan & Germany & Belgium & Japan \\
Japan & Germany & Germany & Japan & Germany & Germany & Japan & Germany & Germany & Japan & Germany & Germany \\
\bottomrule
\end{tabular}
\label{TableCvaRCountries}
\end{table}
\end{landscape}
\end{document}
答案1
如果您可以窃取一些顶部边距,您可能会做类似的事情,如果您可以缩写国家名称(特别是瑞士和荷兰),它会小很多,但是......
\documentclass{article}
\usepackage{lscape}
\usepackage{float}
\usepackage{booktabs}
\begin{document}
\begin{landscape}
\begin{table}\small
\caption{Ranking Countries Based on CVaR 95 of GMR}
\bigskip
\setlength\tabcolsep{2pt}
\hspace*{-15pt}%
\begin{tabular}{@{}llllllllllll@{}}
\toprule
\multicolumn{3}{l}{100\% Stocks} & \multicolumn{3}{l}{DLCM} & \multicolumn{3}{l}{DLCT} & \multicolumn{3}{l}{LC}\\
MBB & MFB & SB & MBB & MFB & SB & MBB & MFB & SB & MBB & MFB & SB\\ \midrule
Canada & S. Africa & Australia & Canada & S. Africa & Australia & Canada & S. Africa & Australia & Canada & S. Africa & Australia \\
Australia & Australia & Canada & S. Africa & Canada & Canada & Sweden & Canada & Canada & Australia & Canada & Canada \\
S. Africa & Canada & Sweden & Sweden & USA & Sweden & Australia & Australia & Sweden & S. Africa & Australia & Sweden \\
Sweden & USA & S. Africa & Australia & Australia & S. Africa & S. Africa & USA & S. Africa & Sweden & USA & S. Africa \\
USA & Sweden & World & USA & Sweden & World & Denmark & Sweden & World & USA & Sweden & World \\
Denmark & World & Denmark & Denmark & World & Denmark & USA & World & Denmark & Denmark & World & Denmark \\
World & Denmark & USA & World & Denmark & USA & World & Denmark & USA & World & UK & USA \\
UK & UK & Netherlands & UK & UK & Netherlands & UK & UK & Netherlands & UK & Denmark & Netherlands \\
Netherlands & Switzerland & UK & Netherlands & Netherlands & UK & Netherlands & Switzerland & UK & Netherlands & Switzerland & UK \\
Ireland & Netherlands & Switzerland & Switzerland & Switzerland & Switzerland & Switzerland & Netherlands & Switzerland & Ireland & Netherlands & Switzerland \\
Switzerland & Ireland & Ireland & Ireland & Ireland & Ireland & Ireland & Ireland & Ireland & Switzerland & Ireland & Ireland \\
Norway & Norway & Norway & Norway & Norway & Norway & Norway & Norway & Norway & Norway & Norway & Spain \\
Belgium & Spain & Spain & Belgium & Spain & Spain & Belgium & Spain & Spain & Belgium & Spain & Norway \\
France & France & France & Spain & France & France & Spain & France & France & France & France & France \\
Spain & Italy & Belgium & France & Italy & Belgium & France & Italy & Belgium & Spain & Italy & Belgium \\
Italy & Japan & Italy & Italy & Belgium & Italy & Italy & Belgium & Italy & Italy & Japan & Italy \\
Germany & Belgium & Japan & Germany & Japan & Japan & Germany & Japan & Japan & Germany & Belgium & Japan \\
Japan & Germany & Germany & Japan & Germany & Germany & Japan & Germany & Germany & Japan & Germany & Germany \\
\bottomrule
\end{tabular}%
\hspace*{-70pt}%
\label{TableCvaRCountries}
\end{table}
\end{landscape}
\end{document}