赞
踩
某个表格的单元格中 文字太长 需要分行显示的方法
如分成3行显示 添加命令
-------- \newcommand{\tabincell}[2]{
后使用
\tabincell{c}{zy3:52 minutes\\ GF1: 26 minutes \\GF2: 21 minutes}
或者直接在文本中使用
\begin{tabular}[c]{@{}c@{}}
Difficulty of\\ construction
\end{tabular}
跨行跨列显示
\hline
\multirow{3}{*}{Project}&
\multicolumn{6}{c}{Job distribution /$\%$}&
\multicolumn{6}{c}{VM utilization rate /$\%$}\\
&\multicolumn{2}{c}{prob=0.1} &\multicolumn{2}{c}{prob=0.3} &\multicolumn{2}{c}{prob=0.5} &\multicolumn{2}{c}{prob=0.1} &\multicolumn{2}{c}{prob=0.3} &\multicolumn{2}{c}{prob=0.5}\\
&H-CPU &H-I/O &H-CPU &H-I/O &H-CPU &H-I/O &H-CPU &H-I/O &H-CPU &H-I/O &H-CPU &H-I/O\\
\hline
另外一种跨行显示
\hline
Serial number &Types of &Subtype &Description\\
\hline
1 &\multirow{4}{*}{exchange} &swap(S.V) &Exchange complete information of two genes\\
2 & &swap(S) &Only exchange virtual machine type information\\
3 & &swap (V) &Only exchange information about the number of virtual machines\\
4 & &replace(S,V) &Replace the entire gene\\
5 &\multirow{2}{*}{replace} &replace(S) &Replace only the virtual machine type information\\
6 & &replace (V) &Only replace the number of virtual machines\\
\hline
其他方式 款行跨列
\toprule %%横线
\multirow{2}{*}{
& \multicolumn{2}{c}{GA}
& \multicolumn{2}{c}{PSO}
& \multicolumn{2}{c}{PSO-GA} \\
& \begin{tabular}[c]{@{}c@{}}
Cut off\\ algebra
\end{tabular}
& Result
&
& Result &
& Result \\
\midrule %%下横线
小圆圈中有数字
如
\textcircled{1}
当某个表格超出文字的长度时,进行表格长度限制
\resizebox{\textwidth}{15mm}{
\begin{tabular}{ccc}
\end{tabular} }
15mm表示表格的宽度
表格中的三个横线
\toprule
\midrule
\bottomrule
复杂表格
代码如下
- \begin{table*}[t]
- \centering
- \caption{MAP scores of teacher model, different student models with 4 widths and three baseline models with different length of binary codes on CIFAR-10 and SUN datasets.}
- \label{table1}
- \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
- \hline
- \multicolumn{2}{|c|}{\multirow{2}{*}{Model}} &\multirow{2}{*}{FLOPs}&\multirow{2}{*}{Params} & \multicolumn{4}{c|}{CIFAR-10}&\multicolumn{4}{c|}{SUN}\\
- \cline{5-12}
-
- \multicolumn{2}{|c|}{} & & & 12bits & 24bits & 32bits & 48bits & 12bits & 24bits & 32bits & 48bits \\
- \hline
-
- \multicolumn{2}{|c|}{Teacher} &4.12G &25.56M &0.87841 &0.89512 &0.9014 &0.90601 &0.83587 &0.85736 &0.86297 &0.87103\\
- \hline
-
- %0.25x-----------------
- \multirow{4}{*}{$0.25\times$} & Stu-1 & 0.15G & 1.03M &
- 0.70746 & 0.73458 & 0.74909 & 0.75833 & 0.69618 & 0.76631 & 0.78075 & 0.78787 \\
- \cline{2-12}
-
- \multirow{4}{*}{} & Stu-2 &0.19G &1.08M &0.7629 &0.79111 &0.80039 &0.80519 &0.73539 &0.79714 &0.80753 &0.81195\\
- \cline{2-12}
-
- \multirow{4}{*}{} & Stu-3 &0.26G &1.43M &0.84684 &0.86443 &0.87384 &0.88268 &0.79284 &0.83442 &0.84350 &0.84353\\
- \cline{2-12}
-
- \multirow{4}{*}{} & Stu-4 & 0.29G &1.99M &0.85901 &0.87269 &0.8836 &0.88728 &0.81997 &0.84620 &0.85041 &0.85036\\
- \hline
- \end{tabular}
- \label{table_MAP}
- \end{table*}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。