latex 中的大表格

latex 中的大表格

我有一张大桌子,它不能放在一页里

我如何将其水平放置在页面上? - 或者任何其他有关如何呈现此表格的建议

    \begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{lllrrrrrrrr}
         & \multicolumn{1}{r|}{} & \multicolumn{3}{c|}{\cellcolor[rgb]{ .749,  .749,  .749}\textbf{CNN}} & \multicolumn{3}{c|}{\cellcolor[rgb]{ .749,  .749,  .749}\textbf{Memetic SOM}} & \multicolumn{3}{c|}{\cellcolor[rgb]{ .749,  .749,  .749}\textbf{PMSOM}} \\
    \multicolumn{1}{c}{\textbf{Instance}} & \multicolumn{1}{c|}{\textbf{Optimum}} & \multicolumn{1}{c}{\textbf{sec1}} & \multicolumn{1}{c}{\textbf{\% rozdíl2}} & \multicolumn{1}{c|}{\textbf{\%TPDB}} & \multicolumn{1}{c}{\textbf{sec1}} & \multicolumn{1}{c}{\textbf{\% rozdíl2}} & \multicolumn{1}{c|}{\textbf{\%TPDB}} & \multicolumn{1}{c}{\textbf{sec1}} & \multicolumn{1}{c}{\textbf{\% rozdíl2}} & \multicolumn{1}{c|}{\textbf{\%TPDB}} \\
    \midrule
    \multicolumn{1}{c}{att48} & \multicolumn{1}{c|}{10 628} & \multicolumn{1}{c}{24.35} & \multicolumn{1}{c}{3.79} & \multicolumn{1}{c|}{0.923} & \multicolumn{1}{c}{0.31} & \multicolumn{1}{c}{3.79} & \multicolumn{1}{c|}{0.012} & \multicolumn{1}{c}{0.42} & \multicolumn{1}{c}{2.63} & \multicolumn{1}{c|}{0.011} \\
    \multicolumn{1}{c}{eil51} & \multicolumn{1}{c|}{426} & \multicolumn{1}{c}{47.53} & \multicolumn{1}{c}{14 135.27} & \multicolumn{1}{c|}{6 718.479} & \multicolumn{1}{c}{0.33} & \multicolumn{1}{c}{5.63} & \multicolumn{1}{c|}{0.019} & \multicolumn{1}{c}{0.31} & \multicolumn{1}{c}{1.64} & \multicolumn{1}{c|}{0.005} \\
    \multicolumn{1}{c}{berlin52} & \multicolumn{1}{c|}{7 542} & \multicolumn{1}{c}{52.08} & \multicolumn{1}{c}{201.87} & \multicolumn{1}{c|}{105.129} & \multicolumn{1}{c}{0.34} & \multicolumn{1}{c}{6.13} & \multicolumn{1}{c|}{0.021} & \multicolumn{1}{c}{0.36} & \multicolumn{1}{c}{2.29} & \multicolumn{1}{c|}{0.008} \\
    \multicolumn{1}{c}{eil76} & \multicolumn{1}{c|}{538} & \multicolumn{1}{c}{91.52} & \multicolumn{1}{c}{13 395.72} & \multicolumn{1}{c|}{12 259.760} & \multicolumn{1}{c}{0.70} & \multicolumn{1}{c}{3.72} & \multicolumn{1}{c|}{0.026} & \multicolumn{1}{c}{0.67} & \multicolumn{1}{c}{3.72} & \multicolumn{1}{c|}{0.025} \\
    \multicolumn{1}{c}{lin105} & \multicolumn{1}{c|}{14 379} & \multicolumn{1}{c}{258.17} & \multicolumn{1}{c}{1 770.04} & \multicolumn{1}{c|}{4 569.700} & \multicolumn{1}{c}{1.33} & \multicolumn{1}{c}{0.00} & \multicolumn{1}{c|}{0.000} & \multicolumn{1}{c}{1.11} & \multicolumn{1}{c}{3.00} & \multicolumn{1}{c|}{0.033} \\
    \multicolumn{1}{c}{bier127} & \multicolumn{1}{c|}{118 282} & \multicolumn{1}{c}{257.45} & \multicolumn{1}{c}{287.53} & \multicolumn{1}{c|}{740.248} & \multicolumn{1}{c}{1.90} & \multicolumn{1}{c}{1.93} & \multicolumn{1}{c|}{0.037} & \multicolumn{1}{c}{1.53} & \multicolumn{1}{c}{0.40} & \multicolumn{1}{c|}{0.006} \\
    \multicolumn{1}{c}{ch130} & \multicolumn{1}{c|}{6 110} & \multicolumn{1}{c}{2.00} & \multicolumn{1}{c}{2 650.17} & \multicolumn{1}{c|}{52.924} & \multicolumn{1}{c}{2.00} & \multicolumn{1}{c}{1.16} & \multicolumn{1}{c|}{0.023} & \multicolumn{1}{c}{4.53} & \multicolumn{1}{c}{2.39} & \multicolumn{1}{c|}{0.108} \\
    \multicolumn{1}{c}{ch150} & \multicolumn{1}{c|}{6 528} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{2.70} & \multicolumn{1}{c}{4.14} & \multicolumn{1}{c|}{0.112} & \multicolumn{1}{c}{3.01} & \multicolumn{1}{c}{2.30} & \multicolumn{1}{c|}{0.069} \\
    \multicolumn{1}{c}{rat195} & \multicolumn{1}{c|}{2 323} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{4.45} & \multicolumn{1}{c}{6.89} & \multicolumn{1}{c|}{0.307} & \multicolumn{1}{c}{5.70} & \multicolumn{1}{c}{4.09} & \multicolumn{1}{c|}{0.233} \\
    \multicolumn{1}{c}{d198} & \multicolumn{1}{c|}{15 780} &      &      & \multicolumn{1}{c|}{} & \multicolumn{1}{c}{4.587} & \multicolumn{1}{c}{1.43} & \multicolumn{1}{c|}{0.066} & \multicolumn{1}{c}{10.52} & \multicolumn{1}{c}{2.09} & \multicolumn{1}{c|}{0.220} \\
    \multicolumn{1}{c}{pr226} & \multicolumn{1}{c|}{80 369} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{5.93} & \multicolumn{1}{c}{0.47} & \multicolumn{1}{c|}{0.028} & \multicolumn{1}{c}{8.59} & \multicolumn{1}{c}{6.84} & \multicolumn{1}{c|}{0.588} \\
    \multicolumn{1}{c}{pr299} & \multicolumn{1}{c|}{48 191} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{10.05} & \multicolumn{1}{c}{4.45} & \multicolumn{1}{c|}{0.447} & \multicolumn{1}{c}{7.81} & \multicolumn{1}{c}{3.99} & \multicolumn{1}{c|}{0.312} \\
    \multicolumn{1}{c}{lin318} & \multicolumn{1}{c|}{42 029} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{11.36} & \multicolumn{1}{c}{3.34} & \multicolumn{1}{c|}{0.379} & \multicolumn{1}{c}{10.81} & \multicolumn{1}{c}{0.00} & \multicolumn{1}{c|}{0.000} \\
    \multicolumn{1}{c}{rd400} & \multicolumn{1}{c|}{15 281} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{18.49} & \multicolumn{1}{c}{4.04} & \multicolumn{1}{c|}{0.748} & \multicolumn{1}{c}{12.50} & \multicolumn{1}{c}{4.71} & \multicolumn{1}{c|}{0.588} \\
    \multicolumn{1}{c}{fl417} & \multicolumn{1}{c|}{11 861} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{19.80} & \multicolumn{1}{c}{4.59} & \multicolumn{1}{c|}{0.908} & \multicolumn{1}{c}{12.52} & \multicolumn{1}{c}{2.02} & \multicolumn{1}{c|}{0.253} \\
    \multicolumn{1}{c}{pr439} & \multicolumn{1}{c|}{107 217} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{21.77} & \multicolumn{1}{c}{4.68} & \multicolumn{1}{c|}{1.020} & \multicolumn{1}{c}{11.31} & \multicolumn{1}{c}{4.52} & \multicolumn{1}{c|}{0.512} \\
    \multicolumn{1}{c}{pcb442} & \multicolumn{1}{c|}{50 778} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{22.18} & \multicolumn{1}{c}{8.61} & \multicolumn{1}{c|}{1.910} & \multicolumn{1}{c}{14.44} & \multicolumn{1}{c}{6.63} & \multicolumn{1}{c|}{0.957} \\
    \multicolumn{1}{c}{U574} & \multicolumn{1}{c|}{36 905} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{36.79} & \multicolumn{1}{c}{6.91} & \multicolumn{1}{c|}{2.542} & \multicolumn{1}{c}{10.77} & \multicolumn{1}{c}{4.45} & \multicolumn{1}{c|}{0.480} \\
    \multicolumn{1}{c}{gr666} & \multicolumn{1}{c|}{294 358} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{53.90} & \multicolumn{1}{c}{13.33} & \multicolumn{1}{c|}{7.186} & \multicolumn{1}{c}{28.81} & \multicolumn{1}{c}{9.02} & \multicolumn{1}{c|}{2.598} \\
    \multicolumn{1}{c}{u724} & \multicolumn{1}{c|}{41 910} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{65.75} & \multicolumn{1}{c}{11.92} & \multicolumn{1}{c|}{7.834} & \multicolumn{1}{c}{21.41} & \multicolumn{1}{c}{5.30} & \multicolumn{1}{c|}{1.136} \\
    \multicolumn{1}{c}{rat783} & \multicolumn{1}{c|}{8 806} &      &      & \multicolumn{1}{r|}{} & \multicolumn{1}{c}{89.75} & \multicolumn{1}{c}{16.47} & \multicolumn{1}{c|}{14.778} & \multicolumn{1}{c}{14.55} & \multicolumn{1}{c}{6.15} & \multicolumn{1}{c|}{0.896} \\
    \midrule
         &      &      &      &      &      &      &      &      &      &  \\
    \midrule
    \multicolumn{3}{l}{1) stanoveno jako průměr z 10 měření} &      &      &      &      &      &      &      &  \\
    \multicolumn{3}{l}{2) dle nejlepší hodnoty z 10 měření} &      &      &      &      &      &      &      &  \\
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%

