宏包 makecell 应用(一)

 

宏包 makecell 应用(一)

 

知识点:

① 盒子(box)上下重直间距——\Gape[Heith corr][depth corr]{}   and \gape

② \theadset ——表头文字的行距;

③ \theadfont——表头文字的字体;

④ \theadalign——表头文字的对齐; \theadalign{cc},默认行列均居中对齐,再如\theadalign{lc}:为行居左,列居中对齐。 

⑤ \theadgape——表头文字上下垂直距离。可以将\Gape 或 \gape作为参数。

 

下面是代码:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{latexsym}
\usepackage{CJK} 

\usepackage{makecell}

\begin{document}
\begin{CJK*}{GBK}{song}
\CJKtilde

\renewcommand\theadset{\renewcommand\arraystretch{0.85}%
\setlength\extrarowheight{0pt}}%行距
\renewcommand\theadfont{\small}%字体
\renewcommand\theadalign{rt}%行列对齐
\renewcommand\theadgape{\Gape[0.5cm][2mm]}%上下垂直距离

\begin{tabular}{|l|c|}
\hline
\thead{First column head}&
\thead{Second \\multlined \\ column head}\\
\hline
Left column text & 28--31\\
\hline
\end{tabular}

 

\end{document}

结果:

你可能感兴趣的:(宏包 makecell 应用(一))