Letex画复杂表格的方法

帮朋友画了一个表格,相对复杂,把代码记载于此,以后不用自己写。

\begin{table}[!htb]
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
\caption{Comparison of Computation overhead}
\label{table:Comparison of Computation}\centering
\vspace{10pt}
\begin{tabular}{|c|ccccccc|}
\hline
   \multirow{3}{1.2cm}{Year}& \multicolumn{7}{c|}{PM10} \\ \cline{2-8}
   & \multirow{2}{1.2cm}{Peal value}&\multicolumn{2}{c}{Tran vue }&\multicolumn{2}{c}{BGM(1,1)}&\multicolumn{2}{c|}{IOBGM(1,1)} \\ \cline{3-8}
   & & F V & R E & F V &\tabincell{c}{R\\V }& F V & R E \\ \hline
   2011 & 1 & 2& 3& 4& 5& 6& 7 \\
   2012 & 1 & 2& 3& 4& 5& 6& 7\\ \hline

\end{tabular}
\end{table}

表格样式:
这里写图片描述

\begin{table}[!htb]
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
\caption{Comparison of Computation overhead}
\label{table:Comparison of Computation}\centering
\vspace{10pt}
\begin{tabular}{|c|c|c|c|}
\hline
 \multicolumn{2}{|c|}{} & Our scheme & LZCK\cite{liu2014certificateless} \\ \hline
 \multicolumn{2}{|c|}{\tabincell{c}{Participant \\Registration}} & \tabincell{c}{$4T_{hs}+$\\$2T_{se}+T_{rs}$ } &$2T_p+T_{rs}$ \\ \hline
   \multirow{1}{1.2cm}{Authen-\\tication} & Participant &  $T_{rv}$  &\tabincell{c}{ $4T_{ml}+$\\$T_{ex}+2T_{hs}$} \\ \cline{2-4}
  & AP & $T_{se}$ & \tabincell{c}{$T_p+2T_{ml}$\\$+T_{ex}+2T_{hs}$ }\\ \hline
\end{tabular}
\end{table}
\ifCLASSOPTIONcaptionsoff
\newpage \fi
\bibliographystyle{IEEEtran}
\bibliography{globecom}
\end{document}

表格样式:
这里写图片描述

没有更多推荐了,返回首页