\begin{table}[H]
\label{ch:four:t6}
\centering\small
\begin{tabular}{c c|c|c|c|c|c|c|c|c|c|}
\multicolumn{2}{c}{Chunk Range} (0.5sec./chunk) &\it 1-2 &\it 2-3 &\it 3-4 &\it 4-5 &\it 5-6 &\it 6-7&\it 7-8&\it 8-9&\it 9-10 \\ \hline
\bf Content & \bf Method & \multicolumn{6}{c}{\bf quality-layers and views}\\
\multirow{2}{*}{\texttt{BookArrival}} & Proposed VR &- &- &$L_{e}$ &$L_{e}$ &$L_{e}$ &$L_{e}^8$ &$L_{e}^9$ &$L_{e}$ &- \\
%&- &- &$L_{e}^7$ &$L_{e}$ &- &$L_{e}$ &- &- &- &- &$L_{e}$ &- &-
& VS &- &- &$L_{e}$ &$L_{e}$ &$L_{e}$ &$L_{e}^{8}$ &$L_{e}^{8}$ &$L_{e}$ &- \\ \hline
\multirow{2}{*}{\texttt{Newspaper}} & Proposed VR &- &- &- &- &$L_{e}$ &$L_{e}$ &$L_{e}^{3}$ &$L_{e}$ &- \\
& VS &- &- &- &- &$L_{e}$ &$L_{e}$ &$L_{e}^{5}$ &$L_{e}$ &- \\ \hline
\multirow{2}{*}{\texttt{ChampagneTower}} & Proposed VR &- &- &- &$L_{e}$ &$L_{e}^{39}$ &$L_{e}^{40}$ &$L_{e}^{38,39}$ &$L_{e}$ &- \\
& VS &- &- &- &$L_{e}$ &$L_{e}^{38}$ &$L_{e}^{38}$ &$L_{e}^{38,40}$ &$L_{e}$ &- \\ \hline
\multirow{2}{*}{\texttt{Caf\'{e}}} & Proposed VR &- &- &- &- &$L_{e}^3$ &$L_{e}^2$ &$L_{e}^3$ &$L_{e}$ &- \\
& VS &- &- &- &- &$L_{e}^3$ &$L_{e}^3$ &$L_{e}^1$ &$L_{e}$ &- \\ \hline
\multirow{2}{*}{\texttt{PoznanStreet}} & Proposed VR &$L_{e}$ &$L_{e}$ &$L_{e}$ &$L_{e}^4$ &$L_{e}^{3,4,5}$ &$L_{e}^{3,4,5}$ &$L_{e}^{3,4,5}$ &$L_{e}^{4,5}$ &$L_{e}$ \\
& VS &$L_{e}$ &$L_{e}$ &$L_{e}$ &$L_{e}^4$ &$L_{e}^{3,4,5}$ &$L_{e}^{3,4,5}$ &$L_{e}^{3,4,5}$ &$L_{e}^{2,4}$ &$L_{e}$\\ \hline
\end{tabular}
\end{table}
答案1
不,显示效果不好。字体的选择是任意的,第一列的对齐方式应为左对齐,“缺失值”标记应为短划线。
将数据放入方框中并不能帮助读者找到它们。最好避免使用垂直线,因为垂直线没有任何作用,而且会妨碍阅读。
\documentclass{article}
\usepackage{booktabs}
\newcommand{\Le}{L_{e}}
\begin{document}
\begin{table}[htp]
\centering
\footnotesize
\addtolength{\tabcolsep}{-2.1pt}% computed “a posteriori”
\begin{tabular}{@{} l c *{9}{c} @{}}
\toprule
\multicolumn{1}{c}{\bfseries Content} & \bfseries Method &
\multicolumn{9}{c}{\textbf{Quality-layers and views}*}\\
\cmidrule(r){1-1} \cmidrule(lr){2-2} \cmidrule(l){3-11}
&& 1--2 & 2--3 & 3--4 & 4--5 & 5--6 & 6--7& 7--8& 8--9 & 9--10 \\
\midrule
BookArrival
& Proposed VR & -- & -- &$\Le$ &$\Le$ &$\Le$ &$\Le^8$ &$\Le^9$ &$\Le$ & -- \\
\addlinespace
& VS & -- & -- &$\Le$ &$\Le$ &$\Le$ &$\Le^{8}$ &$\Le^{8}$ &$\Le$ & -- \\
\midrule
Newspaper
& Proposed VR & -- & -- & -- & -- &$\Le$ &$\Le$ &$\Le^{3}$ &$\Le$ & -- \\
\addlinespace
& VS & -- & -- & -- & -- &$\Le$ &$\Le$ &$\Le^{5}$ &$\Le$ & -- \\
\midrule
ChampagneTower
& Proposed VR & -- & -- & -- &$\Le$ &$\Le^{39}$ &$\Le^{40}$ &$\Le^{38,39}$ &$\Le$ & -- \\
\addlinespace
& VS & -- & -- & -- &$\Le$ &$\Le^{38}$ &$\Le^{38}$ &$\Le^{38,40}$ &$\Le$ & -- \\
\midrule
Caf\'{e}
& Proposed VR & -- & -- & -- & -- &$\Le^3$ &$\Le^2$ &$\Le^3$ &$\Le$ & -- \\
\addlinespace
& VS & -- & -- & -- & -- &$\Le^3$ &$\Le^3$ &$\Le^1$ &$\Le$ & -- \\
\midrule
PoznanStreet
& Proposed VR &$\Le$ &$\Le$ &$\Le$ &$\Le^4$ &$\Le^{3,4,5}$ &$\Le^{3,4,5}$ &$\Le^{3,4,5}$ &$\Le^{4,5}$ &$\Le$ \\
\addlinespace
& VS &$\Le$ &$\Le$ &$\Le$ &$\Le^4$ &$\Le^{3,4,5}$ &$\Le^{3,4,5}$ &$\Le^{3,4,5}$ &$\Le^{2,4}$ &$\Le$\\
\midrule[\heavyrulewidth]
\multicolumn{2}{c}{* Chunk Range (0.5\,sec/chunk)}
\end{tabular}
\end{table}
\end{document}
根据文本块的宽度,您必须将缩减量修改为\tabcolsep
。注释该行,查看表格超出多少(查看文件中的消息log
),然后将超出部分除以 20(可用列间空间的数量)。
答案2
我承认我完全不知道这个表格中的信息内容是什么。但看起来两个标题行的顺序确实颠倒了。我也不认为有必要将子标题项设置为斜体。(我也不认为迫切需要和指令\bf
,但我保留了它们。)不过,\texttt
我确实删除了这些指令。\multirow
我还删除了所有垂直线和大部分水平线,并\hline
用包提供的宏替换了剩余的 s booktabs
。但最重要的是,我减少了控制列间空白量的参数值,这样表格实际上就可以适合文本块的宽度。
单独的评论:您似乎习惯于为\label
每个 提供一条指令table
,但没有\caption
。不幸的是,如果没有标题,则没有必要\label
为该表提供 。LaTeX 将每个 关联\label
到一个计数器变量。(\caption
增加称为 的计数器table
。)重要的是,如果\caption
缺少语句,\label
将会与最近增加的任何计数器相关联——这是错误的!—— 。这可能是一个方程、一个小节、一个定理等。可能不是你的目标,对吧?
\documentclass{article}
\usepackage{booktabs,caption}
\begin{document}
\begin{table}[t!]
\caption{A table} \label{ch:four:t6}
\centering
\small
\setlength\tabcolsep{2.5pt} % default: 6pt
\begin{tabular}{@{}l l *{9}{c}@{}}
\toprule
\bfseries Content & \bfseries Method & \multicolumn{9}{c@{}}{\bfseries Quality layers and views}\\
\cmidrule(l){3-11}
Chunk Range &(0.5\,sec/chunk) & 1--2 & 2--3 & 3--4 & 4--5 & 5--6 & 6--7& 7--8& 8--9& 9--10 \\
\midrule
\texttt{BookArrival} & Proposed VR &- &- &$L_{e}$ &$L_{e}$ &$L_{e}$ &$L_{e}^8$ &$L_{e}^9$ &$L_{e}$ &- \\
%&- &- &$L_{e}^7$ &$L_{e}$ &- &$L_{e}$ &- &- &- &- &$L_{e}$ &- &-
& VS &- &- &$L_{e}$ &$L_{e}$ &$L_{e}$ &$L_{e}^{8}$ &$L_{e}^{8}$ &$L_{e}$ &- \\ \addlinespace
\texttt{Newspaper} & Proposed VR &- &- &- &- &$L_{e}$ &$L_{e}$ &$L_{e}^{3}$ &$L_{e}$ &- \\
& VS &- &- &- &- &$L_{e}$ &$L_{e}$ &$L_{e}^{5}$ &$L_{e}$ &- \\ \addlinespace
\texttt{ChampagneTower} & Proposed VR &- &- &- &$L_{e}$ &$L_{e}^{39}$ &$L_{e}^{40}$ &$L_{e}^{38,39}$ &$L_{e}$ &- \\
& VS &- &- &- &$L_{e}$ &$L_{e}^{38}$ &$L_{e}^{38}$ &$L_{e}^{38,40}$ &$L_{e}$ &- \\ \addlinespace
\texttt{Caf\'{e}} & Proposed VR &- &- &- &- &$L_{e}^3$ &$L_{e}^2$ &$L_{e}^3$ &$L_{e}$ &- \\
& VS &- &- &- &- &$L_{e}^3$ &$L_{e}^3$ &$L_{e}^1$ &$L_{e}$ &- \\ \addlinespace
\texttt{PoznanStreet} & Proposed VR &$L_{e}$ &$L_{e}$ &$L_{e}$ &$L_{e}^4$ &$L_{e}^{3,4,5}$ &$L_{e}^{3,4,5}$ &$L_{e}^{3,4,5}$ &$L_{e}^{4,5}$ &$L_{e}$ \\
& VS &$L_{e}$ &$L_{e}$ &$L_{e}$ &$L_{e}^4$ &$L_{e}^{3,4,5}$ &$L_{e}^{3,4,5}$ &$L_{e}^{3,4,5}$ &$L_{e}^{2,4}$ &$L_{e}$\\
\bottomrule
\end{tabular}
\end{table}
\end{document}