答案1

有点拥挤,但它适合标准文本宽度:

\documentclass[a4paper]{article}

\usepackage{booktabs,siunitx}
\usepackage[table]{xcolor}

\begin{document}

\begin{table}[htbp]
\centering\footnotesize
\setlength{\tabcolsep}{0pt}

\caption{Add caption}
\label{tab:addlabel}

\begin{tabular*}{\textwidth}{
  @{\extracolsep{\fill}}
  ccccc
  S[table-format=2.3]
  S[table-format=2.2]
  S[table-format=2.3]
  S[table-format=2.2]
  S[table-format=2.2]
  S[table-format=2.3]
}
\toprule
& & \multicolumn{3}{c}{\textbf{CNN}}
&   \multicolumn{3}{c}{\textbf{Memetic SOM}}
&   \multicolumn{3}{c}{\textbf{PMSOM}} \\
\cmidrule{3-5} \cmidrule{6-8} \cmidrule{9-11}
\textbf{(I)} & \textbf{(O)} &
{\textbf{(1)}} & {\textbf{(2)}} & {\textbf{(3)}} &
{\textbf{(1)}} & {\textbf{(2)}} & {\textbf{(3)}} &
{\textbf{(1)}} & {\textbf{(2)}} & {\textbf{(3)}} \\
\midrule
att48 & 10 628 & 24.35 & 3.79 & 0.923 & 0.31 & 3.79 & 0.012 & 0.42 & 2.63 & 0.011 \\
eil51 & 426 & 47.53 & 14 135.27 & 6 718.479 & 0.33 & 5.63 & 0.019 & 0.31 & 1.64 & 0.005 \\
berlin52 & 7 542 & 52.08 & 201.87 & 105.129 & 0.34 & 6.13 & 0.021 & 0.36 & 2.29 & 0.008 \\
eil76 & 538 & 91.52 & 13 395.72 & 12 259.760 & 0.70 & 3.72 & 0.026 & 0.67 & 3.72 & 0.025 \\
lin105 & 14 379 & 258.17 & 1 770.04 & 4 569.700 & 1.33 & 0.00 & 0.000 & 1.11 & 3.00 & 0.033 \\
bier127 & 118 282 & 257.45 & 287.53 & 740.248 & 1.90 & 1.93 & 0.037 & 1.53 & 0.40 & 0.006 \\
ch130 & 6 110 & 2.00 & 2 650.17 & 52.924 & 2.00 & 1.16 & 0.023 & 4.53 & 2.39 & 0.108 \\
ch150 & 6 528 &      &      &  & 2.70 & 4.14 & 0.112 & 3.01 & 2.30 & 0.069 \\
rat195 & 2 323 &      &      &  & 4.45 & 6.89 & 0.307 & 5.70 & 4.09 & 0.233 \\
d198 & 15 780 &      &      &  & 4.587 & 1.43 & 0.066 & 10.52 & 2.09 & 0.220 \\
pr226 & 80 369 &      &      &  & 5.93 & 0.47 & 0.028 & 8.59 & 6.84 & 0.588 \\
pr299 & 48 191 &      &      &  & 10.05 & 4.45 & 0.447 & 7.81 & 3.99 & 0.312 \\
lin318 & 42 029 &      &      &  & 11.36 & 3.34 & 0.379 & 10.81 & 0.00 & 0.000 \\
rd400 & 15 281 &      &      &  & 18.49 & 4.04 & 0.748 & 12.50 & 4.71 & 0.588 \\
fl417 & 11 861 &      &      &  & 19.80 & 4.59 & 0.908 & 12.52 & 2.02 & 0.253 \\
pr439 & 107 217 &      &      &  & 21.77 & 4.68 & 1.020 & 11.31 & 4.52 & 0.512 \\
pcb442 & 50 778 &      &      &  & 22.18 & 8.61 & 1.910 & 14.44 & 6.63 & 0.957 \\
U574 & 36 905 &      &      &  & 36.79 & 6.91 & 2.542 & 10.77 & 4.45 & 0.480 \\
gr666 & 294 358 &  &  &  & 53.90 & 13.33 & 7.186 & 28.81 & 9.02 & 2.598 \\
u724 & 41 910 &      &      &  & 65.75 & 11.92 & 7.834 & 21.41 & 5.30 & 1.136 \\
rat783 & 8 806 &      &      &  & 89.75 & 16.47 & 14.778 & 14.55 & 6.15 & 0.896 \\
\midrule[\heavyrulewidth]
\multicolumn{11}{@{}l@{}}{(I): Instance; (O): Optimum; (1): sec1; (2): \% rozdíl2; (3): \%TPDB} \\
\multicolumn{11}{@{}l@{}}{1) stanoveno jako průměr z 10 měření} \\
\multicolumn{11}{@{}l@{}}{2) dle nejlepší hodnoty z 10 měření} \\
\end{tabular*}

\end{table}

\end{document}

在此处输入图片描述

查看https://tex.stackexchange.com/a/112002/4427如果你使用babel-czech

相关内容