本文记录自已在插入表格所遇到问题及解决办法。
1. 表格居中,表头加粗居中
我看IEEEtran论文的表格为:表格居中,表头居中加粗,举例如下:
LaTeX源码如下[1]:
\begin{table}
\centering
\caption{table decription}
\label{t_sim}
\begin{tabular}{|l|l|}
\hline
\multicolumn{1}{|c|}{\textbf{Key}} & \multicolumn{1}{c|}{\textbf{Value}} \\
\hline
$x$ & description of x \\
$y$ & description of y \\
$y$ & description of z \\
\hline
\end{tabular}
\end{table}
还可以用\usepackage{makecell}
,详情见官方文档makecell,摘抄部分如下:
This package supports common layouts for tabular column heads in whole documents, based on one-column tabular environment. In addition, it can create multi-lined tabular cells.
使用方法如下:
\usepackage{makecell}
\renewcommand\theadfont{\bfseries}
\begin{tabular}{|l|l|l|l|}
\hline
\thead{Key} & \thead{Value} & \thead{Key} & \thead{Value} \\
\hline
参考资料: