宏包 makecell 应用(一)

本文介绍了 LaTeX 中宏包 makecell 的应用,包括如何调整表格中单元格的上下垂直间距、设置表头的文字行距、字体及对齐方式。通过示例代码展示了如何使用 headset、 headfont、 headalign 和 headgape 命令,以实现更灵活的表格排版效果。
摘要由CSDN通过智能技术生成
 

宏包 makecell 应用(一)

 

知识点:

① 盒子(box)上下重直间距——\Gape[Heith corr][depth corr]{<text>}   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 colum

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值