轻松记录您
灵感和创意

Markdown使用笔记LaTeX

本文记录自已在插入表格所遇到问题及解决办法。

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 pack­age sup­ports com­mon lay­outs for tab­u­lar col­umn heads in whole doc­u­ments, based on one-col­umn tab­u­lar en­vi­ron­ment. In ad­di­tion, it can cre­ate multi-lined tab­u­lar cells.

使用方法如下:

\usepackage{makecell} \renewcommand\theadfont{\bfseries} \begin{tabular}{|l|l|l|l|}\hline\thead{Key} & \thead{Value} & \thead{Key} & \thead{Value} \\\hline

未经允许不得转载:坚果云Markdown » Markdown使用笔记LaTeX
分享到: 更多 (0)

坚果云Markdown轻松记录您 灵感和创意

坚果云Markdown下载坚果云Markdown介绍