elsevier latex table表格表头Table 1 加粗,caption内容换行

  • Post author:
  • Post category:其他


想实现这样的一个表格表头样式:


采用如下的代码

\documentclass[preprint,10pt,authoryear]{elsarticle}

\usepackage{geometry}

\geometry{left=2cm, right=2cm, top=2cm, bottom=2cm}

\usepackage{microtype}

\usepackage{amssymb}

\usepackage{amsthm}

\usepackage{amsmath}

\usepackage{caption}

\makeatletter % “@” is now a normal letter for TeX

\def\@makecaption#1#2{%

\vskip\abovecaptionskip

\sbox\@tempboxa{#1 #2}%

{\bfseries #1} #2\par

\vskip\belowcaptionskip}

\makeatother

\usepackage{booktabs}

\usepackage[justification=centering]{caption}

\begin{document}

\begin{table}

\caption{\newline The results of running algorithm parallel using MapReduce.}

\begin{tabular}{llllllp{4.84cm}}

\hline

Node Prop &  CPU(GHz) &  RAM(GB) &  No. of nodes &  No. of map functions &  Threshold computing time(s) &  \multicolumn{1}{p{4.84cm}}{\centering Memory cell generation time(s)} \\

\hline

Serial &  250GHz &  1GB &  1 &  – &  131 &  \multicolumn{1}{p{4.84cm}}{\centering 168} \\

Test case 2 &   &   &   &   &   &  \multicolumn{1}{p{4.84cm}}{\centering} \\

Test case 3 &   &   &   &   &   &  \multicolumn{1}{p{4.84cm}}{\centering} \\

Test case 4 &   &   &   &   &   &  \multicolumn{1}{p{4.84cm}}{\centering} \\

Test case 5 &   &   &   &   &   &  \multicolumn{1}{p{4.84cm}}{\centering} \\

\hline

\end{tabular}\\

\end{table}

\begin{table}[ht]

\centering

\begin{minipage}[t]{0.6\linewidth}

%\centering

\makeatletter\def\@captype{table}\makeatother\caption{\newline The concept pair number of different settings of $k^{‘}$.}

\label{hit k’}



\begin{tabular}{l|ccccc}



\toprule



&M\&C&R\&G&WS353-Sim&Wikipedia2015\\

\hline



$k^{‘}=1$&23&49&167&22\\

$k^{‘}=2$&7&16&34&8\\

$k^{‘}=3$&0&0&2&0\\

sum&30&65&203&30\\



\bottomrule



\end{tabular}

\end{minipage}

\end{table}

\end{document}

效果:




版权声明:本文为qr457535344原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。